diff options
author | Stefan Hengelein <stefan.hengelein@fau.de> | 2014-10-19 13:49:45 -0400 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2014-10-28 17:04:01 -0400 |
commit | f267ea0fe05123e8101e5793d977b537924939a0 (patch) | |
tree | 6bc49b30bb4f1f92f99220ca66348282adc255f6 /arch | |
parent | f0fd9ad87e698d634ab5894f751b7af908e96a41 (diff) |
ARM: ixp4xx: remove compilation warnings in io.h
When arch/arm/mach-ixp4xx/common-pci.c is compiled, two warnings
occur:
arch/arm/mach-ixp4xx/include/mach/io.h:144: warning: passing argument 1 of '__raw_readb' makes pointer from integer without a cast
arch/arm/mach-ixp4xx/include/mach/io.h:79: warning: passing argument 2 of '__raw_writeb' makes pointer from integer without a cast
Both functions expect an 'volatile void __iomem *' but get an u32.
The 'u32 addr' variable is initialized with the address of an
'volatile void __iomem *' pointer. Passing the pointer
directly, avoids the warning and semantics are preserved.
This warning was found with vampyr.
Signed-off-by: Stefan Hengelein <stefan.hengelein@fau.de>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-ixp4xx/include/mach/io.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm/mach-ixp4xx/include/mach/io.h b/arch/arm/mach-ixp4xx/include/mach/io.h index 559c69a47731..7d11979da030 100644 --- a/arch/arm/mach-ixp4xx/include/mach/io.h +++ b/arch/arm/mach-ixp4xx/include/mach/io.h | |||
@@ -76,7 +76,7 @@ static inline void __indirect_writeb(u8 value, volatile void __iomem *p) | |||
76 | u32 n, byte_enables, data; | 76 | u32 n, byte_enables, data; |
77 | 77 | ||
78 | if (!is_pci_memory(addr)) { | 78 | if (!is_pci_memory(addr)) { |
79 | __raw_writeb(value, addr); | 79 | __raw_writeb(value, p); |
80 | return; | 80 | return; |
81 | } | 81 | } |
82 | 82 | ||
@@ -141,7 +141,7 @@ static inline unsigned char __indirect_readb(const volatile void __iomem *p) | |||
141 | u32 n, byte_enables, data; | 141 | u32 n, byte_enables, data; |
142 | 142 | ||
143 | if (!is_pci_memory(addr)) | 143 | if (!is_pci_memory(addr)) |
144 | return __raw_readb(addr); | 144 | return __raw_readb(p); |
145 | 145 | ||
146 | n = addr % 4; | 146 | n = addr % 4; |
147 | byte_enables = (0xf & ~BIT(n)) << IXP4XX_PCI_NP_CBE_BESL; | 147 | byte_enables = (0xf & ~BIT(n)) << IXP4XX_PCI_NP_CBE_BESL; |