]> git.karo-electronics.de Git - linux-beck.git/commitdiff
blackfin/uaccess: fix sparse errors
authorMichael S. Tsirkin <mst@redhat.com>
Thu, 11 Dec 2014 23:56:04 +0000 (01:56 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Tue, 13 Jan 2015 13:23:07 +0000 (15:23 +0200)
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>
arch/blackfin/include/asm/uaccess.h

index 57701c3b8a591b35b60d88807c1d1f479b018423..2dcc9303355df04080897f50a9bc5c16f84153fe 100644 (file)
@@ -147,7 +147,7 @@ static inline int bad_user_access_length(void)
                }                                               \
        } else                                                  \
                _err = -EFAULT;                                 \
-       x = (typeof(*(ptr)))_val;                               \
+       x = (__force typeof(*(ptr)))_val;                       \
        _err;                                                   \
 })