aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/fc4/fc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/fc4/fc.c')
-rw-r--r--drivers/fc4/fc.c10
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;