linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: mst@redhat.com (Michael S. Tsirkin)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 03/40] arm64/uaccess: fix sparse errors
Date: Tue, 6 Jan 2015 17:43:40 +0200	[thread overview]
Message-ID: <1420558883-10131-4-git-send-email-mst@redhat.com> (raw)
In-Reply-To: <1420558883-10131-1-git-send-email-mst@redhat.com>

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: Will Deacon <will.deacon@arm.com>
---
 arch/arm64/include/asm/uaccess.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/include/asm/uaccess.h b/arch/arm64/include/asm/uaccess.h
index 3bf8f4e..9a2069b 100644
--- a/arch/arm64/include/asm/uaccess.h
+++ b/arch/arm64/include/asm/uaccess.h
@@ -147,7 +147,7 @@ do {									\
 	default:							\
 		BUILD_BUG();						\
 	}								\
-	(x) = (__typeof__(*(ptr)))__gu_val;				\
+	(x) = (__force __typeof__(*(ptr)))__gu_val;			\
 } while (0)
 
 #define __get_user(x, ptr)						\
-- 
MST

       reply	other threads:[~2015-01-06 15:43 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1420558883-10131-1-git-send-email-mst@redhat.com>
2015-01-06 15:43 ` Michael S. Tsirkin [this message]
2015-01-06 19:14   ` [PATCH v2 03/40] arm64/uaccess: fix sparse errors Will Deacon
2015-01-06 21:48     ` Michael S. Tsirkin
2015-01-06 21:51       ` Michael S. Tsirkin
2015-01-07 10:09         ` Will Deacon
2015-01-06 15:44 ` [PATCH v2 17/40] arm: fix put_user " Michael S. Tsirkin
2015-01-06 15:45 ` [PATCH v2 30/40] arm: macro whitespace fixes Michael S. Tsirkin
2015-01-06 15:45 ` [PATCH v2 31/40] arm64: " Michael S. Tsirkin
2015-01-07 10:10   ` Will Deacon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1420558883-10131-4-git-send-email-mst@redhat.com \
    --to=mst@redhat.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).