fc->cmd_slots = (fcp_cmnd **)kmalloc(slots * sizeof(fcp_cmnd*), GFP_KERNEL); memset(fc->cmd_slots, 0, slots * sizeof(fcp_cmnd*)); 
fc->cmd_slots = (fcp_cmnd **)kzalloc(slots * sizeof(fcp_cmnd*), GFP_KERNEL); 
void fcp_register(fc_channel *fc, u8 type, int unregister){	int size, i;	int slots = (fc->can_queue * 3) >> 1;	FCND(("Going to %sregister\n", unregister ? "un" : ""))	if (type == TYPE_SCSI_FCP) {		if (!unregister) {			fc->scsi_cmd_pool = (fcp_cmd *)				dma_alloc_consistent (fc->dev,						      slots * (sizeof (fcp_cmd) + fc->rsp_size),						      &fc->dma_scsi_cmd);			fc->scsi_rsp_pool = (char *)(fc->scsi_cmd_pool + slots);			fc->dma_scsi_rsp = fc->dma_scsi_cmd + slots * sizeof (fcp_cmd);			fc->scsi_bitmap_end = (slots + 63) & ~63;			size = fc->scsi_bitmap_end / 8;			fc->scsi_bitmap = kmalloc (size, GFP_KERNEL);			memset (fc->scsi_bitmap, 0, size);			set_bit (0, fc->scsi_bitmap);			for (i = fc->can_queue; i < fc->scsi_bitmap_end; i++)				set_bit (i, fc->scsi_bitmap);			fc->scsi_free = fc->can_queue;			fc->cmd_slots = (fcp_cmnd **)kmalloc(slots * sizeof(fcp_cmnd*), GFP_KERNEL);			memset(fc->cmd_slots, 0, slots * sizeof(fcp_cmnd*));			fc->abort_count = 0;		} else {			fc->scsi_name[0] = 0;			kfree (fc->scsi_bitmap);			kfree (fc->cmd_slots);			FCND(("Unregistering\n"));#if 0			if (fc->rst_pkt) {				if (fc->rst_pkt->eh_state == SCSI_STATE_UNUSED)					kfree(fc->rst_pkt);				else {					/* Can't happen. Some memory would be lost. */					printk("FC: Reset in progress. Now?!");				}			}#endif			FCND(("Unregistered\n"));		}	} else		printk ("FC: %segistering unknown type %02x\n", unregister ? "Unr" : "R", type);}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/49d0c6039dd36791cad36624e68bce5fe011bf12/fc.c/clean/drivers/fc4/fc.c