From: Ville Syrjälä <ville.syrj...@linux.intel.com> The casts in __copy_{from,to}_user_inatomic lead to sparse warnings. Drop the casts to get rid of the warnings.
Example: CHECK drivers/gpu/drm/i915/i915_gem.c arch/x86/include/asm/uaccess_64.h:213:40: warning: incorrect type in argument 1 (different address spaces) arch/x86/include/asm/uaccess_64.h:213:40: expected void [noderef] <asn:1>*dst arch/x86/include/asm/uaccess_64.h:213:40: got void *<noident> The warnings got introduced by this commit: commit ff47ab4ff3cddfa7bc1b25b990e24abe2ae474ff Author: Andi Kleen <a...@linux.intel.com> Date: Fri Aug 16 14:17:19 2013 -0700 x86: Add 1/2/4/8 byte optimization to 64bit __copy_{from,to}_user_inatomic Cc: Andi Kleen <a...@linux.intel.com> Cc: H. Peter Anvin <h...@linux.intel.com> Signed-off-by: Ville Syrjälä <ville.syrj...@linux.intel.com> --- arch/x86/include/asm/uaccess_64.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/include/asm/uaccess_64.h b/arch/x86/include/asm/uaccess_64.h index 190413d..12a26b9 100644 --- a/arch/x86/include/asm/uaccess_64.h +++ b/arch/x86/include/asm/uaccess_64.h @@ -204,13 +204,13 @@ int __copy_in_user(void __user *dst, const void __user *src, unsigned size) static __must_check __always_inline int __copy_from_user_inatomic(void *dst, const void __user *src, unsigned size) { - return __copy_from_user_nocheck(dst, (__force const void *)src, size); + return __copy_from_user_nocheck(dst, src, size); } static __must_check __always_inline int __copy_to_user_inatomic(void __user *dst, const void *src, unsigned size) { - return __copy_to_user_nocheck((__force void *)dst, src, size); + return __copy_to_user_nocheck(dst, src, size); } extern long __copy_user_nocache(void *dst, const void __user *src, -- 1.8.3.2 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/