* [PATCH] Workaround for a sparse warning in include/asm-mips/compat.h
@ 2007-07-13 14:51 Atsushi Nemoto
2007-07-13 14:54 ` Ralf Baechle
0 siblings, 1 reply; 2+ messages in thread
From: Atsushi Nemoto @ 2007-07-13 14:51 UTC (permalink / raw)
To: linux-mips; +Cc: ralf
Cast to a __user pointer via "unsigned long" to get rid of this warning:
include2/asm/compat.h:135:10: warning: cast adds address space to expression (<asn:1>)
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
---
diff --git a/include/asm-mips/compat.h b/include/asm-mips/compat.h
index 432653d..67c3f8e 100644
--- a/include/asm-mips/compat.h
+++ b/include/asm-mips/compat.h
@@ -132,7 +132,8 @@ typedef u32 compat_uptr_t;
static inline void __user *compat_ptr(compat_uptr_t uptr)
{
- return (void __user *)(long)uptr;
+ /* cast to a __user pointer via "unsigned long" makes sparse happy */
+ return (void __user *)(unsigned long)(long)uptr;
}
static inline compat_uptr_t ptr_to_compat(void __user *uptr)
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Workaround for a sparse warning in include/asm-mips/compat.h
2007-07-13 14:51 [PATCH] Workaround for a sparse warning in include/asm-mips/compat.h Atsushi Nemoto
@ 2007-07-13 14:54 ` Ralf Baechle
0 siblings, 0 replies; 2+ messages in thread
From: Ralf Baechle @ 2007-07-13 14:54 UTC (permalink / raw)
To: Atsushi Nemoto; +Cc: linux-mips
On Fri, Jul 13, 2007 at 11:51:38PM +0900, Atsushi Nemoto wrote:
Applied. Thanks,
Ralf
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-07-13 14:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-13 14:51 [PATCH] Workaround for a sparse warning in include/asm-mips/compat.h Atsushi Nemoto
2007-07-13 14:54 ` Ralf Baechle
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox