Staging: lustre: osc: Drop unnecessary cast on void *
authorShraddha Barke <shraddha.6596@gmail.com>
Tue, 4 Aug 2015 17:32:34 +0000 (23:02 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Aug 2015 19:18:00 +0000 (12:18 -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
|
- (T *)
  e
)

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

index 96c80e9bf92d4a5faf403b95afc78707e56fef68..12113dfd87b8e614f948a9162442ba44b6f61894 100644 (file)
@@ -2665,7 +2665,7 @@ static int osc_iocontrol(unsigned int cmd, struct obd_export *exp, int len,
 
                buf = NULL;
                len = 0;
-               if (obd_ioctl_getdata(&buf, &len, (void *)uarg)) {
+               if (obd_ioctl_getdata(&buf, &len, uarg)) {
                        err = -EINVAL;
                        goto out;
                }
@@ -2695,7 +2695,7 @@ static int osc_iocontrol(unsigned int cmd, struct obd_export *exp, int len,
 
                memcpy(data->ioc_inlbuf2, &obd->obd_uuid, sizeof(uuid));
 
-               err = copy_to_user((void *)uarg, buf, len);
+               err = copy_to_user(uarg, buf, len);
                if (err)
                        err = -EFAULT;
                obd_ioctl_freedata(buf, len);