[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20200814113933.1903438-4-lee.jones@linaro.org>
Date: Fri, 14 Aug 2020 12:39:06 +0100
From: Lee Jones <lee.jones@...aro.org>
To: davem@...emloft.net, kuba@...nel.org
Cc: linux-kernel@...r.kernel.org, Lee Jones <lee.jones@...aro.org>,
Shannon Nelson <snelson@...sando.io>,
Heiner Kallweit <hkallweit1@...il.com>,
Martin Habets <mhabets@...arflare.com>,
"Michael S. Tsirkin" <mst@...hat.com>,
Donald Becker <becker@...ld.com>,
David Hinds <dahinds@...rs.sourceforge.net>,
netdev@...r.kernel.org
Subject: [PATCH 03/30] net: ethernet: 3com: 3c574_cs: Remove set but unused variables 'tx' and 'rx'
Fixes the following W=1 kernel build warning(s):
drivers/net/ethernet/3com/3c574_cs.c: In function ‘update_stats’:
drivers/net/ethernet/3com/3c574_cs.c:954:9: warning: variable ‘tx’ set but not used [-Wunused-but-set-variable]
954 | u8 rx, tx, up;
| ^~
drivers/net/ethernet/3com/3c574_cs.c:954:5: warning: variable ‘rx’ set but not used [-Wunused-but-set-variable]
954 | u8 rx, tx, up;
| ^~
Cc: "David S. Miller" <davem@...emloft.net>
Cc: Jakub Kicinski <kuba@...nel.org>
Cc: Shannon Nelson <snelson@...sando.io>
Cc: Heiner Kallweit <hkallweit1@...il.com>
Cc: Martin Habets <mhabets@...arflare.com>
Cc: "Michael S. Tsirkin" <mst@...hat.com>
Cc: Donald Becker <becker@...ld.com>
Cc: David Hinds <dahinds@...rs.sourceforge.net>
Cc: netdev@...r.kernel.org
Signed-off-by: Lee Jones <lee.jones@...aro.org>
---
drivers/net/ethernet/3com/3c574_cs.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/3com/3c574_cs.c b/drivers/net/ethernet/3com/3c574_cs.c
index ef1c3151fbb24..bd0ada4e81b0f 100644
--- a/drivers/net/ethernet/3com/3c574_cs.c
+++ b/drivers/net/ethernet/3com/3c574_cs.c
@@ -951,7 +951,7 @@ static struct net_device_stats *el3_get_stats(struct net_device *dev)
static void update_stats(struct net_device *dev)
{
unsigned int ioaddr = dev->base_addr;
- u8 rx, tx, up;
+ u8 up;
pr_debug("%s: updating the statistics.\n", dev->name);
@@ -972,8 +972,8 @@ static void update_stats(struct net_device *dev)
dev->stats.tx_packets += (up&0x30) << 4;
/* Rx packets */ inb(ioaddr + 7);
/* Tx deferrals */ inb(ioaddr + 8);
- rx = inw(ioaddr + 10);
- tx = inw(ioaddr + 12);
+ /* rx */ inw(ioaddr + 10);
+ /* tx */ inw(ioaddr + 12);
EL3WINDOW(4);
/* BadSSD */ inb(ioaddr + 12);
--
2.25.1
Powered by blists - more mailing lists