diff options
author | Colin Ian King <colin.king@canonical.com> | 2018-07-05 07:05:25 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-07-05 07:07:40 -0400 |
commit | 4ed88df766704633459d8fddce1c1c87e1acb844 (patch) | |
tree | 6b56b4cbfb80be933a4c4095ebd4748c4c7f9aae | |
parent | 2727eac605bb4787ae43eff6e022196f5297e329 (diff) |
net: ethernet: sun: remove redundant variables adv and lpa and mii_reads
Variables adv and lpa are being assigned but are never used hence they
are redundant and can be removed. Also remove the unncessary mii_reads
too.
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/sun/niu.c | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/drivers/net/ethernet/sun/niu.c b/drivers/net/ethernet/sun/niu.c index 88c12474a0c3..9319d84bf49f 100644 --- a/drivers/net/ethernet/sun/niu.c +++ b/drivers/net/ethernet/sun/niu.c | |||
@@ -1225,25 +1225,9 @@ static int link_status_1g_rgmii(struct niu *np, int *link_up_p) | |||
1225 | 1225 | ||
1226 | bmsr = err; | 1226 | bmsr = err; |
1227 | if (bmsr & BMSR_LSTATUS) { | 1227 | if (bmsr & BMSR_LSTATUS) { |
1228 | u16 adv, lpa; | ||
1229 | |||
1230 | err = mii_read(np, np->phy_addr, MII_ADVERTISE); | ||
1231 | if (err < 0) | ||
1232 | goto out; | ||
1233 | adv = err; | ||
1234 | |||
1235 | err = mii_read(np, np->phy_addr, MII_LPA); | ||
1236 | if (err < 0) | ||
1237 | goto out; | ||
1238 | lpa = err; | ||
1239 | |||
1240 | err = mii_read(np, np->phy_addr, MII_ESTATUS); | ||
1241 | if (err < 0) | ||
1242 | goto out; | ||
1243 | link_up = 1; | 1228 | link_up = 1; |
1244 | current_speed = SPEED_1000; | 1229 | current_speed = SPEED_1000; |
1245 | current_duplex = DUPLEX_FULL; | 1230 | current_duplex = DUPLEX_FULL; |
1246 | |||
1247 | } | 1231 | } |
1248 | lp->active_speed = current_speed; | 1232 | lp->active_speed = current_speed; |
1249 | lp->active_duplex = current_duplex; | 1233 | lp->active_duplex = current_duplex; |