mirror of
https://github.com/torvalds/linux.git
synced 2024-12-02 09:01:34 +00:00
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>
This commit is contained in:
parent
cef211968c
commit
5b320b5343
@ -703,7 +703,8 @@ static void smc_tx(struct net_device *dev)
|
||||
{
|
||||
struct smc_local *lp = netdev_priv(dev);
|
||||
void __iomem *ioaddr = lp->base;
|
||||
unsigned int saved_packet, packet_no, tx_status, pkt_len;
|
||||
unsigned int saved_packet, packet_no, tx_status;
|
||||
unsigned int pkt_len __always_unused;
|
||||
|
||||
DBG(3, dev, "%s\n", __func__);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user