On Wed, Sep 15, 2004 at 01:11:03PM -0700, Greg KH wrote:
> On Wed, Sep 15, 2004 at 01:07:55PM -0700, Greg KH wrote:
> > On Wed, Sep 15, 2004 at 11:56:24AM -0700, Greg KH wrote:
> > > 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?
> > 
> > Ah, nevermind.  See the lkml thread about __iomem for where I was
> > confused.  I'll go fix up the hcd drivers now...
> 
> And here's the patch I just did for the ehci driver, I'll clean up ohci
> in the same manner.

And here's the ohci patch...

greg k-h


------

USB: fix up __iomem warnings in the ohci driver.
  
Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>

diff -Nru a/drivers/usb/host/ohci-dbg.c b/drivers/usb/host/ohci-dbg.c
--- a/drivers/usb/host/ohci-dbg.c       2004-09-15 13:17:13 -07:00
+++ b/drivers/usb/host/ohci-dbg.c       2004-09-15 13:17:13 -07:00
@@ -131,7 +131,7 @@
 static void
 ohci_dump_status (struct ohci_hcd *controller, char **next, unsigned *size)
 {
-       struct ohci_regs        *regs = controller->regs;
+       struct ohci_regs __iomem *regs = controller->regs;
        u32                     temp;
 
        temp = ohci_readl (&regs->revision) & 0xff;
@@ -599,7 +599,7 @@
        struct usb_bus          *bus;
        struct usb_hcd          *hcd;
        struct ohci_hcd         *ohci;
-       struct ohci_regs        *regs;
+       struct ohci_regs __iomem *regs;
        unsigned long           flags;
        unsigned                temp, size;
        char                    *next;
diff -Nru a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c
--- a/drivers/usb/host/ohci-hcd.c       2004-09-15 13:17:13 -07:00
+++ b/drivers/usb/host/ohci-hcd.c       2004-09-15 13:17:13 -07:00
@@ -679,7 +679,7 @@
 static irqreturn_t ohci_irq (struct usb_hcd *hcd, struct pt_regs *ptregs)
 {
        struct ohci_hcd         *ohci = hcd_to_ohci (hcd);
-       struct ohci_regs        *regs = ohci->regs;
+       struct ohci_regs __iomem *regs = ohci->regs;
        int                     ints; 
 
        /* we can eliminate a (slow) ohci_readl()
diff -Nru a/drivers/usb/host/ohci-hub.c b/drivers/usb/host/ohci-hub.c
--- a/drivers/usb/host/ohci-hub.c       2004-09-15 13:17:13 -07:00
+++ b/drivers/usb/host/ohci-hub.c       2004-09-15 13:17:13 -07:00
@@ -468,7 +468,7 @@
 /* called from some task, normally khubd */
 static inline void root_port_reset (struct ohci_hcd *ohci, unsigned port)
 {
-       u32     *portstat = &ohci->regs->roothub.portstatus [port];
+       u32 __iomem *portstat = &ohci->regs->roothub.portstatus [port];
        u32     temp;
        u16     now = readl(&ohci->regs->fmnumber);
        u16     reset_done = now + PORT_RESET_MSEC;
diff -Nru a/drivers/usb/host/ohci.h b/drivers/usb/host/ohci.h
--- a/drivers/usb/host/ohci.h   2004-09-15 13:17:13 -07:00
+++ b/drivers/usb/host/ohci.h   2004-09-15 13:17:13 -07:00
@@ -342,7 +342,7 @@
        /*
         * I/O memory used to communicate with the HC (dma-consistent)
         */
-       struct ohci_regs        *regs;
+       struct ohci_regs __iomem *regs;
 
        /*
         * main memory used to communicate with the HC (dma-consistent).
@@ -452,7 +452,7 @@
 #else
        /* Standard version of ohci_readl uses standard, platform
         * specific implementation. */
-static inline unsigned int ohci_readl (void* regs)
+static inline unsigned int ohci_readl (void __iomem * regs)
 {
        return readl (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