Commit 4ed88df7 authored by Colin Ian King's avatar Colin Ian King Committed by David S. Miller

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: default avatarColin Ian King <colin.king@canonical.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2727eac6
...@@ -1225,25 +1225,9 @@ static int link_status_1g_rgmii(struct niu *np, int *link_up_p) ...@@ -1225,25 +1225,9 @@ static int link_status_1g_rgmii(struct niu *np, int *link_up_p)
bmsr = err; bmsr = err;
if (bmsr & BMSR_LSTATUS) { 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)
goto out;
link_up = 1; link_up = 1;
current_speed = SPEED_1000; current_speed = SPEED_1000;
current_duplex = DUPLEX_FULL; current_duplex = DUPLEX_FULL;
} }
lp->active_speed = current_speed; lp->active_speed = current_speed;
lp->active_duplex = current_duplex; lp->active_duplex = current_duplex;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment