]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
i40e: trivial: cleanup use of pf->hw
authorJesse Brandeburg <jesse.brandeburg@intel.com>
Fri, 15 Jan 2016 22:33:11 +0000 (14:33 -0800)
committerTim Gardner <tim.gardner@canonical.com>
Wed, 6 Apr 2016 09:20:39 +0000 (10:20 +0100)
BugLink: http://bugs.launchpad.net/bugs/1547674
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>
(cherry picked from net-next commit f734dfff2f2bc2d92c392fbcfe2039893a8cdd08)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
drivers/net/ethernet/intel/i40e/i40e_main.c

index 212320c35a5172cd3e31647854c142b3995fde07..f81efd76f4461921b97e5b0eec7c5706d1d4f21b 100644 (file)
@@ -11210,8 +11210,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",
@@ -11219,7 +11219,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",
@@ -11247,7 +11247,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));