All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Nguyen <anthony.l.nguyen@intel.com>
To: davem@davemloft.net, kuba@kernel.org
Cc: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>,
	netdev@vger.kernel.org, sassmann@redhat.com,
	anthony.l.nguyen@intel.com,
	Tony Brelinski <tonyx.brelinski@intel.com>
Subject: [PATCH net-next 11/15] ice: Remove unnecessary variable
Date: Thu,  8 Apr 2021 09:13:17 -0700	[thread overview]
Message-ID: <20210408161321.3218024-12-anthony.l.nguyen@intel.com> (raw)
In-Reply-To: <20210408161321.3218024-1-anthony.l.nguyen@intel.com>

From: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>

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>
---
 drivers/net/ethernet/intel/ice/ice_main.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
index 6bc2215b674d..c81eb27e83a6 100644
--- a/drivers/net/ethernet/intel/ice/ice_main.c
+++ b/drivers/net/ethernet/intel/ice/ice_main.c
@@ -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;
@@ -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);
-- 
2.26.2


  parent reply	other threads:[~2021-04-08 16:12 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-08 16:13 [PATCH net-next 00/15][pull request] 100GbE Intel Wired LAN Driver Updates 2021-04-08 Tony Nguyen
2021-04-08 16:13 ` [PATCH net-next 01/15] ice: Re-send some AQ commands, as result of EBUSY AQ error Tony Nguyen
2021-04-08 16:13 ` [PATCH net-next 02/15] ice: Modify recursive way of adding nodes Tony Nguyen
2021-04-08 16:13 ` [PATCH net-next 03/15] ice: Align macro names to the specification Tony Nguyen
2021-04-08 16:13 ` [PATCH net-next 04/15] ice: Ignore EMODE return for opcode 0x0605 Tony Nguyen
2021-04-08 16:13 ` [PATCH net-next 05/15] ice: Remove unnecessary checker loop Tony Nguyen
2021-04-08 16:13 ` [PATCH net-next 06/15] ice: Rename a couple of variables Tony Nguyen
2021-04-08 16:13 ` [PATCH net-next 07/15] ice: Fix error return codes in ice_set_link_ksettings Tony Nguyen
2021-04-08 16:13 ` [PATCH net-next 08/15] ice: Replace some memsets and memcpys with assignment Tony Nguyen
2021-04-08 16:13 ` [PATCH net-next 09/15] ice: Use default configuration mode for PHY configuration Tony Nguyen
2021-04-08 16:13 ` [PATCH net-next 10/15] ice: Limit forced overrides based on FW version Tony Nguyen
2021-04-08 16:13 ` Tony Nguyen [this message]
2021-04-08 16:13 ` [PATCH net-next 12/15] ice: Use local variable instead of pointer derefs Tony Nguyen
2021-04-08 16:13 ` [PATCH net-next 13/15] ice: Remove rx_gro_dropped stat Tony Nguyen
2021-04-08 16:13 ` [PATCH net-next 14/15] ice: Remove unnecessary checks in add/kill_vid ndo ops Tony Nguyen
2021-04-08 16:13 ` [PATCH net-next 15/15] ice: Remove unnecessary blank line Tony Nguyen
2021-04-08 21:30 ` [PATCH net-next 00/15][pull request] 100GbE Intel Wired LAN Driver Updates 2021-04-08 patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210408161321.3218024-12-anthony.l.nguyen@intel.com \
    --to=anthony.l.nguyen@intel.com \
    --cc=anirudh.venkataramanan@intel.com \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=sassmann@redhat.com \
    --cc=tonyx.brelinski@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.