From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: Jesse Brandeburg <jesse.brandeburg@intel.com>,
	netdev@vger.kernel.org, nhorman@redhat.com, sassmann@redhat.com,
	jogreene@redhat.com, Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next 04/15] i40e: trivial: cleanup use of pf->hw
Date: Thu, 18 Feb 2016 01:04:01 -0800	[thread overview]
Message-ID: <1455786252-71881-5-git-send-email-jeffrey.t.kirsher@intel.com> (raw)
In-Reply-To: <1455786252-71881-1-git-send-email-jeffrey.t.kirsher@intel.com>
From: Jesse Brandeburg <jesse.brandeburg@intel.com>
This patch makes use of a pointer called hw consistent
in the i40e_remove function.
Change-ID: Idacc7ff0a09a68289c57457a78618bf5497de077
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/i40e/i40e_main.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 8d41c6c..161603b 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -11219,8 +11219,8 @@ static void i40e_remove(struct pci_dev *pdev)
 		i40e_vsi_release(pf->vsi[pf->lan_vsi]);
 
 	/* shutdown and destroy the HMC */
-	if (pf->hw.hmc.hmc_obj) {
-		ret_code = i40e_shutdown_lan_hmc(&pf->hw);
+	if (hw->hmc.hmc_obj) {
+		ret_code = i40e_shutdown_lan_hmc(hw);
 		if (ret_code)
 			dev_warn(&pdev->dev,
 				 "Failed to destroy the HMC resources: %d\n",
@@ -11228,7 +11228,7 @@ static void i40e_remove(struct pci_dev *pdev)
 	}
 
 	/* shutdown the adminq */
-	ret_code = i40e_shutdown_adminq(&pf->hw);
+	ret_code = i40e_shutdown_adminq(hw);
 	if (ret_code)
 		dev_warn(&pdev->dev,
 			 "Failed to destroy the Admin Queue resources: %d\n",
@@ -11256,7 +11256,7 @@ static void i40e_remove(struct pci_dev *pdev)
 	kfree(pf->qp_pile);
 	kfree(pf->vsi);
 
-	iounmap(pf->hw.hw_addr);
+	iounmap(hw->hw_addr);
 	kfree(pf);
 	pci_release_selected_regions(pdev,
 				     pci_select_bars(pdev, IORESOURCE_MEM));
-- 
2.5.0
next prev parent reply	other threads:[~2016-02-18  9:04 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-18  9:03 [net-next 00/15][pull request] 40GbE Intel Wired LAN Driver Updates 2016-02-17 Jeff Kirsher
2016-02-18  9:03 ` [net-next 01/15] i40e: get rid of magic number Jeff Kirsher
2016-02-18  9:03 ` [net-next 02/15] i40e: drop unused debugfs file "dump" Jeff Kirsher
2016-02-18  9:04 ` [net-next 03/15] i40evf: support packet split receive Jeff Kirsher
2016-02-18  9:04 ` Jeff Kirsher [this message]
2016-02-18  9:04 ` [net-next 05/15] i40e: Add a SW workaround for lost interrupts Jeff Kirsher
2016-02-18  9:04 ` [net-next 06/15] i40e: Fix PROMISC mode for Multi-function per port (MFP) devices Jeff Kirsher
2016-02-18  9:04 ` [net-next 07/15] i40e: Removal of code which relies on BASE VEB SEID Jeff Kirsher
2016-02-18  9:04 ` [net-next 08/15] i40e/i40evf: avoid atomics Jeff Kirsher
2016-02-18  9:04 ` [net-next 09/15] i40e: Do not disable queues in the Legacy/MSI Interrupt handler Jeff Kirsher
2016-02-18  9:04 ` [net-next 10/15] i40e: expand comment Jeff Kirsher
2016-02-18  9:04 ` [net-next 11/15] i40e: better error reporting for nvmupdate Jeff Kirsher
2016-02-18  9:04 ` [net-next 12/15] i40evf: set adapter state on reset failure Jeff Kirsher
2016-02-18  9:04 ` [net-next 13/15] i40e: clean event descriptor before use Jeff Kirsher
2016-02-18  9:04 ` [net-next 14/15] i40e: When in promisc mode apply promisc mode to Tx Traffic as well Jeff Kirsher
2016-02-18  9:04 ` [net-next 15/15] i40e/i40evf: Bump i40e to 1.4.15 and i40evf to 1.4.11 Jeff Kirsher
2016-02-18 15:33 ` [net-next 00/15][pull request] 40GbE Intel Wired LAN Driver Updates 2016-02-17 David Miller
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=1455786252-71881-5-git-send-email-jeffrey.t.kirsher@intel.com \
    --to=jeffrey.t.kirsher@intel.com \
    --cc=davem@davemloft.net \
    --cc=jesse.brandeburg@intel.com \
    --cc=jogreene@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@redhat.com \
    --cc=sassmann@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).