From 2975b0231600f4628512d51550a4e2cfde7d6358 Mon Sep 17 00:00:00 2001 From: Joe Perches Date: Tue, 28 Feb 2012 10:49:36 -0800 Subject: scsi: Use vsprintf extention %pf with builtin_return_address Emit the function name not the address when possible. builtin_return_address() gives an address. When building a kernel with CONFIG_KALLSYMS, emit the actual function name not the address. Signed-off-by: Joe Perches Acked-by: David S. Miller Signed-off-by: Jiri Kosina --- drivers/scsi/esp_scsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/scsi') diff --git a/drivers/scsi/esp_scsi.c b/drivers/scsi/esp_scsi.c index 394ed9e79fd4..34552bf1c023 100644 --- a/drivers/scsi/esp_scsi.c +++ b/drivers/scsi/esp_scsi.c @@ -1000,7 +1000,7 @@ static int esp_check_spur_intr(struct esp *esp) static void esp_schedule_reset(struct esp *esp) { - esp_log_reset("ESP: esp_schedule_reset() from %p\n", + esp_log_reset("ESP: esp_schedule_reset() from %pf\n", __builtin_return_address(0)); esp->flags |= ESP_FLAG_RESETTING; esp_event(esp, ESP_EVENT_RESET); -- cgit v1.2.1 From 3b729f7647875624dc498b65f3244b2edc9f4a07 Mon Sep 17 00:00:00 2001 From: Santosh Y Date: Sun, 8 Apr 2012 18:47:09 +0530 Subject: scsi: fix comment spelling fix recory->recovery Signed-off-by: Santosh Y Signed-off-by: Jiri Kosina --- drivers/scsi/scsi_error.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers/scsi') diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index 2cfcbffa41fd..fbda664f584c 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c @@ -664,7 +664,7 @@ static void scsi_abort_eh_cmnd(struct scsi_cmnd *scmd) } /** - * scsi_eh_prep_cmnd - Save a scsi command info as part of error recory + * scsi_eh_prep_cmnd - Save a scsi command info as part of error recovery * @scmd: SCSI command structure to hijack * @ses: structure to save restore information * @cmnd: CDB to send. Can be NULL if no new cmnd is needed @@ -739,7 +739,7 @@ void scsi_eh_prep_cmnd(struct scsi_cmnd *scmd, struct scsi_eh_save *ses, EXPORT_SYMBOL(scsi_eh_prep_cmnd); /** - * scsi_eh_restore_cmnd - Restore a scsi command info as part of error recory + * scsi_eh_restore_cmnd - Restore a scsi command info as part of error recovery * @scmd: SCSI command structure to restore * @ses: saved information from a coresponding call to scsi_eh_prep_cmnd * @@ -762,7 +762,7 @@ void scsi_eh_restore_cmnd(struct scsi_cmnd* scmd, struct scsi_eh_save *ses) EXPORT_SYMBOL(scsi_eh_restore_cmnd); /** - * scsi_send_eh_cmnd - submit a scsi command as part of error recory + * scsi_send_eh_cmnd - submit a scsi command as part of error recovery * @scmd: SCSI command structure to hijack * @cmnd: CDB to send * @cmnd_size: size in bytes of @cmnd -- cgit v1.2.1 From ee51f4432e375d07c29758e592c8c1ad1a343208 Mon Sep 17 00:00:00 2001 From: Jesper Juhl Date: Mon, 9 Apr 2012 22:51:30 +0200 Subject: aic94xx: Get rid of redundant NULL check before release_firmware() call release_firmware() checks for NULL pointers internally, so checking before calling the function is redundant. Signed-off-by: Jesper Juhl Signed-off-by: Jiri Kosina --- drivers/scsi/aic94xx/aic94xx_seq.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'drivers/scsi') diff --git a/drivers/scsi/aic94xx/aic94xx_seq.c b/drivers/scsi/aic94xx/aic94xx_seq.c index 390168f62a13..5fdca93892ad 100644 --- a/drivers/scsi/aic94xx/aic94xx_seq.c +++ b/drivers/scsi/aic94xx/aic94xx_seq.c @@ -1228,8 +1228,7 @@ static int asd_seq_start_lseq(struct asd_ha_struct *asd_ha, int lseq) int asd_release_firmware(void) { - if (sequencer_fw) - release_firmware(sequencer_fw); + release_firmware(sequencer_fw); return 0; } -- cgit v1.2.1 From cf92549f1c95e0b1fd980828c35416dc2e548d2b Mon Sep 17 00:00:00 2001 From: Jesper Juhl Date: Mon, 9 Apr 2012 22:51:41 +0200 Subject: qla2xxx: Remove redundant NULL check before release_firmware() call. release_firmware() checks for NULL pointers internally so checking before calling it is redundant. Signed-off-by: Jesper Juhl Acked-by: Chad Dupuis Signed-off-by: Jiri Kosina --- drivers/scsi/qla2xxx/qla_os.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'drivers/scsi') diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index a2f999273a5f..91b6fe6000eb 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c @@ -4106,8 +4106,7 @@ qla2x00_release_firmware(void) mutex_lock(&qla_fw_lock); for (idx = 0; idx < FW_BLOBS; idx++) - if (qla_fw_blobs[idx].fw) - release_firmware(qla_fw_blobs[idx].fw); + release_firmware(qla_fw_blobs[idx].fw); mutex_unlock(&qla_fw_lock); } -- cgit v1.2.1 From 90449e5dee4800721a352af11ae4d65d4a56ba93 Mon Sep 17 00:00:00 2001 From: Jesper Juhl Date: Mon, 9 Apr 2012 22:51:36 +0200 Subject: qla1280: Remove redundant NULL check before release_firmware() call release_firmware() checks for NULL pointers internally so checking before calling the function is redundant. Signed-off-by: Jesper Juhl Signed-off-by: Jiri Kosina --- drivers/scsi/qla1280.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'drivers/scsi') diff --git a/drivers/scsi/qla1280.c b/drivers/scsi/qla1280.c index 6c6486f626ee..538230be5cca 100644 --- a/drivers/scsi/qla1280.c +++ b/drivers/scsi/qla1280.c @@ -4473,17 +4473,14 @@ qla1280_exit(void) pci_unregister_driver(&qla1280_pci_driver); /* release any allocated firmware images */ for (i = 0; i < QL_NUM_FW_IMAGES; i++) { - if (qla1280_fw_tbl[i].fw) { - release_firmware(qla1280_fw_tbl[i].fw); - qla1280_fw_tbl[i].fw = NULL; - } + release_firmware(qla1280_fw_tbl[i].fw); + qla1280_fw_tbl[i].fw = NULL; } } module_init(qla1280_init); module_exit(qla1280_exit); - MODULE_AUTHOR("Qlogic & Jes Sorensen"); MODULE_DESCRIPTION("Qlogic ISP SCSI (qla1x80/qla1x160) driver"); MODULE_LICENSE("GPL"); -- cgit v1.2.1