From: Andi Kleen Date: Fri, 29 Sep 2006 23:47:55 +0000 (+0200) Subject: [PATCH] Add proper sparse __user casts to __copy_to_user_inatomic X-Git-Tag: v2.6.19-rc1~646^2~10 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=b885808e185a4ec2dfe16c84434f79e95f0245b0;p=linux-2.6-omap-h63xx.git [PATCH] Add proper sparse __user casts to __copy_to_user_inatomic Noticed by Al Viro Cc: viro@ftp.linux.org.uk Signed-off-by: Andi Kleen --- diff --git a/include/asm-x86_64/uaccess.h b/include/asm-x86_64/uaccess.h index e856570c068..19f99178fe8 100644 --- a/include/asm-x86_64/uaccess.h +++ b/include/asm-x86_64/uaccess.h @@ -361,6 +361,11 @@ __must_check unsigned long clear_user(void __user *mem, unsigned long len); __must_check unsigned long __clear_user(void __user *mem, unsigned long len); __must_check long __copy_from_user_inatomic(void *dst, const void __user *src, unsigned size); -#define __copy_to_user_inatomic copy_user_generic + +static __must_check __always_inline int +__copy_to_user_inatomic(void __user *dst, const void *src, unsigned size) +{ + return copy_user_generic((__force void *)dst, src, size); +} #endif /* __X86_64_UACCESS_H */