netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: Peter Senna Tschudin <peter.senna@gmail.com>,
	netdev@vger.kernel.org, gospo@redhat.com, sassmann@redhat.com,
	Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next 11/13] INTEL-IGB: Convert iounmap to pci_iounmap
Date: Mon, 31 Mar 2014 16:34:57 -0700	[thread overview]
Message-ID: <1396308899-20926-12-git-send-email-jeffrey.t.kirsher@intel.com> (raw)
In-Reply-To: <1396308899-20926-1-git-send-email-jeffrey.t.kirsher@intel.com>

From: Peter Senna Tschudin <peter.senna@gmail.com>

Use pci_iounmap instead of iounmap when the virtual mapping was done
with pci_iomap. A simplified version of the semantic patch that finds this
issue is as follows: (http://coccinelle.lip6.fr/)

// <smpl>
@r@
expression addr;
@@
addr = pci_iomap(...)

@rr@
expression r.addr;
@@
* iounmap(addr)
// </smpl>

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/igb/igb_main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index 55fc559..3019818 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -2652,7 +2652,7 @@ err_eeprom:
 		iounmap(hw->flash_address);
 err_sw_init:
 	igb_clear_interrupt_scheme(adapter);
-	iounmap(hw->hw_addr);
+	pci_iounmap(pdev, hw->hw_addr);
 err_ioremap:
 	free_netdev(netdev);
 err_alloc_etherdev:
@@ -2819,7 +2819,7 @@ static void igb_remove(struct pci_dev *pdev)
 	igb_disable_sriov(pdev);
 #endif
 
-	iounmap(hw->hw_addr);
+	pci_iounmap(pdev, hw->hw_addr);
 	if (hw->flash_address)
 		iounmap(hw->flash_address);
 	pci_release_selected_regions(pdev,
-- 
1.9.0

  parent reply	other threads:[~2014-03-31 23:36 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-31 23:34 [net-next 00/13][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
2014-03-31 23:34 ` [net-next 01/13] e1000e: Fix no connectivity when driver loaded with cable out Jeff Kirsher
2014-04-01 12:06   ` Sergei Shtylyov
2014-04-01 12:30   ` Fabio Estevam
2014-04-01 16:07     ` Thomas Gleixner
2014-04-18 13:15   ` Ben Hutchings
2014-04-18 15:27     ` Ertman, DavidX M
2014-03-31 23:34 ` [net-next 02/13] ixgbe: remove redundant if clause from PTP work Jeff Kirsher
2014-03-31 23:34 ` [net-next 03/13] ixgbe: never generate both software and hardware timestamps Jeff Kirsher
2014-03-31 23:34 ` [net-next 04/13] ixgbe: fix race conditions on queuing skb for HW time stamp Jeff Kirsher
2014-03-31 23:34 ` [net-next 05/13] ixgbe: fix ixgbe_check_reset_blocked() declaration Jeff Kirsher
2014-03-31 23:34 ` [net-next 06/13] ixgbevf: Change ixgbe_read_reg to ixgbevf_read_reg Jeff Kirsher
2014-03-31 23:34 ` [net-next 07/13] i40e: fix function kernel doc description Jeff Kirsher
2014-03-31 23:34 ` [net-next 08/13] i40e/i40evf: fix error checking path Jeff Kirsher
2014-04-01 12:14   ` Sergei Shtylyov
2014-03-31 23:34 ` [net-next 09/13] i40e/i40evf: Remove addressof casts to same type Jeff Kirsher
2014-03-31 23:34 ` [net-next 10/13] i40e: Remove casts of pointer " Jeff Kirsher
2014-03-31 23:34 ` Jeff Kirsher [this message]
2014-03-31 23:34 ` [net-next 12/13] ixgbe: Fix rcu warnings induced by LER Jeff Kirsher
2014-03-31 23:34 ` [net-next 13/13] ixgbevf: " Jeff Kirsher
2014-04-01  1:19 ` [net-next 00/13][pull request] Intel Wired LAN Driver Updates 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=1396308899-20926-12-git-send-email-jeffrey.t.kirsher@intel.com \
    --to=jeffrey.t.kirsher@intel.com \
    --cc=davem@davemloft.net \
    --cc=gospo@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=peter.senna@gmail.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).