Thread (8 messages) flat view 8 messages, 4 authors, 2018-07-05

Re: [PATCH] net: ethernet: sun: remove redundant variables adv and lpa

From: Dan Carpenter <hidden>
Date: 2018-07-05 09:52:38
Also in: kernel-janitors, lkml

On Thu, Jul 05, 2018 at 10:37:32AM +0100, Colin King wrote:
quoted hunk ↗ jump to hunk
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;
I'm fairly sure we could get rid of the mii_read() calls as well.

regards,
dan carpenter
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help