* [PATCH] arm: it's OK to pass pointer to volatile as iounmap() argument...
@ 2006-10-09 1:09 Al Viro
2006-10-09 19:35 ` Pavel Machek
0 siblings, 1 reply; 2+ messages in thread
From: Al Viro @ 2006-10-09 1:09 UTC (permalink / raw)
To: Linus Torvalds; +Cc: rmk, linux-kernel
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---
arch/arm/mm/ioremap.c | 6 +++---
include/asm-arm/io.h | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c
index 591fc31..4654405 100644
--- a/arch/arm/mm/ioremap.c
+++ b/arch/arm/mm/ioremap.c
@@ -361,14 +361,14 @@ __ioremap(unsigned long phys_addr, size_
}
EXPORT_SYMBOL(__ioremap);
-void __iounmap(void __iomem *addr)
+void __iounmap(volatile void __iomem *addr)
{
#ifndef CONFIG_SMP
struct vm_struct **p, *tmp;
#endif
unsigned int section_mapping = 0;
- addr = (void __iomem *)(PAGE_MASK & (unsigned long)addr);
+ addr = (volatile void __iomem *)(PAGE_MASK & (unsigned long)addr);
#ifndef CONFIG_SMP
/*
@@ -395,6 +395,6 @@ #ifndef CONFIG_SMP
#endif
if (!section_mapping)
- vunmap(addr);
+ vunmap((void __force *)addr);
}
EXPORT_SYMBOL(__iounmap);
diff --git a/include/asm-arm/io.h b/include/asm-arm/io.h
index 8076a85..34aaaac 100644
--- a/include/asm-arm/io.h
+++ b/include/asm-arm/io.h
@@ -63,7 +63,7 @@ #define __raw_readl(a) (__chk_io_ptr(a)
*/
extern void __iomem * __ioremap_pfn(unsigned long, unsigned long, size_t, unsigned long);
extern void __iomem * __ioremap(unsigned long, size_t, unsigned long);
-extern void __iounmap(void __iomem *addr);
+extern void __iounmap(volatile void __iomem *addr);
/*
* Bad read/write accesses...
--
1.4.2.GIT
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] arm: it's OK to pass pointer to volatile as iounmap() argument...
2006-10-09 1:09 [PATCH] arm: it's OK to pass pointer to volatile as iounmap() argument Al Viro
@ 2006-10-09 19:35 ` Pavel Machek
0 siblings, 0 replies; 2+ messages in thread
From: Pavel Machek @ 2006-10-09 19:35 UTC (permalink / raw)
To: Al Viro; +Cc: Linus Torvalds, rmk, linux-kernel
Hi!
> --- a/arch/arm/mm/ioremap.c
> +++ b/arch/arm/mm/ioremap.c
> @@ -361,14 +361,14 @@ __ioremap(unsigned long phys_addr, size_
> }
> EXPORT_SYMBOL(__ioremap);
>
> -void __iounmap(void __iomem *addr)
> +void __iounmap(volatile void __iomem *addr)
Who is crazy enough to pass volatile pointers here? I guess they should be
fixed, instead.
Pavel
--
Thanks for all the (sleeping) penguins.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-10-11 11:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-09 1:09 [PATCH] arm: it's OK to pass pointer to volatile as iounmap() argument Al Viro
2006-10-09 19:35 ` Pavel Machek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox