All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch 2/2] Staging: vme: silence a Sparse warning
@ 2012-07-06  8:21 Dan Carpenter
  2012-07-06 10:35 ` Martyn Welch
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2012-07-06  8:21 UTC (permalink / raw)
  To: kernel-janitors

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");

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-07-06 10:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-06  8:21 [patch 2/2] Staging: vme: silence a Sparse warning Dan Carpenter
2012-07-06 10:35 ` Martyn Welch

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.