Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 09a2f7cf authored by Michael S. Tsirkin's avatar Michael S. Tsirkin
Browse files

m68k/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: default avatarMichael S. Tsirkin <mst@redhat.com>
Acked-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
parent 1d638efc
Loading
Loading
Loading
Loading
+20 −20
Original line number Original line Diff line number Diff line
@@ -146,7 +146,7 @@ asm volatile ("\n" \
		"	.previous"					\
		"	.previous"					\
		: "+d" (res), "=&" #reg (__gu_val)			\
		: "+d" (res), "=&" #reg (__gu_val)			\
		: "m" (*(ptr)), "i" (err));				\
		: "m" (*(ptr)), "i" (err));				\
	(x) = (typeof(*(ptr)))(unsigned long)__gu_val;		\
	(x) = (__force typeof(*(ptr)))(__force unsigned long)__gu_val;	\
})
})


#define __get_user(x, ptr)						\
#define __get_user(x, ptr)						\
@@ -188,7 +188,7 @@ asm volatile ("\n" \
			  "+a" (__gu_ptr)				\
			  "+a" (__gu_ptr)				\
			: "i" (-EFAULT)					\
			: "i" (-EFAULT)					\
			: "memory");					\
			: "memory");					\
		(x) = (typeof(*(ptr)))__gu_val;				\
		(x) = (__force typeof(*(ptr)))__gu_val;			\
		break;							\
		break;							\
	    }	*/							\
	    }	*/							\
	default:							\
	default:							\