aic7xxx_old iomem annotations
PATCH 1/1 aic7xxx_old iomem annotations
Signed-off-by Al Viro <[email protected]>
----
drivers/scsi/qlogicisp.c +8 -9
@@ -564,7 +564,7 @@ };struct isp1020_hostdata { -u_long memaddr; +void __iomem *memaddr;u_char revision;struct host_param host_param;struct dev_param dev_param[MAX_TARGETS ];
@@ -714,7 +714,7 @@continue ; fail_uninit: -iounmap ((void *)hostdata->memaddr); +iounmap (hostdata->memaddr);release_region (host->io_port,0xff ); fail_and_unregister:if (hostdata->res_cpu)
@@ -747,7 +747,7 @@isp_outw (0x0 , host,PCI_INTF_CTL );free_irq (host->irq, host); -iounmap ((void *)hostdata->memaddr); +iounmap (hostdata->memaddr);release_region (host->io_port,0xff );
@@ -769,7 +769,7 @@"QLogic ISP1020 SCSI on PCI bus %02x device %02x irq %d %s base 0x%lx" , hostdata->pci_dev->bus->number, hostdata->pci_dev->devfn, host->irq, (hostdata->memaddr ?"MEM" :"I/O" ), - (hostdata->memaddr ? hostdata->memaddr : host->io_port)); + (hostdata->memaddr ? (unsigned long)hostdata->memaddr : host->io_port));LEAVE ("isp1020_info" );
@@ -1410,18 +1410,17 @@if ((command &PCI_COMMAND_MEMORY ) && ((mem_flags &1 ) ==0 )) { - mem_base = (u_long )ioremap (mem_base,PAGE_SIZE ); -if (!mem_base) { + hostdata->memaddr =ioremap (mem_base,PAGE_SIZE ); +if (!hostdata->memaddr) {printk ("qlogicisp : i/o remapping failed.\n" ); goto out_release; } - hostdata->memaddr = mem_base; }else {if (command &PCI_COMMAND_IO && (io_flags &3 ) !=1 ) {printk ("qlogicisp : i/o mapping is disabled\n" ); goto out_release; } - hostdata->memaddr =0 ;/* zero to signify no i/o mapping */ + hostdata->memaddr =NULL ;/* zero to signify no i/o mapping */ mem_base =0 ; }
@@ -1470,7 +1469,7 @@return 0 ; out_unmap: -iounmap ((void *)hostdata->memaddr); +iounmap (hostdata->memaddr); out_release:release_region (sh->io_port,0xff );return 1 ;
Argh - qlogicisp iomem annotations, actually. Sorry. aic7xxx_old ones will be sent in a minute...
Quoted 72 lines · Al Viro
Signed-off-by Al Viro <[email protected]>----
diff -urNRC9-bk4-dpt/drivers/scsi/qlogicisp.cRC9-bk4-qlogicisp/drivers/scsi/qlogicisp.cdrivers/scsi/qlogicisp.c +8
-9@@ -564,7 +564,7 @@ };struct isp1020_hostdata { -u_long memaddr; +void __iomem *memaddr;u_char revision;struct host_param host_param;struct dev_param dev_param[MAX_TARGETS ];@@ -714,7 +714,7 @@continue ; fail_uninit: -iounmap ((void *)hostdata->memaddr); +iounmap (hostdata->memaddr);release_region (host->io_port,0xff ); fail_and_unregister:if (hostdata->res_cpu)@@ -747,7 +747,7 @@isp_outw (0x0 , host,PCI_INTF_CTL );free_irq (host->irq, host); -iounmap ((void *)hostdata->memaddr); +iounmap (hostdata->memaddr);release_region (host->io_port,0xff );@@ -769,7 +769,7 @@"QLogic ISP1020 SCSI on PCI bus %02x device %02x irq %d %s base 0x%lx" , hostdata->pci_dev->bus->number, hostdata->pci_dev->devfn, host->irq, (hostdata->memaddr ?"MEM" :"I/O" ), - (hostdata->memaddr ? hostdata->memaddr : host->io_port)); + (hostdata->memaddr ? (unsigned long)hostdata->memaddr : host->io_port));LEAVE ("isp1020_info" );@@ -1410,18 +1410,17 @@if ((command &PCI_COMMAND_MEMORY ) && ((mem_flags &1 ) ==0 )) { - mem_base = (u_long )ioremap (mem_base,PAGE_SIZE ); -if (!mem_base) { + hostdata->memaddr =ioremap (mem_base,PAGE_SIZE ); +if (!hostdata->memaddr) {printk ("qlogicisp : i/o remapping failed.\n" ); goto out_release; } - hostdata->memaddr = mem_base; }else {if (command &PCI_COMMAND_IO && (io_flags &3 ) !=1 ) {printk ("qlogicisp : i/o mapping is disabled\n" ); goto out_release; } - hostdata->memaddr =0 ;/* zero to signify no i/o mapping */ + hostdata->memaddr =NULL ;/* zero to signify no i/o mapping */ mem_base =0 ; }@@ -1470,7 +1469,7 @@return 0 ; out_unmap: -iounmap ((void *)hostdata->memaddr); +iounmap (hostdata->memaddr); out_release:release_region (sh->io_port,0xff );return 1 ;