[PATCH 0/7] trivial: move a variable from function to if-scope

Bernd Schubert
2008-11-26T18:32:39Z

Move a variable from functions scope to if-scope.

Signed-off-by: Bernd Schubert <bs@q-leap.de>

---
drivers/scsi/scsi_error.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

Index: linux-2.6/drivers/scsi/scsi_error.c
===================================================================
--- linux-2.6.orig/drivers/scsi/scsi_error.c
+++ linux-2.6/drivers/scsi/scsi_error.c
@@ -132,7 +132,6 @@ enum blk_eh_timer_return scsi_times_out(
{
struct scsi_cmnd *scmd = req->special;
enum blk_eh_timer_return (*eh_timed_out)(struct scsi_cmnd *);
- enum blk_eh_timer_return rtn = eh_timed_out(scmd);

scsi_log_completion(scmd, TIMEOUT_ERROR);

@@ -152,6 +151,8 @@ enum blk_eh_timer_return scsi_times_out(
eh_timed_out = NULL;

if (eh_timed_out) {
+ enum blk_eh_timer_return rtn = eh_timed_out(scmd);
+
switch (rtn) {
case BLK_EH_NOT_HANDLED:
break;