aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-mips/compat.h
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2007-07-23 05:20:10 -0400
committerDavid Woodhouse <dwmw2@infradead.org>2007-07-23 05:20:10 -0400
commit39fe5434cb9de5da40510028b17b96bc4eb312b3 (patch)
tree7a02a317b9ad57da51ca99887c119e779ccf3f13 /include/asm-mips/compat.h
parent0fc72b81d3111d114ab378935b1cf07680ca1289 (diff)
parentf695baf2df9e0413d3521661070103711545207a (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'include/asm-mips/compat.h')
-rw-r--r--include/asm-mips/compat.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/asm-mips/compat.h b/include/asm-mips/compat.h
index 432653d7ae09..568c76cdd900 100644
--- a/include/asm-mips/compat.h
+++ b/include/asm-mips/compat.h
@@ -37,8 +37,10 @@ typedef s32 compat_key_t;
37 37
38typedef s32 compat_int_t; 38typedef s32 compat_int_t;
39typedef s32 compat_long_t; 39typedef s32 compat_long_t;
40typedef s64 compat_s64;
40typedef u32 compat_uint_t; 41typedef u32 compat_uint_t;
41typedef u32 compat_ulong_t; 42typedef u32 compat_ulong_t;
43typedef u64 compat_u64;
42 44
43struct compat_timespec { 45struct compat_timespec {
44 compat_time_t tv_sec; 46 compat_time_t tv_sec;
@@ -132,7 +134,8 @@ typedef u32 compat_uptr_t;
132 134
133static inline void __user *compat_ptr(compat_uptr_t uptr) 135static inline void __user *compat_ptr(compat_uptr_t uptr)
134{ 136{
135 return (void __user *)(long)uptr; 137 /* cast to a __user pointer via "unsigned long" makes sparse happy */
138 return (void __user *)(unsigned long)(long)uptr;
136} 139}
137 140
138static inline compat_uptr_t ptr_to_compat(void __user *uptr) 141static inline compat_uptr_t ptr_to_compat(void __user *uptr)