m68k/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 <mst@redhat.com>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
This commit is contained in:
Michael S. Tsirkin 2014-12-12 01:56:04 +02:00
parent 1d638efce8
commit 09a2f7cf6a

View File

@ -146,7 +146,7 @@ asm volatile ("\n" \
" .previous" \
: "+d" (res), "=&" #reg (__gu_val) \
: "m" (*(ptr)), "i" (err)); \
(x) = (typeof(*(ptr)))(unsigned long)__gu_val; \
(x) = (__force typeof(*(ptr)))(__force unsigned long)__gu_val; \
})
#define __get_user(x, ptr) \
@ -188,7 +188,7 @@ asm volatile ("\n" \
"+a" (__gu_ptr) \
: "i" (-EFAULT) \
: "memory"); \
(x) = (typeof(*(ptr)))__gu_val; \
(x) = (__force typeof(*(ptr)))__gu_val; \
break; \
} */ \
default: \