diff options
author | Sasha Neftin <sasha.neftin@intel.com> | 2018-12-11 11:55:41 -0500 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2019-02-05 19:08:54 -0500 |
commit | 803cc52323e0c863d3f08740b8c156593a5ca1e9 (patch) | |
tree | 904218b093d5c5f0b3769699424639a323f1ef26 /drivers/net/ethernet/intel/igc/igc_phy.c | |
parent | 59f58708c5047289589cbf6ee95146b76cf57d1e (diff) |
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: Sasha Neftin <sasha.neftin@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/igc/igc_phy.c')
-rw-r--r-- | drivers/net/ethernet/intel/igc/igc_phy.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/drivers/net/ethernet/intel/igc/igc_phy.c b/drivers/net/ethernet/intel/igc/igc_phy.c index 38e43e6fc1c7..4c8f96a9a148 100644 --- a/drivers/net/ethernet/intel/igc/igc_phy.c +++ b/drivers/net/ethernet/intel/igc/igc_phy.c | |||
@@ -152,7 +152,6 @@ void igc_power_down_phy_copper(struct igc_hw *hw) | |||
152 | s32 igc_check_downshift(struct igc_hw *hw) | 152 | s32 igc_check_downshift(struct igc_hw *hw) |
153 | { | 153 | { |
154 | struct igc_phy_info *phy = &hw->phy; | 154 | struct igc_phy_info *phy = &hw->phy; |
155 | u16 phy_data, offset, mask; | ||
156 | s32 ret_val; | 155 | s32 ret_val; |
157 | 156 | ||
158 | switch (phy->type) { | 157 | switch (phy->type) { |
@@ -161,15 +160,8 @@ s32 igc_check_downshift(struct igc_hw *hw) | |||
161 | /* speed downshift not supported */ | 160 | /* speed downshift not supported */ |
162 | phy->speed_downgraded = false; | 161 | phy->speed_downgraded = false; |
163 | ret_val = 0; | 162 | ret_val = 0; |
164 | goto out; | ||
165 | } | 163 | } |
166 | 164 | ||
167 | ret_val = phy->ops.read_reg(hw, offset, &phy_data); | ||
168 | |||
169 | if (!ret_val) | ||
170 | phy->speed_downgraded = (phy_data & mask) ? true : false; | ||
171 | |||
172 | out: | ||
173 | return ret_val; | 165 | return ret_val; |
174 | } | 166 | } |
175 | 167 | ||