Skip to content

Commit f267ea0

Browse files
Stefan Hengeleinarndb
authored andcommitted
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 <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]>
1 parent f0fd9ad commit f267ea0

File tree

1 file changed

+2
-2
lines changed
  • arch/arm/mach-ixp4xx/include/mach

1 file changed

+2
-2
lines changed

arch/arm/mach-ixp4xx/include/mach/io.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ static inline void __indirect_writeb(u8 value, volatile void __iomem *p)
7676
u32 n, byte_enables, data;
7777

7878
if (!is_pci_memory(addr)) {
79-
__raw_writeb(value, addr);
79+
__raw_writeb(value, p);
8080
return;
8181
}
8282

@@ -141,7 +141,7 @@ static inline unsigned char __indirect_readb(const volatile void __iomem *p)
141141
u32 n, byte_enables, data;
142142

143143
if (!is_pci_memory(addr))
144-
return __raw_readb(addr);
144+
return __raw_readb(p);
145145

146146
n = addr % 4;
147147
byte_enables = (0xf & ~BIT(n)) << IXP4XX_PCI_NP_CBE_BESL;

0 commit comments

Comments
 (0)