From: Greg KH <greg@kroah.com>
To: Camille Bordignon <camille.bordignon@gmail.com>
Cc: arve@android.com, devel@driverdev.osuosl.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] staging: android: Fix warning cast removes address space of expression
Date: Fri, 25 Apr 2014 15:16:25 -0700 [thread overview]
Message-ID: <20140425221625.GA2936@kroah.com> (raw)
In-Reply-To: <1397985057.12169.7.camel@vash.home>
On Sun, Apr 20, 2014 at 11:10:57AM +0200, Camille Bordignon wrote:
> Fix sparse warning "cast removes address space of expression"
> Add lost flag "__user" due to cast
>
> Signed-off-by: Camille Bordignon <camille.bordignon@gmail.com>
> ---
> diff --git a/drivers/staging/android/binder.c b/drivers/staging/android/binder.c
> index cfe4bc8..952c4ae 100644
> --- a/drivers/staging/android/binder.c
> +++ b/drivers/staging/android/binder.c
> @@ -2683,16 +2683,21 @@ static long binder_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
> binder_free_thread(proc, thread);
> thread = NULL;
> break;
> - case BINDER_VERSION:
> - if (size != sizeof(struct binder_version)) {
> + case BINDER_VERSION: {
> + struct binder_version __user *bv = ubuf;
> +
> + if (size != sizeof(*bv)) {
> ret = -EINVAL;
> goto err;
> }
> - if (put_user(BINDER_CURRENT_PROTOCOL_VERSION, &((struct binder_version *)ubuf)->protocol_version)) {
> +
> + if (put_user(BINDER_CURRENT_PROTOCOL_VERSION,
> + &bv->protocol_version)) {
> ret = -EINVAL;
> goto err;
> }
> break;
> + }
> default:
> ret = -EINVAL;
> goto err;
>
>
This does not apply to my tree :(
prev parent reply other threads:[~2014-04-25 22:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-20 9:10 [PATCH 1/1] staging: android: Fix warning cast removes address space of expression Camille Bordignon
2014-04-22 10:36 ` Dan Carpenter
2014-04-25 22:16 ` Greg KH [this message]
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=20140425221625.GA2936@kroah.com \
--to=greg@kroah.com \
--cc=arve@android.com \
--cc=camille.bordignon@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=linux-kernel@vger.kernel.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