mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -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
|
|
@ -2147,7 +2147,7 @@ static int ide_floppy_probe(ide_drive_t *drive)
|
|||
printk("ide-floppy: passing drive %s to ide-scsi emulation.\n", drive->name);
|
||||
goto failed;
|
||||
}
|
||||
if ((floppy = (idefloppy_floppy_t *) kzalloc (sizeof (idefloppy_floppy_t), GFP_KERNEL)) == NULL) {
|
||||
if ((floppy = kzalloc(sizeof (idefloppy_floppy_t), GFP_KERNEL)) == NULL) {
|
||||
printk (KERN_ERR "ide-floppy: %s: Can't allocate a floppy structure\n", drive->name);
|
||||
goto failed;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2573,11 +2573,11 @@ static idetape_stage_t *__idetape_kmalloc_stage (idetape_tape_t *tape, int full,
|
|||
int pages = tape->pages_per_stage;
|
||||
char *b_data = NULL;
|
||||
|
||||
if ((stage = (idetape_stage_t *) kmalloc (sizeof (idetape_stage_t),GFP_KERNEL)) == NULL)
|
||||
if ((stage = kmalloc(sizeof (idetape_stage_t),GFP_KERNEL)) == NULL)
|
||||
return NULL;
|
||||
stage->next = NULL;
|
||||
|
||||
bh = stage->bh = (struct idetape_bh *)kmalloc(sizeof(struct idetape_bh), GFP_KERNEL);
|
||||
bh = stage->bh = kmalloc(sizeof(struct idetape_bh), GFP_KERNEL);
|
||||
if (bh == NULL)
|
||||
goto abort;
|
||||
bh->b_reqnext = NULL;
|
||||
|
|
@ -2607,7 +2607,7 @@ static idetape_stage_t *__idetape_kmalloc_stage (idetape_tape_t *tape, int full,
|
|||
continue;
|
||||
}
|
||||
prev_bh = bh;
|
||||
if ((bh = (struct idetape_bh *)kmalloc(sizeof(struct idetape_bh), GFP_KERNEL)) == NULL) {
|
||||
if ((bh = kmalloc(sizeof(struct idetape_bh), GFP_KERNEL)) == NULL) {
|
||||
free_page((unsigned long) b_data);
|
||||
goto abort;
|
||||
}
|
||||
|
|
@ -4860,7 +4860,7 @@ static int ide_tape_probe(ide_drive_t *drive)
|
|||
printk(KERN_WARNING "ide-tape: Use drive %s with ide-scsi emulation and osst.\n", drive->name);
|
||||
printk(KERN_WARNING "ide-tape: OnStream support will be removed soon from ide-tape!\n");
|
||||
}
|
||||
tape = (idetape_tape_t *) kzalloc (sizeof (idetape_tape_t), GFP_KERNEL);
|
||||
tape = kzalloc(sizeof (idetape_tape_t), GFP_KERNEL);
|
||||
if (tape == NULL) {
|
||||
printk(KERN_ERR "ide-tape: %s: Can't allocate a tape structure\n", drive->name);
|
||||
goto failed;
|
||||
|
|
|
|||
Loading…
Reference in a new issue