]> git.baikalelectronics.ru Git - kernel.git/commit
drivers: net: smc91x: Fix set but unused W=1 warning
authorAndrew Lunn <andrew@lunn.ch>
Tue, 10 Nov 2020 03:02:42 +0000 (04:02 +0100)
committerJakub Kicinski <kuba@kernel.org>
Thu, 12 Nov 2020 22:49:39 +0000 (14:49 -0800)
commit207e66927cc2b9267c881ad52736e9044dc80dab
tree74ca8003dfd96c9b60319ecd1f06c813a7174605
parent05ad6908e2fa0a9d7ce77648775ca79419c45a2c
drivers: net: smc91x: Fix set but unused W=1 warning

drivers/net/ethernet/smsc/smc91x.c:706:51: warning: variable ‘pkt_len’ set but not used [-Wunused-but-set-variable]
  706 |  unsigned int saved_packet, packet_no, tx_status, pkt_len;

The read of the packet length in the descriptor probably needs to be
kept in order to keep the hardware happy. So tell the compiler we
don't expect to use the value by using the __always_unused attribute.

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