]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
usb: musb: fix sparse warnings
authorFelipe Balbi <balbi@ti.com>
Tue, 7 Aug 2012 11:00:50 +0000 (14:00 +0300)
committerFelipe Balbi <balbi@ti.com>
Tue, 7 Aug 2012 11:00:50 +0000 (14:00 +0300)
The following warnings are fixed:

drivers/usb/musb/musb_core.c:357:6: warning: symbol 'musb_otg_timer_func' was not declared. Should it be static?
drivers/usb/musb/musb_core.c:1339:27: warning: incorrect type in initializer (different address spaces)
drivers/usb/musb/musb_core.c:1339:27:    expected void *mbase
drivers/usb/musb/musb_core.c:1339:27:    got void [noderef] <asn:2>*mregs
drivers/usb/musb/musb_core.c:1347:17: warning: incorrect type in argument 1 (different address spaces)
drivers/usb/musb/musb_core.c:1347:17:    expected void [noderef] <asn:2>*addr
drivers/usb/musb/musb_core.c:1347:17:    got void *mbase
drivers/usb/musb/musb_core.h:487:27: warning: incorrect type in initializer (different address spaces)
drivers/usb/musb/musb_core.h:487:27:    expected void *mbase
drivers/usb/musb/musb_core.h:487:27:    got void [noderef] <asn:2>*mregs
drivers/usb/musb/musb_core.h:491:26: warning: incorrect type in argument 1 (different address spaces)
drivers/usb/musb/musb_core.h:491:26:    expected void const [noderef] <asn:2>*addr
drivers/usb/musb/musb_core.h:491:26:    got void *mbase
drivers/usb/musb/tusb6010.c:270:48: warning: incorrect type in argument 2 (different address spaces)
drivers/usb/musb/tusb6010.c:270:48:    expected void [noderef] <asn:2>*buf
drivers/usb/musb/tusb6010.c:270:48:    got unsigned char [usertype] *[assigned] buf
drivers/usb/musb/tusb6010.c:164:32: warning: incorrect type in argument 1 (different address spaces)
drivers/usb/musb/tusb6010.c:164:32:    expected void *to
drivers/usb/musb/tusb6010.c:164:32:    got void [noderef] <asn:2>*buf
drivers/usb/musb/tusb6010.c:172:24: warning: incorrect type in argument 1 (different address spaces)
drivers/usb/musb/tusb6010.c:172:24:    expected void *to
drivers/usb/musb/tusb6010.c:172:24:    got void [noderef] <asn:2>*[assigned] buf

Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/musb/musb_core.c
drivers/usb/musb/musb_core.h
drivers/usb/musb/tusb6010.c

index 69711e43ac6b2e1073269a36b0607b984b70f6ca..9bc4feab4fe03f6e9ffe9aa32900fa9b444f82d0 100644 (file)
@@ -354,7 +354,7 @@ void musb_load_testpacket(struct musb *musb)
 /*
  * Handles OTG hnp timeouts, such as b_ase0_brst
  */
-void musb_otg_timer_func(unsigned long data)
+static void musb_otg_timer_func(unsigned long data)
 {
        struct musb     *musb = (struct musb *)data;
        unsigned long   flags;
@@ -1336,7 +1336,7 @@ static int __devinit ep_config_from_hw(struct musb *musb)
 {
        u8 epnum = 0;
        struct musb_hw_ep *hw_ep;
-       void *mbase = musb->mregs;
+       void __iomem *mbase = musb->mregs;
        int ret = 0;
 
        dev_dbg(musb->controller, "<== static silicon ep config\n");
index 586105b55a7ceae23a79d76e2c8b35578e7827a7..8bb324dddd1761e411dcdd6f779b41180c3554c5 100644 (file)
@@ -484,7 +484,7 @@ static inline void musb_configure_ep0(struct musb *musb)
 static inline int musb_read_fifosize(struct musb *musb,
                struct musb_hw_ep *hw_ep, u8 epnum)
 {
-       void *mbase = musb->mregs;
+       void __iomem *mbase = musb->mregs;
        u8 reg = 0;
 
        /* read from core using indexed model */
index 1a1bd9cf40c5ce7c1d6f7ef1ac46360d0b6884a4..4073a6fa26337d24b323230204a67c952d1023d3 100644 (file)
@@ -153,7 +153,7 @@ tusb_fifo_write_unaligned(void __iomem *fifo, const u8 *buf, u16 len)
 }
 
 static inline void tusb_fifo_read_unaligned(void __iomem *fifo,
-                                               void __iomem *buf, u16 len)
+                                               void *buf, u16 len)
 {
        u32             val;
        int             i;