diff options
author | Justin P. Mattock <justinmattock@gmail.com> | 2010-06-19 00:16:07 +0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-07-27 21:03:51 +0400 |
commit | e4bf25fbcc64a87d7dc1d3318ca56c28382757e2 (patch) | |
tree | c3289ca3c478157678c6cceed0ec05581c79e087 /drivers/scsi | |
parent | 6e49949c5e9e04d64e16df3723dd3f5bd25a29e2 (diff) | |
download | linux-e4bf25fbcc64a87d7dc1d3318ca56c28382757e2.tar.xz |
[SCSI] scsi:hosts.c Fix warning: variable 'rval' set but not used
The below patch fixes a warning message generated by gcc 4.6.0
CC drivers/scsi/hosts.o
drivers/scsi/hosts.c: In function 'scsi_host_alloc':
drivers/scsi/hosts.c:328:6: warning: variable 'rval' set but not used
Fix this by removing the rval but placing a printk warning where it
would have been set.
Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/hosts.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/hosts.c b/drivers/scsi/hosts.c index 6660fa92ffa1..a2b1414da288 100644 --- a/drivers/scsi/hosts.c +++ b/drivers/scsi/hosts.c @@ -325,7 +325,6 @@ struct Scsi_Host *scsi_host_alloc(struct scsi_host_template *sht, int privsize) { struct Scsi_Host *shost; gfp_t gfp_mask = GFP_KERNEL; - int rval; if (sht->unchecked_isa_dma && privsize) gfp_mask |= __GFP_DMA; @@ -420,7 +419,8 @@ struct Scsi_Host *scsi_host_alloc(struct scsi_host_template *sht, int privsize) shost->ehandler = kthread_run(scsi_error_handler, shost, "scsi_eh_%d", shost->host_no); if (IS_ERR(shost->ehandler)) { - rval = PTR_ERR(shost->ehandler); + printk(KERN_WARNING "scsi%d: error handler thread failed to spawn, error = %ld\n", + shost->host_no, PTR_ERR(shost->ehandler)); goto fail_kfree; } |