From: Michael S. Tsirkin Date: Tue, 6 Jan 2015 12:37:22 +0000 (+0200) Subject: metag: fix put_user sparse errors X-Git-Tag: omap-for-v4.1/prcm-dts-mfd-syscon-fix~43^2^2~18 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9ef8dc161faaa24c58322aa928b3216213621daa;p=pandora-kernel.git metag: fix put_user sparse errors virtio wants to write bitwise types to userspace using put_user. At the moment this triggers sparse errors, since the value is passed through an integer. For example: __le32 __user *p; __le32 x; put_user(x, p); is safe, but currently triggers a sparse warning. Fix that up using __force. This also fixes warnings due to writing a pointer out to userland. Note: this does not suppress any useful sparse checks since callers do a cast (__typeof__(*(ptr))) (x) which in turn forces all the necessary type checks. Suggested-by: James Hogan Signed-off-by: Michael S. Tsirkin Acked-by: James Hogan --- Reading git-diff-tree failed