]> git.baikalelectronics.ru Git - kernel.git/commit
drivers: net: davicom: Fixed unused but set variable with W=1
authorAndrew Lunn <andrew@lunn.ch>
Sat, 31 Oct 2020 00:58:32 +0000 (01:58 +0100)
committerJakub Kicinski <kuba@kernel.org>
Mon, 2 Nov 2020 23:52:22 +0000 (15:52 -0800)
commitd0c793ceec832620add90f9d0ce12cedd8d073b4
treef303a0494f89243c10093eb5ecc3656fa9d4d9bb
parent8b0c71f854fe0970abedc1b17e56208f11893fd6
drivers: net: davicom: Fixed unused but set variable with W=1

drivers/net/ethernet/davicom//dm9000.c: In function ‘dm9000_dumpblk_8bit’:
drivers/net/ethernet/davicom//dm9000.c:235:6: warning: variable ‘tmp’ set but not used [-Wunused-but-set-variable]

The driver needs to read packet data from the device even when the
packet is known bad. There is no need to assign the data to a variable
during this discard operation.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/davicom/dm9000.c