Skip to content

Commit

Permalink
ice: Remove unnecessary variable
Browse files Browse the repository at this point in the history
In ice_init_phy_user_cfg, vsi is used only to get to hw. Remove this
and just use pi->hw

Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>
Tested-by: Tony Brelinski <tonyx.brelinski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
  • Loading branch information
Anirudh Venkataramanan authored and Tony Nguyen committed Apr 8, 2021
1 parent 75751c8 commit dc6aaa1
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions drivers/net/ethernet/intel/ice/ice_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1791,16 +1791,11 @@ static int ice_init_phy_user_cfg(struct ice_port_info *pi)
struct ice_phy_info *phy = &pi->phy;
struct ice_pf *pf = pi->hw->back;
enum ice_status status;
struct ice_vsi *vsi;
int err = 0;

if (!(phy->link_info.link_info & ICE_AQ_MEDIA_AVAILABLE))
return -EIO;

vsi = ice_get_main_vsi(pf);
if (!vsi)
return -EINVAL;

pcaps = kzalloc(sizeof(*pcaps), GFP_KERNEL);
if (!pcaps)
return -ENOMEM;
Expand All @@ -1820,7 +1815,7 @@ static int ice_init_phy_user_cfg(struct ice_port_info *pi)
ice_copy_phy_caps_to_cfg(pi, pcaps, &pi->phy.curr_user_phy_cfg);

/* check if lenient mode is supported and enabled */
if (ice_fw_supports_link_override(&vsi->back->hw) &&
if (ice_fw_supports_link_override(pi->hw) &&
!(pcaps->module_compliance_enforcement &
ICE_AQC_MOD_ENFORCE_STRICT_MODE)) {
set_bit(ICE_FLAG_LINK_LENIENT_MODE_ENA, pf->flags);
Expand Down

0 comments on commit dc6aaa1

Please sign in to comment.