Commit dda458d2 authored by YueHaibing's avatar YueHaibing Committed by Jeff Kirsher

igc: Remove set but not used variables 'ctrl_ext, link_mode'

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/net/ethernet/intel/igc/igc_base.c: In function 'igc_init_phy_params_base':
drivers/net/ethernet/intel/igc/igc_base.c:240:6: warning:
 variable 'ctrl_ext' set but not used [-Wunused-but-set-variable]
  u32 ctrl_ext;

drivers/net/ethernet/intel/igc/igc_base.c: In function 'igc_get_invariants_base':
drivers/net/ethernet/intel/igc/igc_base.c:290:6: warning:
 variable 'link_mode' set but not used [-Wunused-but-set-variable]
  u32 link_mode = 0;

It never used since introduction in
commit c0071c7a ("igc: Add HW initialization code")
Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
Acked-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 540a152d
...@@ -237,7 +237,6 @@ static s32 igc_init_phy_params_base(struct igc_hw *hw) ...@@ -237,7 +237,6 @@ static s32 igc_init_phy_params_base(struct igc_hw *hw)
{ {
struct igc_phy_info *phy = &hw->phy; struct igc_phy_info *phy = &hw->phy;
s32 ret_val = 0; s32 ret_val = 0;
u32 ctrl_ext;
if (hw->phy.media_type != igc_media_type_copper) { if (hw->phy.media_type != igc_media_type_copper) {
phy->type = igc_phy_none; phy->type = igc_phy_none;
...@@ -247,8 +246,6 @@ static s32 igc_init_phy_params_base(struct igc_hw *hw) ...@@ -247,8 +246,6 @@ static s32 igc_init_phy_params_base(struct igc_hw *hw)
phy->autoneg_mask = AUTONEG_ADVERTISE_SPEED_DEFAULT_2500; phy->autoneg_mask = AUTONEG_ADVERTISE_SPEED_DEFAULT_2500;
phy->reset_delay_us = 100; phy->reset_delay_us = 100;
ctrl_ext = rd32(IGC_CTRL_EXT);
/* set lan id */ /* set lan id */
hw->bus.func = (rd32(IGC_STATUS) & IGC_STATUS_FUNC_MASK) >> hw->bus.func = (rd32(IGC_STATUS) & IGC_STATUS_FUNC_MASK) >>
IGC_STATUS_FUNC_SHIFT; IGC_STATUS_FUNC_SHIFT;
...@@ -287,8 +284,6 @@ static s32 igc_init_phy_params_base(struct igc_hw *hw) ...@@ -287,8 +284,6 @@ static s32 igc_init_phy_params_base(struct igc_hw *hw)
static s32 igc_get_invariants_base(struct igc_hw *hw) static s32 igc_get_invariants_base(struct igc_hw *hw)
{ {
struct igc_mac_info *mac = &hw->mac; struct igc_mac_info *mac = &hw->mac;
u32 link_mode = 0;
u32 ctrl_ext = 0;
s32 ret_val = 0; s32 ret_val = 0;
switch (hw->device_id) { switch (hw->device_id) {
...@@ -302,9 +297,6 @@ static s32 igc_get_invariants_base(struct igc_hw *hw) ...@@ -302,9 +297,6 @@ static s32 igc_get_invariants_base(struct igc_hw *hw)
hw->phy.media_type = igc_media_type_copper; hw->phy.media_type = igc_media_type_copper;
ctrl_ext = rd32(IGC_CTRL_EXT);
link_mode = ctrl_ext & IGC_CTRL_EXT_LINK_MODE_MASK;
/* mac initialization and operations */ /* mac initialization and operations */
ret_val = igc_init_mac_params_base(hw); ret_val = igc_init_mac_params_base(hw);
if (ret_val) if (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