Browse Source

net: mscc: ocelot: remove set but not used variable 'phy_mode'

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>
Signed-off-by: David S. Miller <davem@davemloft.net>
YueHaibing 6 years ago
parent
commit
9e19dabc05
1 changed files with 0 additions and 3 deletions
  1. 0 3
      drivers/net/ethernet/mscc/ocelot_board.c

+ 0 - 3
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 phy_device *phy;
 		struct resource *res;
 		struct resource *res;
 		struct phy *serdes;
 		struct phy *serdes;
-		enum phy_mode phy_mode;
 		void __iomem *regs;
 		void __iomem *regs;
 		char res_name[8];
 		char res_name[8];
 		u32 port;
 		u32 port;
@@ -297,10 +296,8 @@ static int mscc_ocelot_probe(struct platform_device *pdev)
 		case PHY_INTERFACE_MODE_NA:
 		case PHY_INTERFACE_MODE_NA:
 			continue;
 			continue;
 		case PHY_INTERFACE_MODE_SGMII:
 		case PHY_INTERFACE_MODE_SGMII:
-			phy_mode = PHY_MODE_SGMII;
 			break;
 			break;
 		case PHY_INTERFACE_MODE_QSGMII:
 		case PHY_INTERFACE_MODE_QSGMII:
-			phy_mode = PHY_MODE_QSGMII;
 			break;
 			break;
 		default:
 		default:
 			dev_err(ocelot->dev,
 			dev_err(ocelot->dev,