From: Martyn Welch <martyn.welch@ge.com>
To: kernel-janitors@vger.kernel.org
Subject: Re: [patch 2/2] Staging: vme: silence a Sparse warning
Date: Fri, 06 Jul 2012 10:35:46 +0000 [thread overview]
Message-ID: <4FF6BF82.8040704@ge.com> (raw)
In-Reply-To: <20120706082149.GB12470@elgon.mountain>
On 06/07/12 09:21, Dan Carpenter wrote:
> Sparse complains that "arg" is not a __user pointer. The "argp" and
> "arg" variables are equivalent but argp is declared as a __user pointer.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/drivers/staging/vme/devices/vme_user.c b/drivers/staging/vme/devices/vme_user.c
> index be198c0..4363ed5 100644
> --- a/drivers/staging/vme/devices/vme_user.c
> +++ b/drivers/staging/vme/devices/vme_user.c
> @@ -471,7 +471,7 @@ static int vme_user_ioctl(struct inode *inode, struct file *file,
> case CONTROL_MINOR:
> switch (cmd) {
> case VME_IRQ_GEN:
> - copied = copy_from_user(&irq_req, (char *)arg,
> + copied = copy_from_user(&irq_req, argp,
> sizeof(struct vme_irq_id));
> if (copied != 0) {
> printk(KERN_WARNING "Partial copy from userspace\n");
>
Looks OK to me:
Acked-By: Martyn Welch <martyn.welch@ge.com>
--
Martyn Welch (Lead Software Engineer) | Registered in England and Wales
GE Intelligent Platforms | (3828642) at 100 Barbirolli Square
T +44(0)1327322748 | Manchester, M2 3AB
E martyn.welch@ge.com | VAT:GB 927559189
prev parent reply other threads:[~2012-07-06 10:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-06 8:21 [patch 2/2] Staging: vme: silence a Sparse warning Dan Carpenter
2012-07-06 10:35 ` Martyn Welch [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=4FF6BF82.8040704@ge.com \
--to=martyn.welch@ge.com \
--cc=kernel-janitors@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.