lkml.org 
[lkml]   [2018]   [Jul]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] net: ethernet: sun: remove redundant variables adv and lpa
Date
From: Colin Ian King <colin.king@canonical.com>

Variables adv and lpa are being assigned but are never used hence they
are redundant and can be removed.

Cleans up clang warnings:
warning: variable 'lpa' set but not used [-Wunused-but-set-variable]
warning: variable 'adv' set but not used [-Wunused-but-set-variable]

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/net/ethernet/sun/niu.c | 4 ----
1 file changed, 4 deletions(-)

diff --git a/drivers/net/ethernet/sun/niu.c b/drivers/net/ethernet/sun/niu.c
index 88c12474a0c3..2d6b62c6d9ab 100644
--- a/drivers/net/ethernet/sun/niu.c
+++ b/drivers/net/ethernet/sun/niu.c
@@ -1225,17 +1225,13 @@ static int link_status_1g_rgmii(struct niu *np, int *link_up_p)

bmsr = err;
if (bmsr & BMSR_LSTATUS) {
- u16 adv, lpa;
-
err = mii_read(np, np->phy_addr, MII_ADVERTISE);
if (err < 0)
goto out;
- adv = err;

err = mii_read(np, np->phy_addr, MII_LPA);
if (err < 0)
goto out;
- lpa = err;

err = mii_read(np, np->phy_addr, MII_ESTATUS);
if (err < 0)
--
2.17.1
\
 
 \ /
  Last update: 2018-07-05 11:38    [W:0.099 / U:0.336 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site