]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
net: ethernet: 3com: 3c574_cs: Remove set but unused variables 'tx' and 'rx'
authorLee Jones <lee.jones@linaro.org>
Fri, 14 Aug 2020 11:39:06 +0000 (12:39 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sat, 15 Aug 2020 03:42:25 +0000 (20:42 -0700)
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@davemloft.net>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: Shannon Nelson <snelson@pensando.io>
Cc: Heiner Kallweit <hkallweit1@gmail.com>
Cc: Martin Habets <mhabets@solarflare.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Donald Becker <becker@scyld.com>
Cc: David Hinds <dahinds@users.sourceforge.net>
Cc: netdev@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/3com/3c574_cs.c

index ef1c3151fbb248b4bd4ecf3a699c047a2c1bd42d..bd0ada4e81b0f0c7495e6a38173593d08934ffc4 100644 (file)
@@ -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);