Skip to contentSkip to conversation

igc: Remove unreachable code from igc_phy.c file

PATCH New Sasha Neftin 2 participants 2 messages Dec 11, 2018 – Jan 5, 2019

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

PATCH 1/1 igc: Remove unreachable code from igc_phy.c file

Address community comment.
Remove the unreachable code leads to the static checker warning. PHY functionality will be added later per demand. Reported by Dan Carpenter.

---
 drivers/net/ethernet/intel/igc/igc_phy.c | 8 --------
 1 file changed, 8 deletions(-)
drivers/net/ethernet/intel/igc/igc_phy.c +0 -8
index 38e43e6fc1c7..4c8f96a9a148 100644
@@ -152,7 +152,6 @@ void igc_power_down_phy_copper(struct igc_hw *hw)
 s32 igc_check_downshift(struct igc_hw *hw)
 {
 	struct igc_phy_info *phy = &hw->phy;
-	u16 phy_data, offset, mask;
 	s32 ret_val;
 
 	switch (phy->type) {
@@ -161,15 +160,8 @@ s32 igc_check_downshift(struct igc_hw *hw)
 		/* speed downshift not supported */
 		phy->speed_downgraded = false;
 		ret_val = 0;
-		goto out;
 	}
 
-	ret_val = phy->ops.read_reg(hw, offset, &phy_data);
-
-	if (!ret_val)
-		phy->speed_downgraded = (phy_data & mask) ? true : false;
-
-out:
 	return ret_val;
 }
 
Signature · 1 line
2.11.0
#1 lore raw

PATCH 1/1 igc: Remove unreachable code from igc_phy.c file

Quoted 12 lines

From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On Behalf Of Sasha Neftin
Sent: Tuesday, December 11, 2018 8:56 AM
To: intel-wired-lan at lists.osuosl.org
Subject: [Intel-wired-lan] [PATCH 1/1] igc: Remove unreachable code from igc_phy.c file

Address community comment.
Remove the unreachable code leads to the static checker warning. PHY functionality will be added later per demand. Reported by Dan Carpenter.

Quoted 5 lines
---
 drivers/net/ethernet/intel/igc/igc_phy.c | 8 --------
 1 file changed, 8 deletions(-)