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

blackfin/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: Steven Miao <realmz6@gmail.com>

+1 -1
+1 -1
arch/blackfin/include/asm/uaccess.h
··· 147 147 } \ 148 148 } else \ 149 149 _err = -EFAULT; \ 150 - x = (typeof(*(ptr)))_val; \ 150 + x = (__force typeof(*(ptr)))_val; \ 151 151 _err; \ 152 152 }) 153 153