net: natsemi: Remove set but not used variable
authorZheng Yongjun <zhengyongjun3@huawei.com>
Mon, 21 Sep 2020 12:18:41 +0000 (20:18 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 21 Sep 2020 21:54:00 +0000 (14:54 -0700)
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/net/ethernet/natsemi/ns83820.c: In function ns83820_get_link_ksettings:
drivers/net/ethernet/natsemi/ns83820.c:1210:11: warning: variable ‘tanar’ set but not used [-Wunused-but-set-variable]

`tanar` is never used, so remove it.

Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/natsemi/ns83820.c

index f59f96f..4c1f533 100644 (file)
@@ -1204,7 +1204,7 @@ static int ns83820_get_link_ksettings(struct net_device *ndev,
                                      struct ethtool_link_ksettings *cmd)
 {
        struct ns83820 *dev = PRIV(ndev);
-       u32 cfg, tanar, tbicr;
+       u32 cfg, tbicr;
        int fullduplex   = 0;
        u32 supported;
 
@@ -1223,7 +1223,7 @@ static int ns83820_get_link_ksettings(struct net_device *ndev,
 
        /* read current configuration */
        cfg   = readl(dev->base + CFG) ^ SPDSTS_POLARITY;
-       tanar = readl(dev->base + TANAR);
+       readl(dev->base + TANAR);
        tbicr = readl(dev->base + TBICR);
 
        fullduplex = (cfg & CFG_DUPSTS) ? 1 : 0;