dm io:ctl remove vmalloc void cast
authorJesper Juhl <jesper.juhl@gmail.com>
Fri, 19 Oct 2007 21:38:54 +0000 (22:38 +0100)
committerAlasdair G Kergon <agk@redhat.com>
Sat, 20 Oct 2007 01:01:10 +0000 (02:01 +0100)
In drivers/md/dm-ioctl.c::copy_params() there's a call to vmalloc()
where we currently cast the return value, but that's pretty pointless
given that vmalloc() returns "void *".

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
drivers/md/dm-ioctl.c

index ba5d8f7cc5f2646430d0b081cc96904bc1381106..6af95f9b7b528ca92e3caba3d5edb8cb5d64a1fa 100644 (file)
@@ -1358,7 +1358,7 @@ static int copy_params(struct dm_ioctl __user *user, struct dm_ioctl **param)
        if (tmp.data_size < sizeof(tmp))
                return -EINVAL;
 
-       dmi = (struct dm_ioctl *) vmalloc(tmp.data_size);
+       dmi = vmalloc(tmp.data_size);
        if (!dmi)
                return -ENOMEM;