drivers: net: smc911x: Work around set but unused status
authorAndrew Lunn <andrew@lunn.ch>
Tue, 10 Nov 2020 03:02:44 +0000 (04:02 +0100)
committerJakub Kicinski <kuba@kernel.org>
Thu, 12 Nov 2020 22:49:39 +0000 (14:49 -0800)
commit6015e6f2efc620fe0b43e92ddd620f2446ce82e8
treef54fa69957f0be31c9546aefbb2d7d3de361cf30
parent606ddf1f046e5e15c4865722f8dd1b9cf10042f1
drivers: net: smc911x: Work around set but unused status

drivers/net/ethernet/smsc/smc911x.c: In function ‘smc911x_phy_interrupt’:
drivers/net/ethernet/smsc/smc911x.c:976:6: warning: variable ‘status’ set but not used [-Wunused-but-set-variable]
  976 |  int status;

A comment indicates the status needs to be read from the PHY,
otherwise bad things happen. But due to the macro magic, it is hard to
perform the read without assigning it to a variable. So add
_always_unused attribute to status to tell the compiler we don't
expect to use the value.

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