diff options
author | Pavel Roskin <proski@gnu.org> | 2007-11-24 20:12:39 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2008-01-26 09:50:03 -0500 |
commit | d2936b1976a9c70d1cce4700c51f26d4b9495e9d (patch) | |
tree | f3fca24e6367754cb9ca85a998bbd4191dc5b863 /include/asm-arm/arch-ixp4xx/io.h | |
parent | e173dbf68869dd1fe64c16b8d6ae2fbe6a3b2f89 (diff) |
[ARM] 4666/1: ixp4xx: fix sparse warnings in include/asm-arm/arch-ixp4xx/io.h
Don't lose __iomem in casts. Use __force to cast __iomem addresses to
integers. Use __force to cast u32 to __le32 and vice versa.
Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'include/asm-arm/arch-ixp4xx/io.h')
-rw-r--r-- | include/asm-arm/arch-ixp4xx/io.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/include/asm-arm/arch-ixp4xx/io.h b/include/asm-arm/arch-ixp4xx/io.h index eeeea90cd5a9..9c5d2357aff3 100644 --- a/include/asm-arm/arch-ixp4xx/io.h +++ b/include/asm-arm/arch-ixp4xx/io.h | |||
@@ -61,13 +61,13 @@ __ixp4xx_ioremap(unsigned long addr, size_t size, unsigned int mtype) | |||
61 | if((addr < PCIBIOS_MIN_MEM) || (addr > 0x4fffffff)) | 61 | if((addr < PCIBIOS_MIN_MEM) || (addr > 0x4fffffff)) |
62 | return __arm_ioremap(addr, size, mtype); | 62 | return __arm_ioremap(addr, size, mtype); |
63 | 63 | ||
64 | return (void *)addr; | 64 | return (void __iomem *)addr; |
65 | } | 65 | } |
66 | 66 | ||
67 | static inline void | 67 | static inline void |
68 | __ixp4xx_iounmap(void __iomem *addr) | 68 | __ixp4xx_iounmap(void __iomem *addr) |
69 | { | 69 | { |
70 | if ((u32)addr >= VMALLOC_START) | 70 | if ((__force u32)addr >= VMALLOC_START) |
71 | __iounmap(addr); | 71 | __iounmap(addr); |
72 | } | 72 | } |
73 | 73 | ||
@@ -141,9 +141,9 @@ __ixp4xx_writesw(volatile void __iomem *bus_addr, const u16 *vaddr, int count) | |||
141 | static inline void | 141 | static inline void |
142 | __ixp4xx_writel(u32 value, volatile void __iomem *p) | 142 | __ixp4xx_writel(u32 value, volatile void __iomem *p) |
143 | { | 143 | { |
144 | u32 addr = (u32)p; | 144 | u32 addr = (__force u32)p; |
145 | if (addr >= VMALLOC_START) { | 145 | if (addr >= VMALLOC_START) { |
146 | __raw_writel(value, addr); | 146 | __raw_writel(value, p); |
147 | return; | 147 | return; |
148 | } | 148 | } |
149 | 149 | ||
@@ -208,11 +208,11 @@ __ixp4xx_readsw(const volatile void __iomem *bus_addr, u16 *vaddr, u32 count) | |||
208 | static inline unsigned long | 208 | static inline unsigned long |
209 | __ixp4xx_readl(const volatile void __iomem *p) | 209 | __ixp4xx_readl(const volatile void __iomem *p) |
210 | { | 210 | { |
211 | u32 addr = (u32)p; | 211 | u32 addr = (__force u32)p; |
212 | u32 data; | 212 | u32 data; |
213 | 213 | ||
214 | if (addr >= VMALLOC_START) | 214 | if (addr >= VMALLOC_START) |
215 | return __raw_readl(addr); | 215 | return __raw_readl(p); |
216 | 216 | ||
217 | if (ixp4xx_pci_read(addr, NP_CMD_MEMREAD, &data)) | 217 | if (ixp4xx_pci_read(addr, NP_CMD_MEMREAD, &data)) |
218 | return 0xffffffff; | 218 | return 0xffffffff; |
@@ -438,7 +438,7 @@ __ixp4xx_ioread32(const void __iomem *addr) | |||
438 | return (unsigned int)__ixp4xx_inl(port & PIO_MASK); | 438 | return (unsigned int)__ixp4xx_inl(port & PIO_MASK); |
439 | else { | 439 | else { |
440 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI | 440 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI |
441 | return le32_to_cpu(__raw_readl((u32)port)); | 441 | return le32_to_cpu((__force __le32)__raw_readl(addr)); |
442 | #else | 442 | #else |
443 | return (unsigned int)__ixp4xx_readl(addr); | 443 | return (unsigned int)__ixp4xx_readl(addr); |
444 | #endif | 444 | #endif |
@@ -523,7 +523,7 @@ __ixp4xx_iowrite32(u32 value, void __iomem *addr) | |||
523 | __ixp4xx_outl(value, port & PIO_MASK); | 523 | __ixp4xx_outl(value, port & PIO_MASK); |
524 | else | 524 | else |
525 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI | 525 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI |
526 | __raw_writel(cpu_to_le32(value), port); | 526 | __raw_writel((u32 __force)cpu_to_le32(value), addr); |
527 | #else | 527 | #else |
528 | __ixp4xx_writel(value, addr); | 528 | __ixp4xx_writel(value, addr); |
529 | #endif | 529 | #endif |