Netdev List
 help / color / mirror / Atom feed
* [PATCH net-next] net: mscc: ocelot: remove set but not used variable 'phy_mode'
@ 2018-10-08 14:07 YueHaibing
  2018-10-08 18:04 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: YueHaibing @ 2018-10-08 14:07 UTC (permalink / raw)
  To: Alexandre Belloni, David S. Miller; +Cc: YueHaibing, netdev, kernel-janitors

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

drivers/net/ethernet/mscc/ocelot_board.c: In function 'mscc_ocelot_probe':
drivers/net/ethernet/mscc/ocelot_board.c:262:17: warning:
 variable 'phy_mode' set but not used [-Wunused-but-set-variable]
   enum phy_mode phy_mode;

It never used since introduction in 
commit 71e32a20cfbf ("net: mscc: ocelot: make use of SerDes PHYs for handling their configuration")

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/net/ethernet/mscc/ocelot_board.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/net/ethernet/mscc/ocelot_board.c b/drivers/net/ethernet/mscc/ocelot_board.c
index 953b326..0cf0b09 100644
--- a/drivers/net/ethernet/mscc/ocelot_board.c
+++ b/drivers/net/ethernet/mscc/ocelot_board.c
@@ -259,7 +259,6 @@ static int mscc_ocelot_probe(struct platform_device *pdev)
 		struct phy_device *phy;
 		struct resource *res;
 		struct phy *serdes;
-		enum phy_mode phy_mode;
 		void __iomem *regs;
 		char res_name[8];
 		u32 port;
@@ -297,10 +296,8 @@ static int mscc_ocelot_probe(struct platform_device *pdev)
 		case PHY_INTERFACE_MODE_NA:
 			continue;
 		case PHY_INTERFACE_MODE_SGMII:
-			phy_mode = PHY_MODE_SGMII;
 			break;
 		case PHY_INTERFACE_MODE_QSGMII:
-			phy_mode = PHY_MODE_QSGMII;
 			break;
 		default:
 			dev_err(ocelot->dev,

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

end of thread, other threads:[~2018-10-09  1:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-08 14:07 [PATCH net-next] net: mscc: ocelot: remove set but not used variable 'phy_mode' YueHaibing
2018-10-08 18:04 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox