diff options
author | Michael S. Tsirkin <mst@redhat.com> | 2014-12-12 01:56:04 +0200 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2015-01-13 15:23:04 +0200 |
commit | 7f0db2bec363bf1a4d6da2572491c634a34dcad8 (patch) | |
tree | c1d769392ce81cc5a63c078a975d020831d8b09c /arch/avr32 | |
parent | 58fff51784cb5e1bcc06a1417be26eec4288507c (diff) | |
download | blackbird-op-linux-7f0db2bec363bf1a4d6da2572491c634a34dcad8.tar.gz blackbird-op-linux-7f0db2bec363bf1a4d6da2572491c634a34dcad8.zip |
avr32/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: Hans-Christian Egtvedt <egtvedt@samfundet.no>
Diffstat (limited to 'arch/avr32')
-rw-r--r-- | arch/avr32/include/asm/uaccess.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/avr32/include/asm/uaccess.h b/arch/avr32/include/asm/uaccess.h index 245b2ee213c9..ccd07c456f9a 100644 --- a/arch/avr32/include/asm/uaccess.h +++ b/arch/avr32/include/asm/uaccess.h @@ -191,7 +191,7 @@ extern int __put_user_bad(void); default: __gu_err = __get_user_bad(); break; \ } \ \ - x = (typeof(*(ptr)))__gu_val; \ + x = (__force typeof(*(ptr)))__gu_val; \ __gu_err; \ }) @@ -222,7 +222,7 @@ extern int __put_user_bad(void); } else { \ __gu_err = -EFAULT; \ } \ - x = (typeof(*(ptr)))__gu_val; \ + x = (__force typeof(*(ptr)))__gu_val; \ __gu_err; \ }) |