parisc/uaccess: fix sparse errors
authorMichael S. Tsirkin <mst@redhat.com>
Tue, 6 Jan 2015 15:44:10 +0000 (17:44 +0200)
committerHelge Deller <deller@gmx.de>
Mon, 16 Feb 2015 21:41:27 +0000 (22:41 +0100)
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: Helge Deller <deller@gmx.de>
Signed-off-by: Helge Deller <deller@gmx.de>
arch/parisc/include/asm/uaccess.h

index a5cb070b54bf4ade7cce44e50f763a5223991e83..6c79311acdafe4f929f888eb3cdd0702647ce579 100644 (file)
@@ -104,7 +104,7 @@ struct exception_data {
            }                                           \
        }                                               \
                                                        \
-       (x) = (__typeof__(*(ptr))) __gu_val;            \
+       (x) = (__force __typeof__(*(ptr))) __gu_val;    \
        __gu_err;                                       \
 })