Staging: lustre: osc: 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>
This commit is contained in:
parent
45b30514a3
commit
b785675385
1 changed files with 2 additions and 2 deletions
|
@ -2665,7 +2665,7 @@ static int osc_iocontrol(unsigned int cmd, struct obd_export *exp, int len,
|
||||||
|
|
||||||
buf = NULL;
|
buf = NULL;
|
||||||
len = 0;
|
len = 0;
|
||||||
if (obd_ioctl_getdata(&buf, &len, (void *)uarg)) {
|
if (obd_ioctl_getdata(&buf, &len, uarg)) {
|
||||||
err = -EINVAL;
|
err = -EINVAL;
|
||||||
goto out;
|
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));
|
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)
|
if (err)
|
||||||
err = -EFAULT;
|
err = -EFAULT;
|
||||||
obd_ioctl_freedata(buf, len);
|
obd_ioctl_freedata(buf, len);
|
||||||
|
|
Loading…
Add table
Reference in a new issue