aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
authorRobert P. J. Day <rpjday@mindspring.com>2006-12-13 03:35:56 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-13 12:05:58 -0500
commit5cbded585d129d0226cb48ac4202b253c781be26 (patch)
treefb24edc194a57ee81a3bf8a4dd8a95030dd0ad22 /drivers/block
parent0743b86800cf1dfbf96df4a438938127bbe4476c (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/block')
-rw-r--r--drivers/block/cciss.c2
-rw-r--r--drivers/block/cpqarray.c10
2 files changed, 6 insertions, 6 deletions
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
index 730f9693150e..acb2fa9cf6b1 100644
--- a/drivers/block/cciss.c
+++ b/drivers/block/cciss.c
@@ -1039,7 +1039,7 @@ static int cciss_ioctl(struct inode *inode, struct file *filep,
1039 status = -ENOMEM; 1039 status = -ENOMEM;
1040 goto cleanup1; 1040 goto cleanup1;
1041 } 1041 }
1042 buff_size = (int *)kmalloc(MAXSGENTRIES * sizeof(int), 1042 buff_size = kmalloc(MAXSGENTRIES * sizeof(int),
1043 GFP_KERNEL); 1043 GFP_KERNEL);
1044 if (!buff_size) { 1044 if (!buff_size) {
1045 status = -ENOMEM; 1045 status = -ENOMEM;
diff --git a/drivers/block/cpqarray.c b/drivers/block/cpqarray.c
index d5f519ebbc08..b94cd1c32131 100644
--- a/drivers/block/cpqarray.c
+++ b/drivers/block/cpqarray.c
@@ -1625,7 +1625,7 @@ static void start_fwbk(int ctlr)
1625 " processing\n"); 1625 " processing\n");
1626 /* Command does not return anything, but idasend command needs a 1626 /* Command does not return anything, but idasend command needs a
1627 buffer */ 1627 buffer */
1628 id_ctlr_buf = (id_ctlr_t *)kmalloc(sizeof(id_ctlr_t), GFP_KERNEL); 1628 id_ctlr_buf = kmalloc(sizeof(id_ctlr_t), GFP_KERNEL);
1629 if(id_ctlr_buf==NULL) 1629 if(id_ctlr_buf==NULL)
1630 { 1630 {
1631 printk(KERN_WARNING "cpqarray: Out of memory. " 1631 printk(KERN_WARNING "cpqarray: Out of memory. "
@@ -1660,14 +1660,14 @@ static void getgeometry(int ctlr)
1660 1660
1661 info_p->log_drv_map = 0; 1661 info_p->log_drv_map = 0;
1662 1662
1663 id_ldrive = (id_log_drv_t *)kmalloc(sizeof(id_log_drv_t), GFP_KERNEL); 1663 id_ldrive = kmalloc(sizeof(id_log_drv_t), GFP_KERNEL);
1664 if(id_ldrive == NULL) 1664 if(id_ldrive == NULL)
1665 { 1665 {
1666 printk( KERN_ERR "cpqarray: out of memory.\n"); 1666 printk( KERN_ERR "cpqarray: out of memory.\n");
1667 return; 1667 return;
1668 } 1668 }
1669 1669
1670 id_ctlr_buf = (id_ctlr_t *)kmalloc(sizeof(id_ctlr_t), GFP_KERNEL); 1670 id_ctlr_buf = kmalloc(sizeof(id_ctlr_t), GFP_KERNEL);
1671 if(id_ctlr_buf == NULL) 1671 if(id_ctlr_buf == NULL)
1672 { 1672 {
1673 kfree(id_ldrive); 1673 kfree(id_ldrive);
@@ -1675,7 +1675,7 @@ static void getgeometry(int ctlr)
1675 return; 1675 return;
1676 } 1676 }
1677 1677
1678 id_lstatus_buf = (sense_log_drv_stat_t *)kmalloc(sizeof(sense_log_drv_stat_t), GFP_KERNEL); 1678 id_lstatus_buf = kmalloc(sizeof(sense_log_drv_stat_t), GFP_KERNEL);
1679 if(id_lstatus_buf == NULL) 1679 if(id_lstatus_buf == NULL)
1680 { 1680 {
1681 kfree(id_ctlr_buf); 1681 kfree(id_ctlr_buf);
@@ -1684,7 +1684,7 @@ static void getgeometry(int ctlr)
1684 return; 1684 return;
1685 } 1685 }
1686 1686
1687 sense_config_buf = (config_t *)kmalloc(sizeof(config_t), GFP_KERNEL); 1687 sense_config_buf = kmalloc(sizeof(config_t), GFP_KERNEL);
1688 if(sense_config_buf == NULL) 1688 if(sense_config_buf == NULL)
1689 { 1689 {
1690 kfree(id_lstatus_buf); 1690 kfree(id_lstatus_buf);