Fix x86_64 put_user() sparse warnings
PATCH 1/1 Fix x86_64 put_user() sparse warnings
This may not be 2.6.10 material -- if not please queue for 2.6.11.
Thanks,
Roland
Fix sparse warnings
warning: cast removes address space of expression
for uses of put_user() on x86_64 caused by doing __m(addr) in __put_user_asm() with addr a __user pointer.
Signed-off-by Roland Dreier <[email protected]>
include/asm-x86_64/uaccess.h +1 -1
@@ -172,7 +172,7 @@/* FIXME: this hack is definitely wrong -AK */ struct __large_struct {unsigned long buf[100 ]; }; -#define __m (x) (*(struct __large_struct *)(x)) +#define __m (x) (*(struct __large_struct __user *)(x))/* * Tell gcc we read from memory instead of writing: this is because