Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ia64/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>

+1 -1
+1 -1
arch/ia64/include/asm/uaccess.h
··· 197 197 case 8: __get_user_size(__gu_val, __gu_ptr, 8, __gu_err); break; \ 198 198 default: __get_user_unknown(); break; \ 199 199 } \ 200 - (x) = (__typeof__(*(__gu_ptr))) __gu_val; \ 200 + (x) = (__force __typeof__(*(__gu_ptr))) __gu_val; \ 201 201 __gu_err; \ 202 202 }) 203 203