[PATCH] hci_{read,write}l() does force casts to wrong type for no reason
authorAl Viro <viro@ftp.linux.org.uk>
Fri, 9 Feb 2007 16:40:00 +0000 (16:40 +0000)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Fri, 9 Feb 2007 17:14:08 +0000 (09:14 -0800)
readl() et.al. expect iomem pointer, so WTF force-cast it to normal one???

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/usb/host/ehci.h
drivers/usb/host/ohci.h

index ec0da0343be477868a0549b950afc937cf897d0d..46fa57a520d0d6b37a83c459bf1c2ec869369922 100644 (file)
@@ -677,10 +677,10 @@ static inline unsigned int ehci_readl (const struct ehci_hcd *ehci,
 {
 #ifdef CONFIG_USB_EHCI_BIG_ENDIAN_MMIO
        return ehci_big_endian_mmio(ehci) ?
-               readl_be((__force u32 *)regs) :
-               readl((__force u32 *)regs);
+               readl_be(regs) :
+               readl(regs);
 #else
-       return readl((__force u32 *)regs);
+       return readl(regs);
 #endif
 }
 
@@ -689,10 +689,10 @@ static inline void ehci_writel (const struct ehci_hcd *ehci,
 {
 #ifdef CONFIG_USB_EHCI_BIG_ENDIAN_MMIO
        ehci_big_endian_mmio(ehci) ?
-               writel_be(val, (__force u32 *)regs) :
-               writel(val, (__force u32 *)regs);
+               writel_be(val, regs) :
+               writel(val, regs);
 #else
-       writel(val, (__force u32 *)regs);
+       writel(val, regs);
 #endif
 }
 
index 0dafcda3729126320e46918e79411d2acc8a6555..c2b5ecfe5e9fa8ca88b33a28b792dd15e3a43fb8 100644 (file)
@@ -507,10 +507,10 @@ static inline unsigned int _ohci_readl (const struct ohci_hcd *ohci,
 {
 #ifdef CONFIG_USB_OHCI_BIG_ENDIAN_MMIO
        return big_endian_mmio(ohci) ?
-               readl_be ((__force u32 *)regs) :
-               readl ((__force u32 *)regs);
+               readl_be (regs) :
+               readl (regs);
 #else
-       return readl ((__force u32 *)regs);
+       return readl (regs);
 #endif
 }
 
@@ -519,10 +519,10 @@ static inline void _ohci_writel (const struct ohci_hcd *ohci,
 {
 #ifdef CONFIG_USB_OHCI_BIG_ENDIAN_MMIO
        big_endian_mmio(ohci) ?
-               writel_be (val, (__force u32 *)regs) :
-               writel (val, (__force u32 *)regs);
+               writel_be (val, regs) :
+               writel (val, regs);
 #else
-               writel (val, (__force u32 *)regs);
+               writel (val, regs);
 #endif
 }