From: Michael S. Tsirkin Date: Tue, 27 Jan 2015 16:20:10 +0000 (+0100) Subject: CRIS: uaccess: fix sparse errors X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=458e3192455547bb4dce27e060c24cc22a2bd87d;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git CRIS: uaccess: fix sparse errors virtio wants to read bitwise types from userspace using get_user. At the moment this triggers sparse errors, since the value is passed through an integer. Fix that up using __force. Signed-off-by: Michael S. Tsirkin Signed-off-by: Jesper Nilsson --- diff --git a/arch/cris/include/asm/uaccess.h b/arch/cris/include/asm/uaccess.h index 914540801c5e..9cf5a23baed3 100644 --- a/arch/cris/include/asm/uaccess.h +++ b/arch/cris/include/asm/uaccess.h @@ -153,7 +153,7 @@ struct __large_struct { unsigned long buf[100]; }; ({ \ long __gu_err, __gu_val; \ __get_user_size(__gu_val,(ptr),(size),__gu_err); \ - (x) = (__typeof__(*(ptr)))__gu_val; \ + (x) = (__force __typeof__(*(ptr)))__gu_val; \ __gu_err; \ }) @@ -163,7 +163,7 @@ struct __large_struct { unsigned long buf[100]; }; const __typeof__(*(ptr)) *__gu_addr = (ptr); \ if (access_ok(VERIFY_READ,__gu_addr,size)) \ __get_user_size(__gu_val,__gu_addr,(size),__gu_err); \ - (x) = (__typeof__(*(ptr)))__gu_val; \ + (x) = (__force __typeof__(*(ptr)))__gu_val; \ __gu_err; \ })