X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=kernel%2Fdrivers%2Fstaging%2Flustre%2Flustre%2Flibcfs%2Flinux%2Flinux-module.c;h=70a99cf019de51be8e2fce8fc5ab436c9aaa7b3b;hb=e09b41010ba33a20a87472ee821fa407a5b8da36;hp=e962f89683a60cdb68ee67b3070bc185d783027e;hpb=9ca8dbcc65cfc63d6f5ef3312a33184e1d726e00;p=kvmfornfv.git diff --git a/kernel/drivers/staging/lustre/lustre/libcfs/linux/linux-module.c b/kernel/drivers/staging/lustre/lustre/libcfs/linux/linux-module.c index e962f8968..70a99cf01 100644 --- a/kernel/drivers/staging/lustre/lustre/libcfs/linux/linux-module.c +++ b/kernel/drivers/staging/lustre/lustre/libcfs/linux/linux-module.c @@ -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) {