Browse Source

parisc/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: Helge Deller <deller@gmx.de>
Michael S. Tsirkin 10 years ago
parent
commit
079f0f269f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      arch/parisc/include/asm/uaccess.h

+ 1 - 1
arch/parisc/include/asm/uaccess.h

@@ -104,7 +104,7 @@ struct exception_data {
 	    }                                           \
 	}                                               \
 							\
-	(x) = (__typeof__(*(ptr))) __gu_val;            \
+	(x) = (__force __typeof__(*(ptr))) __gu_val;	\
 	__gu_err;                                       \
 })