diff options
author | Shraddha Barke <shraddha.6596@gmail.com> | 2015-08-04 23:02:33 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-08-05 12:18:00 -0700 |
commit | a12aaa92f3ccd15015e01373c2b60a3841aaebbb (patch) | |
tree | 4d909006f861463e8023fc36723e19c44ab62692 /drivers | |
parent | 946b254697655f0ea0c54b1b0e20fb3b9aab99da (diff) | |
download | op-kernel-dev-a12aaa92f3ccd15015e01373c2b60a3841aaebbb.zip op-kernel-dev-a12aaa92f3ccd15015e01373c2b60a3841aaebbb.tar.gz |
Staging: lustre: libcfs: Drop unnecessary cast on void*
This patch does away with the cast on void * as it is unnecessary.
Semantic patch used is as follows:
@r@
expression x;
void* e;
type T;
identifier f;
@@
(
*((T *)e)
|
((T *)x)[...]
|
((T *)x)->f
|
- (T *)
e
)
Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/lustre/lustre/libcfs/linux/linux-module.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/lustre/lustre/libcfs/linux/linux-module.c b/drivers/staging/lustre/lustre/libcfs/linux/linux-module.c index e962f89..78acff0 100644 --- a/drivers/staging/lustre/lustre/libcfs/linux/linux-module.c +++ b/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) { @@ -69,7 +69,7 @@ int libcfs_ioctl_getdata(char *buf, char *end, void *arg) } 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; |