From: Krzysztof Helt <[EMAIL PROTECTED]>
Small code rearrangement to kill this compilation warning:
drivers/scsi/sym53c8xx_2/sym_glue.c:612: warning: io_reset
may be used uninitialized in this function
Signed-off-by: Krzysztof Helt <[EMAIL PROTECTED]>
---
diff -urp linux-ref/drivers/scsi/sym53c8xx_2/sym_glue.c
linux-new/drivers/scsi/sym53c8xx_2/sym_glue.c
--- linux-ref/drivers/scsi/sym53c8xx_2/sym_glue.c 2007-10-28
11:11:02.000000000 +0100
+++ linux-new/drivers/scsi/sym53c8xx_2/sym_glue.c 2007-10-28
14:25:08.000000000 +0100
@@ -609,8 +609,7 @@ static int sym_eh_handler(int op, char *
*/
#define WAIT_FOR_PCI_RECOVERY 35
if (pci_channel_offline(pdev)) {
- struct completion *io_reset;
- int finished_reset = 0;
+ struct completion *io_reset = NULL;
init_completion(&eh_done);
spin_lock_irq(shost->host_lock);
/* Make sure we didn't race */
@@ -618,15 +617,12 @@ static int sym_eh_handler(int op, char *
if (!sym_data->io_reset)
sym_data->io_reset = &eh_done;
io_reset = sym_data->io_reset;
- } else {
- finished_reset = 1;
}
spin_unlock_irq(shost->host_lock);
- if (!finished_reset)
- finished_reset = wait_for_completion_timeout(io_reset,
- WAIT_FOR_PCI_RECOVERY*HZ);
- if (!finished_reset)
- return SCSI_FAILED;
+ if (io_reset &&
+ !wait_for_completion_timeout(io_reset,
+ WAIT_FOR_PCI_RECOVERY * HZ))
+ return SCSI_FAILED;
}
spin_lock_irq(shost->host_lock);
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html