aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/dpt_i2o.c
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/scsi/dpt_i2o.c
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/scsi/dpt_i2o.c')
-rw-r--r--drivers/scsi/dpt_i2o.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/scsi/dpt_i2o.c b/drivers/scsi/dpt_i2o.c
index 60b1b434eba7..365db537a28d 100644
--- a/drivers/scsi/dpt_i2o.c
+++ b/drivers/scsi/dpt_i2o.c
@@ -297,7 +297,7 @@ static void adpt_inquiry(adpt_hba* pHba)
297 s32 rcode; 297 s32 rcode;
298 298
299 memset(msg, 0, sizeof(msg)); 299 memset(msg, 0, sizeof(msg));
300 buf = (u8*)kmalloc(80,GFP_KERNEL|ADDR32); 300 buf = kmalloc(80,GFP_KERNEL|ADDR32);
301 if(!buf){ 301 if(!buf){
302 printk(KERN_ERR"%s: Could not allocate buffer\n",pHba->name); 302 printk(KERN_ERR"%s: Could not allocate buffer\n",pHba->name);
303 return; 303 return;
@@ -1311,7 +1311,7 @@ static s32 adpt_i2o_reset_hba(adpt_hba* pHba)
1311 schedule_timeout_uninterruptible(1); 1311 schedule_timeout_uninterruptible(1);
1312 } while (m == EMPTY_QUEUE); 1312 } while (m == EMPTY_QUEUE);
1313 1313
1314 status = (u8*)kmalloc(4, GFP_KERNEL|ADDR32); 1314 status = kmalloc(4, GFP_KERNEL|ADDR32);
1315 if(status == NULL) { 1315 if(status == NULL) {
1316 adpt_send_nop(pHba, m); 1316 adpt_send_nop(pHba, m);
1317 printk(KERN_ERR"IOP reset failed - no free memory.\n"); 1317 printk(KERN_ERR"IOP reset failed - no free memory.\n");
@@ -1444,7 +1444,7 @@ static int adpt_i2o_parse_lct(adpt_hba* pHba)
1444 } 1444 }
1445 continue; 1445 continue;
1446 } 1446 }
1447 d = (struct i2o_device *)kmalloc(sizeof(struct i2o_device), GFP_KERNEL); 1447 d = kmalloc(sizeof(struct i2o_device), GFP_KERNEL);
1448 if(d==NULL) 1448 if(d==NULL)
1449 { 1449 {
1450 printk(KERN_CRIT"%s: Out of memory for I2O device data.\n",pHba->name); 1450 printk(KERN_CRIT"%s: Out of memory for I2O device data.\n",pHba->name);
@@ -2425,7 +2425,7 @@ static s32 adpt_i2o_reparse_lct(adpt_hba* pHba)
2425 pDev = pDev->next_lun; 2425 pDev = pDev->next_lun;
2426 } 2426 }
2427 if(!pDev ) { // Something new add it 2427 if(!pDev ) { // Something new add it
2428 d = (struct i2o_device *)kmalloc(sizeof(struct i2o_device), GFP_KERNEL); 2428 d = kmalloc(sizeof(struct i2o_device), GFP_KERNEL);
2429 if(d==NULL) 2429 if(d==NULL)
2430 { 2430 {
2431 printk(KERN_CRIT "Out of memory for I2O device data.\n"); 2431 printk(KERN_CRIT "Out of memory for I2O device data.\n");
@@ -2728,7 +2728,7 @@ static s32 adpt_i2o_init_outbound_q(adpt_hba* pHba)
2728 2728
2729 kfree(pHba->reply_pool); 2729 kfree(pHba->reply_pool);
2730 2730
2731 pHba->reply_pool = (u32*)kmalloc(pHba->reply_fifo_size * REPLY_FRAME_SIZE * 4, GFP_KERNEL|ADDR32); 2731 pHba->reply_pool = kmalloc(pHba->reply_fifo_size * REPLY_FRAME_SIZE * 4, GFP_KERNEL|ADDR32);
2732 if(!pHba->reply_pool){ 2732 if(!pHba->reply_pool){
2733 printk(KERN_ERR"%s: Could not allocate reply pool\n",pHba->name); 2733 printk(KERN_ERR"%s: Could not allocate reply pool\n",pHba->name);
2734 return -1; 2734 return -1;