Staging: lustre: libcfs: Remove unnecessary cast on void*
authorShraddha Barke <shraddha.6596@gmail.com>
Mon, 10 Aug 2015 08:00:34 +0000 (13:30 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 15 Aug 2015 01:44:45 +0000 (18:44 -0700)
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
|
- (void *)
  e
)

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/libcfs/module.c

index 1ab4232e0705effc18e7f6991b04b041fe42097d..ef8f12693051e4cfa7be9f8ad665ecb262445392 100644 (file)
@@ -335,7 +335,7 @@ static int libcfs_ioctl(struct cfs_psdev_file *pfile, unsigned long cmd, void *a
                return -ENOMEM;
 
        /* 'cmd' and permissions get checked in our arch-specific caller */
-       if (libcfs_ioctl_getdata(buf, buf + 800, (void *)arg)) {
+       if (libcfs_ioctl_getdata(buf, buf + 800, arg)) {
                CERROR("PORTALS ioctl: data error\n");
                err = -EINVAL;
                goto out;