mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
[PATCH] getting rid of all casts of k[cmz]alloc() calls
Run this: #!/bin/sh for f in $(grep -Erl "\([^\)]*\) *k[cmz]alloc" *) ; do echo "De-casting $f..." perl -pi -e "s/ ?= ?\([^\)]*\) *(k[cmz]alloc) *\(/ = \1\(/" $f done And then go through and reinstate those cases where code is casting pointers to non-pointers. And then drop a few hunks which conflicted with outstanding work. Cc: Russell King <[email protected]>, Ian Molton <[email protected]> Cc: Mikael Starvik <[email protected]> Cc: Yoshinori Sato <[email protected]> Cc: Roman Zippel <[email protected]> Cc: Geert Uytterhoeven <[email protected]> Cc: Ralf Baechle <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Kyle McMartin <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Cc: Martin Schwidefsky <[email protected]> Cc: "David S. Miller" <[email protected]> Cc: Jeff Dike <[email protected]> Cc: Greg KH <[email protected]> Cc: Jens Axboe <[email protected]> Cc: Paul Fulghum <[email protected]> Cc: Alan Cox <[email protected]> Cc: Karsten Keil <[email protected]> Cc: Mauro Carvalho Chehab <[email protected]> Cc: Jeff Garzik <[email protected]> Cc: James Bottomley <[email protected]> Cc: Ian Kent <[email protected]> Cc: Steven French <[email protected]> Cc: David Woodhouse <[email protected]> Cc: Neil Brown <[email protected]> Cc: Jaroslav Kysela <[email protected]> Cc: Takashi Iwai <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
0743b86800
commit
5cbded585d
172 changed files with 250 additions and 250 deletions
|
|
@ -1810,7 +1810,7 @@ static int dvd_read_disckey(struct cdrom_device_info *cdi, dvd_struct *s)
|
|||
|
||||
size = sizeof(s->disckey.value) + 4;
|
||||
|
||||
if ((buf = (u_char *) kmalloc(size, GFP_KERNEL)) == NULL)
|
||||
if ((buf = kmalloc(size, GFP_KERNEL)) == NULL)
|
||||
return -ENOMEM;
|
||||
|
||||
init_cdrom_command(&cgc, buf, size, CGC_DATA_READ);
|
||||
|
|
@ -1861,7 +1861,7 @@ static int dvd_read_manufact(struct cdrom_device_info *cdi, dvd_struct *s)
|
|||
|
||||
size = sizeof(s->manufact.value) + 4;
|
||||
|
||||
if ((buf = (u_char *) kmalloc(size, GFP_KERNEL)) == NULL)
|
||||
if ((buf = kmalloc(size, GFP_KERNEL)) == NULL)
|
||||
return -ENOMEM;
|
||||
|
||||
init_cdrom_command(&cgc, buf, size, CGC_DATA_READ);
|
||||
|
|
@ -2849,7 +2849,7 @@ static int mmc_ioctl(struct cdrom_device_info *cdi, unsigned int cmd,
|
|||
/* FIXME: we need upper bound checking, too!! */
|
||||
if (lba < 0)
|
||||
return -EINVAL;
|
||||
cgc.buffer = (char *) kmalloc(blocksize, GFP_KERNEL);
|
||||
cgc.buffer = kmalloc(blocksize, GFP_KERNEL);
|
||||
if (cgc.buffer == NULL)
|
||||
return -ENOMEM;
|
||||
memset(&sense, 0, sizeof(sense));
|
||||
|
|
@ -3031,7 +3031,7 @@ static int mmc_ioctl(struct cdrom_device_info *cdi, unsigned int cmd,
|
|||
int size = sizeof(dvd_struct);
|
||||
if (!CDROM_CAN(CDC_DVD))
|
||||
return -ENOSYS;
|
||||
if ((s = (dvd_struct *) kmalloc(size, GFP_KERNEL)) == NULL)
|
||||
if ((s = kmalloc(size, GFP_KERNEL)) == NULL)
|
||||
return -ENOMEM;
|
||||
cdinfo(CD_DO_IOCTL, "entering DVD_READ_STRUCT\n");
|
||||
if (copy_from_user(s, (dvd_struct __user *)arg, size)) {
|
||||
|
|
|
|||
|
|
@ -1420,7 +1420,7 @@ int __init cm206_init(void)
|
|||
return -EIO;
|
||||
}
|
||||
printk(" adapter at 0x%x", cm206_base);
|
||||
cd = (struct cm206_struct *) kmalloc(size, GFP_KERNEL);
|
||||
cd = kmalloc(size, GFP_KERNEL);
|
||||
if (!cd)
|
||||
goto out_base;
|
||||
/* Now we have found the adaptor card, try to reset it. As we have
|
||||
|
|
|
|||
Loading…
Reference in a new issue