Skip to contentSkip to conversation

net: marvell.c fix sparse shadowed variable warning

PATCH Applied Harvey Harrison 2 participants 2 messages Apr 3, 2008 – Apr 4, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 2/7 net: marvell.c fix sparse shadowed variable warning

The other if blocks don't redeclare temp, remove the redeclaration in the final if() block.

drivers/net/phy/marvell.c:214:7: warning: symbol 'temp' shadows an earlier one drivers/net/phy/marvell.c:160:6: originally declared here

---
 drivers/net/phy/marvell.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
drivers/net/phy/marvell.c +0 -2
index 3353991..32a8503 100644
@@ -211,8 +211,6 @@ static int m88e1111_config_init(struct phy_device *phydev)
 	}
 
 	if (phydev->interface == PHY_INTERFACE_MODE_SGMII) {
-		int temp;
-
 		temp = phy_read(phydev, MII_M1111_PHY_EXT_SR);
 		if (temp < 0)
 			return temp;
Signature · 1 line
1.5.5.rc1.135.g8527
Applied
#1 lore raw
Quoted 16 lines · Harvey Harrison

The other if blocks don't redeclare temp, remove the redeclaration in the final if() block.

drivers/net/phy/marvell.c:214:7: warning: symbol 'temp' shadows an earlier one drivers/net/phy/marvell.c:160:6: originally declared here

---
 drivers/net/phy/marvell.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
drivers/net/phy/marvell.c +0 -0
index 3353991..32a8503 100644

drivers/net/phy/marvell.c static int m88e1111_config_init(struct phy_device *phydev) · line 215

Quoted 5 lines
drivers/net/phy/marvell.c +0 -2
@@ -211,8 +211,6 @@ static int m88e1111_config_init(struct phy_device *phydev)
 	}
 
 	if (phydev->interface == PHY_INTERFACE_MODE_SGMII) {
-		int temp;
-

applied