Hi,

I've just applied the patch below to try to clean up the USB host
controller driver warnings that sparse spits out about __iomem usages
being incorrect.

However it looks like you all are just taking a memory section that was
allocated in ioremap() and using that to get values to call readX() and
friends on.  The compiler really doesn't like this now :)

Care to send patches to fix this all up?

thanks,

greg k-h


# USB: fix hcd-pci's __iomem warnings
#
# Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>

diff -Nru a/drivers/usb/core/hcd-pci.c b/drivers/usb/core/hcd-pci.c
--- a/drivers/usb/core/hcd-pci.c        2004-09-15 11:51:31 -07:00
+++ b/drivers/usb/core/hcd-pci.c        2004-09-15 11:51:31 -07:00
@@ -65,7 +65,7 @@
 {
        struct hc_driver        *driver;
        unsigned long           resource, len;
-       void                    *base;
+       void __iomem            *base;
        struct usb_hcd          *hcd;
        int                     retval, region;
        char                    buf [8], *bufp = buf;
@@ -121,7 +121,7 @@
                        dev_dbg (&dev->dev, "no i/o regions available\n");
                        return -EBUSY;
                }
-               base = (void *) resource;
+               base = (void __iomem *) resource;
        }
 
        // driver->reset(), later on, will transfer device from
diff -Nru a/drivers/usb/core/hcd.h b/drivers/usb/core/hcd.h
--- a/drivers/usb/core/hcd.h    2004-09-15 11:51:31 -07:00
+++ b/drivers/usb/core/hcd.h    2004-09-15 11:51:31 -07:00
@@ -76,7 +76,7 @@
        unsigned                can_wakeup:1;   /* hw supports wakeup? */
        unsigned                remote_wakeup:1;/* sw should use wakeup? */
        int                     irq;            /* irq allocated */
-       void                    *regs;          /* device memory/io */
+       void __iomem            *regs;          /* device memory/io */
 
 #ifdef CONFIG_PCI
        int                     region;         /* pci region for regs */


-------------------------------------------------------
This SF.Net email is sponsored by: thawte's Crypto Challenge Vl
Crack the code and win a Sony DCRHC40 MiniDV Digital Handycam
Camcorder. More prizes in the weekly Lunch Hour Challenge.
Sign up NOW http://ad.doubleclick.net/clk;10740251;10262165;m
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to