Skip to content

Commit

Permalink
net: smc91x: Remove set but not used variable 'status' in smc_phy_con…
Browse files Browse the repository at this point in the history
…figure()

Fixes the following warning when using W=1 to build kernel:

drivers/net/ethernet/smsc/smc91x.c: In function ‘smc_phy_configure’:
drivers/net/ethernet/smsc/smc91x.c:1039:6: warning: variable ‘status’ set but not used [-Wunused-but-set-variable]
  int status;

Signed-off-by: Luo Jiaxing <luojiaxing@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Luo Jiaxing authored and David S. Miller committed Sep 11, 2020
1 parent 25ed57b commit 9984c0b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/net/ethernet/smsc/smc91x.c
Original file line number Diff line number Diff line change
Expand Up @@ -1036,7 +1036,6 @@ static void smc_phy_configure(struct work_struct *work)
int phyaddr = lp->mii.phy_id;
int my_phy_caps; /* My PHY capabilities */
int my_ad_caps; /* My Advertised capabilities */
int status;

DBG(3, dev, "smc_program_phy()\n");

Expand Down Expand Up @@ -1110,7 +1109,7 @@ static void smc_phy_configure(struct work_struct *work)
* auto-negotiation is restarted, sometimes it isn't ready and
* the link does not come up.
*/
status = smc_phy_read(dev, phyaddr, MII_ADVERTISE);
smc_phy_read(dev, phyaddr, MII_ADVERTISE);

DBG(2, dev, "phy caps=%x\n", my_phy_caps);
DBG(2, dev, "phy advertised caps=%x\n", my_ad_caps);
Expand Down

0 comments on commit 9984c0b

Please sign in to comment.