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: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>,
	netdev@vger.kernel.org, anthony.l.nguyen@intel.com,
	Tony Brelinski <tonyx.brelinski@intel.com>
Subject: [PATCH net-next 4/8] ice: remove local variable
Date: Thu, 17 Jun 2021 10:01:41 -0700	[thread overview]
Message-ID: <20210617170145.4092904-5-anthony.l.nguyen@intel.com> (raw)
In-Reply-To: <20210617170145.4092904-1-anthony.l.nguyen@intel.com>

From: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>

Remove the local variable since it's only used once. Instead, use it
directly.

Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@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 | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
index dbf4a5493ea7..5ca6c0356499 100644
--- a/drivers/net/ethernet/intel/ice/ice_main.c
+++ b/drivers/net/ethernet/intel/ice/ice_main.c
@@ -3078,7 +3078,6 @@ static void ice_set_netdev_features(struct net_device *netdev)
  */
 static int ice_cfg_netdev(struct ice_vsi *vsi)
 {
-	struct ice_pf *pf = vsi->back;
 	struct ice_netdev_priv *np;
 	struct net_device *netdev;
 	u8 mac_addr[ETH_ALEN];
@@ -3098,7 +3097,7 @@ static int ice_cfg_netdev(struct ice_vsi *vsi)
 	ice_set_ops(netdev);
 
 	if (vsi->type == ICE_VSI_PF) {
-		SET_NETDEV_DEV(netdev, ice_pf_to_dev(pf));
+		SET_NETDEV_DEV(netdev, ice_pf_to_dev(vsi->back));
 		ether_addr_copy(mac_addr, vsi->port_info->mac.perm_addr);
 		ether_addr_copy(netdev->dev_addr, mac_addr);
 		ether_addr_copy(netdev->perm_addr, mac_addr);
-- 
2.26.2


  parent reply	other threads:[~2021-06-17 16:59 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-17 17:01 [PATCH net-next 0/8][pull request] 100GbE Intel Wired LAN Driver Updates 2021-06-17 Tony Nguyen
2021-06-17 17:01 ` [PATCH net-next 1/8] ice: fix incorrect payload indicator on PTYPE Tony Nguyen
2021-06-17 17:01 ` [PATCH net-next 2/8] ice: mark PTYPE 2 as reserved Tony Nguyen
2021-06-17 17:01 ` [PATCH net-next 3/8] ice: reduce scope of variables Tony Nguyen
2021-06-17 17:01 ` Tony Nguyen [this message]
2021-06-17 17:01 ` [PATCH net-next 5/8] ice: Remove the repeated declaration Tony Nguyen
2021-06-17 17:01 ` [PATCH net-next 6/8] ice: remove unnecessary NULL checks before ptp_read_system_* Tony Nguyen
2021-06-17 17:01 ` [PATCH net-next 7/8] net: ice: ptp: fix compilation warning if PTP_1588_CLOCK is disabled Tony Nguyen
2021-06-17 17:01 ` [PATCH net-next 8/8] ice: remove redundant continue statement in a for-loop Tony Nguyen
2021-06-17 19:20 ` [PATCH net-next 0/8][pull request] 100GbE Intel Wired LAN Driver Updates 2021-06-17 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=20210617170145.4092904-5-anthony.l.nguyen@intel.com \
    --to=anthony.l.nguyen@intel.com \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=paul.m.stillwell.jr@intel.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.