[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20201102114512.1062724-31-lee.jones@linaro.org>
Date: Mon, 2 Nov 2020 11:45:12 +0000
From: Lee Jones <lee.jones@...aro.org>
To: davem@...emloft.net
Cc: Lee Jones <lee.jones@...aro.org>, Nicolas Pitre <nico@...xnic.net>,
Jakub Kicinski <kuba@...nel.org>, Erik Stahlman <erik@...edu>,
Peter Cammaert <pc@...kart.be>,
Daris A Nevil <dnevil@...c.com>,
Russell King <rmk@....linux.org.uk>, netdev@...r.kernel.org
Subject: [PATCH 30/30] net: ethernet: smsc: smc91x: Mark 'pkt_len' as __maybe_unused
'pkt_len' is used to interact with a hardware register. It might not
be safe to remove it entirely. Mark it as __maybe_unused instead.
Fixes the following W=1 kernel build warning(s):
drivers/net/ethernet/smsc/smc91x.c: In function ‘smc_tx’:
drivers/net/ethernet/smsc/smc91x.c:706:51: warning: variable ‘pkt_len’ set but not used [-Wunused-but-set-variable]
Cc: Nicolas Pitre <nico@...xnic.net>
Cc: "David S. Miller" <davem@...emloft.net>
Cc: Jakub Kicinski <kuba@...nel.org>
Cc: Erik Stahlman <erik@...edu>
Cc: Peter Cammaert <pc@...kart.be>
Cc: Daris A Nevil <dnevil@...c.com>
Cc: Russell King <rmk@....linux.org.uk>
Cc: netdev@...r.kernel.org
Signed-off-by: Lee Jones <lee.jones@...aro.org>
---
drivers/net/ethernet/smsc/smc91x.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/smsc/smc91x.c b/drivers/net/ethernet/smsc/smc91x.c
index b5d053292e717..a3f37b1f86491 100644
--- a/drivers/net/ethernet/smsc/smc91x.c
+++ b/drivers/net/ethernet/smsc/smc91x.c
@@ -703,7 +703,7 @@ 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, __maybe_unused pkt_len;
DBG(3, dev, "%s\n", __func__);
--
2.25.1
Powered by blists - more mailing lists