Staging: vme: silence a Sparse warning
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 6 Jul 2012 08:21:49 +0000 (11:21 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Jul 2012 23:23:59 +0000 (16:23 -0700)
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>
Acked-By: Martyn Welch <martyn.welch@ge.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vme/devices/vme_user.c

index e24a6f95db126342c910f565588fb2c5a5840729..0c2479e4193834b9b9cbbafb025e5261c9d28427 100644 (file)
@@ -474,7 +474,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");