aboutsummaryrefslogtreecommitdiffstats
path: root/arch/avr32/include/asm
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2014-12-11 18:56:04 -0500
committerMichael S. Tsirkin <mst@redhat.com>2015-01-13 08:23:04 -0500
commit7f0db2bec363bf1a4d6da2572491c634a34dcad8 (patch)
treec1d769392ce81cc5a63c078a975d020831d8b09c /arch/avr32/include/asm
parent58fff51784cb5e1bcc06a1417be26eec4288507c (diff)
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/include/asm')
-rw-r--r--arch/avr32/include/asm/uaccess.h4
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);
191 default: __gu_err = __get_user_bad(); break; \ 191 default: __gu_err = __get_user_bad(); break; \
192 } \ 192 } \
193 \ 193 \
194 x = (typeof(*(ptr)))__gu_val; \ 194 x = (__force typeof(*(ptr)))__gu_val; \
195 __gu_err; \ 195 __gu_err; \
196}) 196})
197 197
@@ -222,7 +222,7 @@ extern int __put_user_bad(void);
222 } else { \ 222 } else { \
223 __gu_err = -EFAULT; \ 223 __gu_err = -EFAULT; \
224 } \ 224 } \
225 x = (typeof(*(ptr)))__gu_val; \ 225 x = (__force typeof(*(ptr)))__gu_val; \
226 __gu_err; \ 226 __gu_err; \
227}) 227})
228 228