diff options
author | Atsushi Nemoto <anemo@mba.ocn.ne.jp> | 2007-07-13 23:51:38 +0900 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2007-07-13 17:40:01 +0100 |
commit | 01bebc66793f2cc65104452dc319a8a99f005934 (patch) | |
tree | b559bf839d1b8bcf88686e5a917a94caf286adae /include | |
parent | 5e0373b8e449b0c72495a6d8401c53f678b71988 (diff) |
[MIPS] Workaround for a sparse warning in include/asm-mips/compat.h
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>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-mips/compat.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/asm-mips/compat.h b/include/asm-mips/compat.h index 432653d7ae0..67c3f8ec030 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) |