* [PATCH] ARM: ixp4xx: remove compilation warnings in io.h
@ 2014-10-19 17:49 Stefan Hengelein
2014-10-28 21:04 ` Arnd Bergmann
0 siblings, 1 reply; 2+ messages in thread
From: Stefan Hengelein @ 2014-10-19 17:49 UTC (permalink / raw)
To: linux-arm-kernel
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>
---
arch/arm/mach-ixp4xx/include/mach/io.h | 4 ++--
1 file 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 559c69a..7d11979 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)
u32 n, byte_enables, data;
if (!is_pci_memory(addr)) {
- __raw_writeb(value, addr);
+ __raw_writeb(value, p);
return;
}
@@ -141,7 +141,7 @@ static inline unsigned char __indirect_readb(const volatile void __iomem *p)
u32 n, byte_enables, data;
if (!is_pci_memory(addr))
- return __raw_readb(addr);
+ return __raw_readb(p);
n = addr % 4;
byte_enables = (0xf & ~BIT(n)) << IXP4XX_PCI_NP_CBE_BESL;
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] ARM: ixp4xx: remove compilation warnings in io.h
2014-10-19 17:49 [PATCH] ARM: ixp4xx: remove compilation warnings in io.h Stefan Hengelein
@ 2014-10-28 21:04 ` Arnd Bergmann
0 siblings, 0 replies; 2+ messages in thread
From: Arnd Bergmann @ 2014-10-28 21:04 UTC (permalink / raw)
To: linux-arm-kernel
On Sunday 19 October 2014 19:49:45 Stefan Hengelein wrote:
> 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>
Applied on fixes branch, thanks!
Arnd
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-10-28 21:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-19 17:49 [PATCH] ARM: ixp4xx: remove compilation warnings in io.h Stefan Hengelein
2014-10-28 21:04 ` Arnd Bergmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox