Commit 803cc523 authored by Sasha Neftin's avatar Sasha Neftin Committed by Jeff Kirsher

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.
Signed-off-by: default avatarSasha Neftin <sasha.neftin@intel.com>
Tested-by: default avatarAaron Brown <aaron.f.brown@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 59f58708
...@@ -152,7 +152,6 @@ void igc_power_down_phy_copper(struct igc_hw *hw) ...@@ -152,7 +152,6 @@ void igc_power_down_phy_copper(struct igc_hw *hw)
s32 igc_check_downshift(struct igc_hw *hw) s32 igc_check_downshift(struct igc_hw *hw)
{ {
struct igc_phy_info *phy = &hw->phy; struct igc_phy_info *phy = &hw->phy;
u16 phy_data, offset, mask;
s32 ret_val; s32 ret_val;
switch (phy->type) { switch (phy->type) {
...@@ -161,15 +160,8 @@ s32 igc_check_downshift(struct igc_hw *hw) ...@@ -161,15 +160,8 @@ s32 igc_check_downshift(struct igc_hw *hw)
/* speed downshift not supported */ /* speed downshift not supported */
phy->speed_downgraded = false; phy->speed_downgraded = false;
ret_val = 0; 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; return ret_val;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment