These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git] / kernel / drivers / staging / lustre / lustre / libcfs / linux / linux-module.c
index e962f89..70a99cf 100644 (file)
@@ -49,7 +49,7 @@ int libcfs_ioctl_getdata(char *buf, char *end, void *arg)
        hdr = (struct libcfs_ioctl_hdr *)buf;
        data = (struct libcfs_ioctl_data *)buf;
 
-       if (copy_from_user(buf, (void *)arg, sizeof(*hdr)))
+       if (copy_from_user(buf, arg, sizeof(*hdr)))
                return -EFAULT;
 
        if (hdr->ioc_version != LIBCFS_IOCTL_VERSION) {
@@ -62,14 +62,13 @@ int libcfs_ioctl_getdata(char *buf, char *end, void *arg)
                return -EINVAL;
        }
 
-
        if (hdr->ioc_len < sizeof(struct libcfs_ioctl_data)) {
                CERROR("PORTALS: user buffer too small for ioctl\n");
                return -EINVAL;
        }
 
        orig_len = hdr->ioc_len;
-       if (copy_from_user(buf, (void *)arg, hdr->ioc_len))
+       if (copy_from_user(buf, arg, hdr->ioc_len))
                return -EFAULT;
        if (orig_len != data->ioc_len)
                return -EINVAL;
@@ -96,8 +95,6 @@ int libcfs_ioctl_popdata(void *arg, void *data, int size)
        return 0;
 }
 
-extern struct cfs_psdev_ops      libcfs_psdev_ops;
-
 static int
 libcfs_psdev_open(struct inode *inode, struct file *file)
 {