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/fc4 | |
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/fc4')
-rw-r--r-- | drivers/fc4/fc.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/fc4/fc.c b/drivers/fc4/fc.c index ca4e67a022d0..22b62b3cd14e 100644 --- a/drivers/fc4/fc.c +++ b/drivers/fc4/fc.c | |||
@@ -266,7 +266,7 @@ static void fcp_report_map_done(fc_channel *fc, int i, int status) | |||
266 | printk ("FC: Bad magic from REPORT_AL_MAP on %s - %08x\n", fc->name, p->magic); | 266 | printk ("FC: Bad magic from REPORT_AL_MAP on %s - %08x\n", fc->name, p->magic); |
267 | fc->state = FC_STATE_OFFLINE; | 267 | fc->state = FC_STATE_OFFLINE; |
268 | } else { | 268 | } else { |
269 | fc->posmap = (fcp_posmap *)kzalloc(sizeof(fcp_posmap)+p->len, GFP_KERNEL); | 269 | fc->posmap = kzalloc(sizeof(fcp_posmap)+p->len, GFP_KERNEL); |
270 | if (!fc->posmap) { | 270 | if (!fc->posmap) { |
271 | printk("FC: Not enough memory, offlining channel\n"); | 271 | printk("FC: Not enough memory, offlining channel\n"); |
272 | fc->state = FC_STATE_OFFLINE; | 272 | fc->state = FC_STATE_OFFLINE; |
@@ -355,7 +355,7 @@ void fcp_register(fc_channel *fc, u8 type, int unregister) | |||
355 | for (i = fc->can_queue; i < fc->scsi_bitmap_end; i++) | 355 | for (i = fc->can_queue; i < fc->scsi_bitmap_end; i++) |
356 | set_bit (i, fc->scsi_bitmap); | 356 | set_bit (i, fc->scsi_bitmap); |
357 | fc->scsi_free = fc->can_queue; | 357 | fc->scsi_free = fc->can_queue; |
358 | fc->cmd_slots = (fcp_cmnd **)kzalloc(slots * sizeof(fcp_cmnd*), GFP_KERNEL); | 358 | fc->cmd_slots = kzalloc(slots * sizeof(fcp_cmnd*), GFP_KERNEL); |
359 | fc->abort_count = 0; | 359 | fc->abort_count = 0; |
360 | } else { | 360 | } else { |
361 | fc->scsi_name[0] = 0; | 361 | fc->scsi_name[0] = 0; |
@@ -933,7 +933,7 @@ int fcp_scsi_dev_reset(struct scsi_cmnd *SCpnt) | |||
933 | DECLARE_MUTEX_LOCKED(sem); | 933 | DECLARE_MUTEX_LOCKED(sem); |
934 | 934 | ||
935 | if (!fc->rst_pkt) { | 935 | if (!fc->rst_pkt) { |
936 | fc->rst_pkt = (struct scsi_cmnd *) kmalloc(sizeof(SCpnt), GFP_KERNEL); | 936 | fc->rst_pkt = kmalloc(sizeof(SCpnt), GFP_KERNEL); |
937 | if (!fc->rst_pkt) return FAILED; | 937 | if (!fc->rst_pkt) return FAILED; |
938 | 938 | ||
939 | fcmd = FCP_CMND(fc->rst_pkt); | 939 | fcmd = FCP_CMND(fc->rst_pkt); |
@@ -1107,7 +1107,7 @@ int fc_do_plogi(fc_channel *fc, unsigned char alpa, fc_wwn *node, fc_wwn *nport) | |||
1107 | logi *l; | 1107 | logi *l; |
1108 | int status; | 1108 | int status; |
1109 | 1109 | ||
1110 | l = (logi *)kzalloc(2 * sizeof(logi), GFP_KERNEL); | 1110 | l = kzalloc(2 * sizeof(logi), GFP_KERNEL); |
1111 | if (!l) return -ENOMEM; | 1111 | if (!l) return -ENOMEM; |
1112 | l->code = LS_PLOGI; | 1112 | l->code = LS_PLOGI; |
1113 | memcpy (&l->nport_wwn, &fc->wwn_nport, sizeof(fc_wwn)); | 1113 | memcpy (&l->nport_wwn, &fc->wwn_nport, sizeof(fc_wwn)); |
@@ -1141,7 +1141,7 @@ int fc_do_prli(fc_channel *fc, unsigned char alpa) | |||
1141 | prli *p; | 1141 | prli *p; |
1142 | int status; | 1142 | int status; |
1143 | 1143 | ||
1144 | p = (prli *)kzalloc(2 * sizeof(prli), GFP_KERNEL); | 1144 | p = kzalloc(2 * sizeof(prli), GFP_KERNEL); |
1145 | if (!p) return -ENOMEM; | 1145 | if (!p) return -ENOMEM; |
1146 | p->code = LS_PRLI; | 1146 | p->code = LS_PRLI; |
1147 | p->params[0] = 0x08002000; | 1147 | p->params[0] = 0x08002000; |