netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: 3com: 3c59x: remove set but not used variable 'mii_reg1'
@ 2020-01-03 12:19 yu kuai
  2020-01-03 14:46 ` Matthew Wilcox
  0 siblings, 1 reply; 10+ messages in thread
From: yu kuai @ 2020-01-03 12:19 UTC (permalink / raw)
  To: klassert, davem, hkallweit1, jakub.kicinski, hslester96, mst
  Cc: yang.wei9, willy, netdev, linux-kernel, yukuai3, yi.zhang,
	zhengbin13

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/net/ethernet/3com/3c59x.c: In function ‘vortex_up’:
drivers/net/ethernet/3com/3c59x.c:1551:9: warning: variable
‘mii_reg1’ set but not used [-Wunused-but-set-variable]

It is never used, and so can be removed.

Signed-off-by: yu kuai <yukuai3@huawei.com>
---
 drivers/net/ethernet/3com/3c59x.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/3com/3c59x.c b/drivers/net/ethernet/3com/3c59x.c
index fc046797c0ea..6e537e5dc208 100644
--- a/drivers/net/ethernet/3com/3c59x.c
+++ b/drivers/net/ethernet/3com/3c59x.c
@@ -1548,7 +1548,7 @@ vortex_up(struct net_device *dev)
 	struct vortex_private *vp = netdev_priv(dev);
 	void __iomem *ioaddr = vp->ioaddr;
 	unsigned int config;
-	int i, mii_reg1, mii_reg5, err = 0;
+	int i, mii_reg5, err = 0;
 
 	if (VORTEX_PCI(vp)) {
 		pci_set_power_state(VORTEX_PCI(vp), PCI_D0);	/* Go active */
@@ -1605,7 +1605,6 @@ vortex_up(struct net_device *dev)
 	window_write32(vp, config, 3, Wn3_Config);
 
 	if (dev->if_port == XCVR_MII || dev->if_port == XCVR_NWAY) {
-		mii_reg1 = mdio_read(dev, vp->phys[0], MII_BMSR);
 		mii_reg5 = mdio_read(dev, vp->phys[0], MII_LPA);
 		vp->partner_flow_ctrl = ((mii_reg5 & 0x0400) != 0);
 		vp->mii.full_duplex = vp->full_duplex;
-- 
2.17.2


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-01-06 12:48 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-03 12:19 [PATCH] net: 3com: 3c59x: remove set but not used variable 'mii_reg1' yu kuai
2020-01-03 14:46 ` Matthew Wilcox
2020-01-03 14:59   ` Michal Kubecek
2020-01-03 17:53   ` Andrew Lunn
2020-01-03 18:17     ` Michal Kubecek
2020-01-03 19:13     ` Vladimir Oltean
2020-01-03 19:17       ` Florian Fainelli
2020-01-03 19:37         ` Andrew Lunn
     [not found]           ` <CAP8WD_a6QJNz2mUpz_eCaNReoZKVAdL0TpoF-m+gA4VPWRrrMg@mail.gmail.com>
2020-01-03 20:03             ` tedheadster
2020-01-06 12:48           ` yukuai (C)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).