From: "Michael S. Tsirkin" <mst-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: James Hogan <james.hogan-1AXoQHu6uovQT0dZR+AlfA@public.gmane.org>
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>,
linux-arch-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-metag-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH v2 09/40] metag/uaccess: fix sparse errors
Date: Wed, 7 Jan 2015 11:55:10 +0200 [thread overview]
Message-ID: <20150107095510.GA24828@redhat.com> (raw)
In-Reply-To: <54AD00AC.2030801-1AXoQHu6uovQT0dZR+AlfA@public.gmane.org>
On Wed, Jan 07, 2015 at 09:47:24AM +0000, James Hogan wrote:
> Hi Machael,
>
> On 06/01/15 15:43, Michael S. Tsirkin wrote:
> > 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-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> > ---
> > arch/metag/include/asm/uaccess.h | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/arch/metag/include/asm/uaccess.h b/arch/metag/include/asm/uaccess.h
> > index 0748b0a..c314b45 100644
> > --- a/arch/metag/include/asm/uaccess.h
> > +++ b/arch/metag/include/asm/uaccess.h
> > @@ -135,7 +135,7 @@ extern long __get_user_bad(void);
> > ({ \
> > long __gu_err, __gu_val; \
> > __get_user_size(__gu_val, (ptr), (size), __gu_err); \
> > - (x) = (__typeof__(*(ptr)))__gu_val; \
> > + (x) = (__force __typeof__(*(ptr)))__gu_val; \
>
> As I mentioned before, can you please adjust the position of the \ to
> line up.
> > __gu_err; \
> > })
> >
> > @@ -145,7 +145,7 @@ extern long __get_user_bad(void);
> > const __typeof__(*(ptr)) __user *__gu_addr = (ptr); \
> > if (access_ok(VERIFY_READ, __gu_addr, size)) \
> > __get_user_size(__gu_val, __gu_addr, (size), __gu_err); \
> > - (x) = (__typeof__(*(ptr)))__gu_val; \
> > + (x) = (__force __typeof__(*(ptr)))__gu_val; \
>
> same here (this one causes checkpatch error due to 80 column limit).
Oops. Sorry. Will fix both. I won't repost unless there are more issues.
>
> > __gu_err; \
> > })
> >
> >
>
> With those changes,
> Acked-by: James Hogan <james.hogan-1AXoQHu6uovQT0dZR+AlfA@public.gmane.org>
>
> Cheers
> James
>
--
To unsubscribe from this list: send the line "unsubscribe linux-metag" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2015-01-07 9:55 UTC|newest]
Thread overview: 5+ 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 ` [PATCH v2 09/40] metag/uaccess: fix sparse errors Michael S. Tsirkin
[not found] ` <1420558883-10131-10-git-send-email-mst-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-01-07 9:47 ` James Hogan
[not found] ` <54AD00AC.2030801-1AXoQHu6uovQT0dZR+AlfA@public.gmane.org>
2015-01-07 9:55 ` Michael S. Tsirkin [this message]
2015-01-06 15:44 ` [PATCH v2 20/40] metag: fix put_user " Michael S. Tsirkin
2015-01-07 9:55 ` James Hogan
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=20150107095510.GA24828@redhat.com \
--to=mst-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
--cc=arnd-r2nGTMty4D4@public.gmane.org \
--cc=james.hogan-1AXoQHu6uovQT0dZR+AlfA@public.gmane.org \
--cc=linux-arch-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-metag-u79uwXL29TY76Z2rM5mHXA@public.gmane.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