diff options
author | Jiapeng Chong <jiapeng.chong@linux.alibaba.com> | 2021-04-25 13:35:18 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-04-26 22:46:10 +0300 |
commit | 930d2d619d0a341693af4a7db9b37b96434ac65e (patch) | |
tree | e9bed78e5dfae277c7204f665c69a9c49a061f7a /drivers | |
parent | eb43c081a6df85e3119226b932ddb9a9572b26e4 (diff) | |
download | linux-930d2d619d0a341693af4a7db9b37b96434ac65e.tar.xz |
pcnet32: Remove redundant variable prev_link and curr_link
Variable prev_link and curr_link is being assigned a value from a
calculation however the variable is never read, so this redundant
variable can be removed.
Cleans up the following clang-analyzer warning:
drivers/net/ethernet/amd/pcnet32.c:2857:4: warning: Value stored to
'prev_link' is never read [clang-analyzer-deadcode.DeadStores].
drivers/net/ethernet/amd/pcnet32.c:2856:4: warning: Value stored to
'curr_link' is never read [clang-analyzer-deadcode.DeadStores].
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/amd/pcnet32.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/ethernet/amd/pcnet32.c b/drivers/net/ethernet/amd/pcnet32.c index f78daba60b35..aa412506832d 100644 --- a/drivers/net/ethernet/amd/pcnet32.c +++ b/drivers/net/ethernet/amd/pcnet32.c @@ -2853,8 +2853,7 @@ static void pcnet32_check_media(struct net_device *dev, int verbose) netif_info(lp, link, dev, "link down\n"); } if (lp->phycount > 1) { - curr_link = pcnet32_check_otherphy(dev); - prev_link = 0; + pcnet32_check_otherphy(dev); } } else if (verbose || !prev_link) { netif_carrier_on(dev); |