ATHEROS-ATL1E: Convert iounmap to pci_iounmap
Subsystems (5)
PATCH 1/2 ATHEROS-ATL1E: Convert iounmap to pci_iounmap
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>
---
Tested by compilation only.
drivers/net/ethernet/atheros/atl1e/atl1e_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/atheros/atl1e/atl1e_main.c +2 -2
@@ -2436,7 +2436,7 @@ err_reset: err_register: err_sw_init: err_eeprom: -iounmap (adapter->hw.hw_addr); +pci_iounmap (pdev, adapter->hw.hw_addr); err_init_netdev: err_ioremap:free_netdev (netdev);
@@ -2474,7 +2474,7 @@ static void atl1e_remove(struct pci_dev *pdev)unregister_netdev (netdev);atl1e_free_ring_resources (adapter);atl1e_force_ps (&adapter->hw); -iounmap (adapter->hw.hw_addr); +pci_iounmap (pdev, adapter->hw.hw_addr);pci_release_regions (pdev);free_netdev (netdev);pci_disable_device (pdev);
Signature · 1 line
1.8.3.1
PATCH 2/2 INTEL-IGB: Convert iounmap to pci_iounmap
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>
---
Tested by compilation only.
drivers/net/ethernet/intel/igb/igb_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/intel/igb/igb_main.c +2 -2
@@ -2623,7 +2623,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:
@@ -2790,7 +2790,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,
Signature · 1 line
1.8.3.1
Re: [PATCH 2/2] INTEL-IGB: Convert iounmap to pci_iounmap
Quoted 17 lines · Peter Senna Tschudin
Use
pci_iounmapinstead of iounmap when the virtual mapping was done withpci_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>
Quoted 6 lines
Signed-off-by Peter Senna Tschudin <[email protected]>---
Tested by compilation only.drivers/net/ethernet/intel/igb/igb_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Thanks Peter, I have added you patch to my queue.
From: Peter Senna Tschudin <[email protected]>
Date: Tue, 18 Mar 2014 17:11:24 +0100
Quoted 3 lines
Use
pci_iounmapinstead of iounmap when the virtual mapping was done withpci_iomap. A simplified version of the semantic patch that finds this issue is as follows: (http://coccinelle.lip6.fr/)
...
Quoted 1 line
Signed-off-by Peter Senna Tschudin <[email protected]>
Applied, thanks.