Skip to contentSkip to conversation

dm io:ctl remove vmalloc void cast

PATCH In review Alasdair G Kergon 1 participant 1 message Oct 12, 2007 Device mapper

lore
Share & tools
lore

Alasdair G Kergon

author maintainer
#0 lore raw

PATCH 13/25 dm io:ctl remove vmalloc void cast

From: Jesper Juhl <[email protected]>

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 *".

---
 drivers/md/dm-ioctl.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)
drivers/md/dm-ioctl.c +1 -1
Index: linux-2.6.23/drivers/md/dm-ioctl.c
===================================================================
@@ -1358,7 +1358,7 @@ static int copy_params(struct dm_ioctl _
 	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;