summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZheng Yongjun <zhengyongjun3@huawei.com>2020-09-21 20:18:41 +0800
committerDavid S. Miller <davem@davemloft.net>2020-09-21 14:54:00 -0700
commit3ba6baf64b9a967d731b9c93e3dcd64bd82db83d (patch)
tree72702bd7c00bb75b8e99515606fc78465e6c891b
parentc8c33b80f4e83d3e29623fb08d935fa152f6a3db (diff)
net: natsemi: Remove set but not used variable
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>
-rw-r--r--drivers/net/ethernet/natsemi/ns83820.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/natsemi/ns83820.c b/drivers/net/ethernet/natsemi/ns83820.c
index f59f96fbbef6..4c1f53339019 100644
--- a/drivers/net/ethernet/natsemi/ns83820.c
+++ b/drivers/net/ethernet/natsemi/ns83820.c
@@ -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;