From 2099973abfb96f98290d52de24940561e29bbeea Mon Sep 17 00:00:00 2001 From: Jesper Juhl Date: Tue, 9 Nov 2010 00:09:25 +0100 Subject: scsi: Remove unnecessary casts of void ptr returning alloc function return values The [vk][cmz]alloc(_node) family of functions return void pointers which it's completely unnecessary/pointless to cast to other pointer types since that happens implicitly. This patch removes such casts from drivers/scsi/ Signed-off-by: Jesper Juhl Signed-off-by: Jiri Kosina --- drivers/scsi/aic7xxx/aic7xxx_core.c | 2 +- drivers/scsi/osst.c | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) (limited to 'drivers/scsi') diff --git a/drivers/scsi/aic7xxx/aic7xxx_core.c b/drivers/scsi/aic7xxx/aic7xxx_core.c index 3f5a542..e021b48 100644 --- a/drivers/scsi/aic7xxx/aic7xxx_core.c +++ b/drivers/scsi/aic7xxx/aic7xxx_core.c @@ -4780,7 +4780,7 @@ ahc_init_scbdata(struct ahc_softc *ahc) SLIST_INIT(&scb_data->sg_maps); /* Allocate SCB resources */ - scb_data->scbarray = (struct scb *)kmalloc(sizeof(struct scb) * AHC_SCB_MAX_ALLOC, GFP_ATOMIC); + scb_data->scbarray = kmalloc(sizeof(struct scb) * AHC_SCB_MAX_ALLOC, GFP_ATOMIC); if (scb_data->scbarray == NULL) return (ENOMEM); memset(scb_data->scbarray, 0, sizeof(struct scb) * AHC_SCB_MAX_ALLOC); diff --git a/drivers/scsi/osst.c b/drivers/scsi/osst.c index 54de1d1..521e218 100644 --- a/drivers/scsi/osst.c +++ b/drivers/scsi/osst.c @@ -1484,7 +1484,7 @@ static int osst_read_back_buffer_and_rewrite(struct osst_tape * STp, struct osst int dbg = debugging; #endif - if ((buffer = (unsigned char *)vmalloc((nframes + 1) * OS_DATA_SIZE)) == NULL) + if ((buffer = vmalloc((nframes + 1) * OS_DATA_SIZE)) == NULL) return (-EIO); printk(KERN_INFO "%s:I: Reading back %d frames from drive buffer%s\n", @@ -2296,7 +2296,7 @@ static int osst_write_header(struct osst_tape * STp, struct osst_request ** aSRp if (STp->raw) return 0; if (STp->header_cache == NULL) { - if ((STp->header_cache = (os_header_t *)vmalloc(sizeof(os_header_t))) == NULL) { + if ((STp->header_cache = vmalloc(sizeof(os_header_t))) == NULL) { printk(KERN_ERR "%s:E: Failed to allocate header cache\n", name); return (-ENOMEM); } @@ -2484,7 +2484,7 @@ static int __osst_analyze_headers(struct osst_tape * STp, struct osst_request ** name, ppos, update_frame_cntr); #endif if (STp->header_cache == NULL) { - if ((STp->header_cache = (os_header_t *)vmalloc(sizeof(os_header_t))) == NULL) { + if ((STp->header_cache = vmalloc(sizeof(os_header_t))) == NULL) { printk(KERN_ERR "%s:E: Failed to allocate header cache\n", name); return 0; } @@ -5851,9 +5851,7 @@ static int osst_probe(struct device *dev) /* if this is the first attach, build the infrastructure */ write_lock(&os_scsi_tapes_lock); if (os_scsi_tapes == NULL) { - os_scsi_tapes = - (struct osst_tape **)kmalloc(osst_max_dev * sizeof(struct osst_tape *), - GFP_ATOMIC); + os_scsi_tapes = kmalloc(osst_max_dev * sizeof(struct osst_tape *), GFP_ATOMIC); if (os_scsi_tapes == NULL) { write_unlock(&os_scsi_tapes_lock); printk(KERN_ERR "osst :E: Unable to allocate array for OnStream SCSI tapes.\n"); -- cgit v1.1 From 5a3a7658863f74f28cef53b9336bff7423659801 Mon Sep 17 00:00:00 2001 From: "Justin P. Mattock" Date: Wed, 19 Jan 2011 15:36:38 +0100 Subject: Comment typo fixes for 'descriptor' Signed-off-by: Justin P. Mattock Signed-off-by: Jiri Kosina --- drivers/scsi/aic7xxx/aic79xx.h | 2 +- drivers/scsi/aic7xxx/aic7xxx.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/scsi') diff --git a/drivers/scsi/aic7xxx/aic79xx.h b/drivers/scsi/aic7xxx/aic79xx.h index be5558a..95ee503 100644 --- a/drivers/scsi/aic7xxx/aic79xx.h +++ b/drivers/scsi/aic7xxx/aic79xx.h @@ -672,7 +672,7 @@ struct scb_data { /************************ Target Mode Definitions *****************************/ /* - * Connection desciptor for select-in requests in target mode. + * Connection descriptor for select-in requests in target mode. */ struct target_cmd { uint8_t scsiid; /* Our ID and the initiator's ID */ diff --git a/drivers/scsi/aic7xxx/aic7xxx.h b/drivers/scsi/aic7xxx/aic7xxx.h index e4e651c..17444bc 100644 --- a/drivers/scsi/aic7xxx/aic7xxx.h +++ b/drivers/scsi/aic7xxx/aic7xxx.h @@ -618,7 +618,7 @@ struct scb_data { /************************ Target Mode Definitions *****************************/ /* - * Connection desciptor for select-in requests in target mode. + * Connection descriptor for select-in requests in target mode. */ struct target_cmd { uint8_t scsiid; /* Our ID and the initiator's ID */ -- cgit v1.1 From 8e572bab39c484cdf512715f98626337f25cfc32 Mon Sep 17 00:00:00 2001 From: "Justin P. Mattock" Date: Wed, 2 Feb 2011 11:31:21 +0100 Subject: fix typos 'comamnd' -> 'command' in comments Signed-off-by: Justin P. Mattock --- drivers/scsi/megaraid.c | 4 ++-- drivers/scsi/megaraid/megaraid_sas_base.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers/scsi') diff --git a/drivers/scsi/megaraid.c b/drivers/scsi/megaraid.c index 9aa0485..c212694 100644 --- a/drivers/scsi/megaraid.c +++ b/drivers/scsi/megaraid.c @@ -1412,7 +1412,7 @@ megaraid_isr_memmapped(int irq, void *devp) * @nstatus - number of completed commands * @status - status of the last command completed * - * Complete the comamnds and call the scsi mid-layer callback hooks. + * Complete the commands and call the scsi mid-layer callback hooks. */ static void mega_cmd_done(adapter_t *adapter, u8 completed[], int nstatus, int status) @@ -4296,7 +4296,7 @@ mega_support_cluster(adapter_t *adapter) * @adapter - pointer to our soft state * @dma_handle - DMA address of the buffer * - * Issue internal comamnds while interrupts are available. + * Issue internal commands while interrupts are available. * We only issue direct mailbox commands from within the driver. ioctl() * interface using these routines can issue passthru commands. */ diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c index 5d6d07b..a18ba43 100644 --- a/drivers/scsi/megaraid/megaraid_sas_base.c +++ b/drivers/scsi/megaraid/megaraid_sas_base.c @@ -877,7 +877,7 @@ megasas_issue_blocked_cmd(struct megasas_instance *instance, * @instance: Adapter soft state * @cmd_to_abort: Previously issued cmd to be aborted * - * MFI firmware can abort previously issued AEN comamnd (automatic event + * MFI firmware can abort previously issued AEN command (automatic event * notification). The megasas_issue_blocked_abort_cmd() issues such abort * cmd and waits for return status. * Max wait time is MEGASAS_INTERNAL_CMD_WAIT_TIME secs -- cgit v1.1 From cd09b2c3d0574d17804f8a691433249fa86197d3 Mon Sep 17 00:00:00 2001 From: "Justin P. Mattock" Date: Fri, 28 Jan 2011 11:49:08 -0800 Subject: drivers:scsi Change printk typo initate -> initiate Signed-off-by: Justin P. Mattock Signed-off-by: Jiri Kosina --- drivers/scsi/qla4xxx/ql4_isr.c | 2 +- drivers/scsi/qla4xxx/ql4_os.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/scsi') diff --git a/drivers/scsi/qla4xxx/ql4_isr.c b/drivers/scsi/qla4xxx/ql4_isr.c index 6ffbe972..03e028e 100644 --- a/drivers/scsi/qla4xxx/ql4_isr.c +++ b/drivers/scsi/qla4xxx/ql4_isr.c @@ -1027,7 +1027,7 @@ void qla4xxx_process_aen(struct scsi_qla_host * ha, uint8_t process_aen) ((ddb_entry->default_time2wait + 4) * HZ); - DEBUG2(printk("scsi%ld: ddb [%d] initate" + DEBUG2(printk("scsi%ld: ddb [%d] initiate" " RELOGIN after %d seconds\n", ha->host_no, ddb_entry->fw_ddb_index, diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c index 3fc1d25..967836e 100644 --- a/drivers/scsi/qla4xxx/ql4_os.c +++ b/drivers/scsi/qla4xxx/ql4_os.c @@ -812,7 +812,7 @@ static void qla4xxx_timer(struct scsi_qla_host *ha) ); start_dpc++; DEBUG(printk("scsi%ld:%d:%d: ddb [%d] " - "initate relogin after" + "initiate relogin after" " %d seconds\n", ha->host_no, ddb_entry->bus, ddb_entry->target, -- cgit v1.1