diff options
author | Robert P. J. Day <rpjday@mindspring.com> | 2006-12-13 03:35:56 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-13 12:05:58 -0500 |
commit | 5cbded585d129d0226cb48ac4202b253c781be26 (patch) | |
tree | fb24edc194a57ee81a3bf8a4dd8a95030dd0ad22 /drivers/isdn/divert | |
parent | 0743b86800cf1dfbf96df4a438938127bbe4476c (diff) |
[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 <rmk@arm.linux.org.uk>, Ian Molton <spyro@f2s.com>
Cc: Mikael Starvik <starvik@axis.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jeff Dike <jdike@addtoit.com>
Cc: Greg KH <greg@kroah.com>
Cc: Jens Axboe <jens.axboe@oracle.com>
Cc: Paul Fulghum <paulkf@microgate.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Karsten Keil <kkeil@suse.de>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Cc: Ian Kent <raven@themaw.net>
Cc: Steven French <sfrench@us.ibm.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Neil Brown <neilb@cse.unsw.edu.au>
Cc: Jaroslav Kysela <perex@suse.cz>
Cc: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/isdn/divert')
-rw-r--r-- | drivers/isdn/divert/divert_procfs.c | 2 | ||||
-rw-r--r-- | drivers/isdn/divert/isdn_divert.c | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/drivers/isdn/divert/divert_procfs.c b/drivers/isdn/divert/divert_procfs.c index 399b316111f7..06967da7c4a8 100644 --- a/drivers/isdn/divert/divert_procfs.c +++ b/drivers/isdn/divert/divert_procfs.c | |||
@@ -45,7 +45,7 @@ put_info_buffer(char *cp) | |||
45 | return; | 45 | return; |
46 | if (!*cp) | 46 | if (!*cp) |
47 | return; | 47 | return; |
48 | if (!(ib = (struct divert_info *) kmalloc(sizeof(struct divert_info) + strlen(cp), GFP_ATOMIC))) | 48 | if (!(ib = kmalloc(sizeof(struct divert_info) + strlen(cp), GFP_ATOMIC))) |
49 | return; /* no memory */ | 49 | return; /* no memory */ |
50 | strcpy(ib->info_start, cp); /* set output string */ | 50 | strcpy(ib->info_start, cp); /* set output string */ |
51 | ib->next = NULL; | 51 | ib->next = NULL; |
diff --git a/drivers/isdn/divert/isdn_divert.c b/drivers/isdn/divert/isdn_divert.c index 03319ea5aa0c..7d97d54588d9 100644 --- a/drivers/isdn/divert/isdn_divert.c +++ b/drivers/isdn/divert/isdn_divert.c | |||
@@ -153,7 +153,7 @@ int cf_command(int drvid, int mode, | |||
153 | *ielenp = p - ielenp - 1; /* set total IE length */ | 153 | *ielenp = p - ielenp - 1; /* set total IE length */ |
154 | 154 | ||
155 | /* allocate mem for information struct */ | 155 | /* allocate mem for information struct */ |
156 | if (!(cs = (struct call_struc *) kmalloc(sizeof(struct call_struc), GFP_ATOMIC))) | 156 | if (!(cs = kmalloc(sizeof(struct call_struc), GFP_ATOMIC))) |
157 | return(-ENOMEM); /* no memory */ | 157 | return(-ENOMEM); /* no memory */ |
158 | init_timer(&cs->timer); | 158 | init_timer(&cs->timer); |
159 | cs->info[0] = '\0'; | 159 | cs->info[0] = '\0'; |
@@ -276,7 +276,7 @@ int insertrule(int idx, divert_rule *newrule) | |||
276 | { struct deflect_struc *ds,*ds1=NULL; | 276 | { struct deflect_struc *ds,*ds1=NULL; |
277 | unsigned long flags; | 277 | unsigned long flags; |
278 | 278 | ||
279 | if (!(ds = (struct deflect_struc *) kmalloc(sizeof(struct deflect_struc), | 279 | if (!(ds = kmalloc(sizeof(struct deflect_struc), |
280 | GFP_KERNEL))) | 280 | GFP_KERNEL))) |
281 | return(-ENOMEM); /* no memory */ | 281 | return(-ENOMEM); /* no memory */ |
282 | 282 | ||
@@ -451,7 +451,7 @@ static int isdn_divert_icall(isdn_ctrl *ic) | |||
451 | if (dv->rule.action == DEFLECT_PROCEED) | 451 | if (dv->rule.action == DEFLECT_PROCEED) |
452 | if ((!if_used) || ((!extern_wait_max) && (!dv->rule.waittime))) | 452 | if ((!if_used) || ((!extern_wait_max) && (!dv->rule.waittime))) |
453 | return(0); /* no external deflection needed */ | 453 | return(0); /* no external deflection needed */ |
454 | if (!(cs = (struct call_struc *) kmalloc(sizeof(struct call_struc), GFP_ATOMIC))) | 454 | if (!(cs = kmalloc(sizeof(struct call_struc), GFP_ATOMIC))) |
455 | return(0); /* no memory */ | 455 | return(0); /* no memory */ |
456 | init_timer(&cs->timer); | 456 | init_timer(&cs->timer); |
457 | cs->info[0] = '\0'; | 457 | cs->info[0] = '\0'; |