Commit f267ea0f authored by Stefan Hengelein's avatar Stefan Hengelein Committed by Arnd Bergmann

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: default avatarStefan Hengelein <stefan.hengelein@fau.de>
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parent f0fd9ad8
...@@ -76,7 +76,7 @@ static inline void __indirect_writeb(u8 value, volatile void __iomem *p) ...@@ -76,7 +76,7 @@ static inline void __indirect_writeb(u8 value, volatile void __iomem *p)
u32 n, byte_enables, data; u32 n, byte_enables, data;
if (!is_pci_memory(addr)) { if (!is_pci_memory(addr)) {
__raw_writeb(value, addr); __raw_writeb(value, p);
return; return;
} }
...@@ -141,7 +141,7 @@ static inline unsigned char __indirect_readb(const volatile void __iomem *p) ...@@ -141,7 +141,7 @@ static inline unsigned char __indirect_readb(const volatile void __iomem *p)
u32 n, byte_enables, data; u32 n, byte_enables, data;
if (!is_pci_memory(addr)) if (!is_pci_memory(addr))
return __raw_readb(addr); return __raw_readb(p);
n = addr % 4; n = addr % 4;
byte_enables = (0xf & ~BIT(n)) << IXP4XX_PCI_NP_CBE_BESL; byte_enables = (0xf & ~BIT(n)) << IXP4XX_PCI_NP_CBE_BESL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment