lkml.org 
[lkml]   [2008]   [Jul]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] Remove pointless curr_queue calculation in block/cciss.c
Hi Mike,

in block/cciss.c:cciss_check_queues() curr_queue is calculated
as the last statement in a for loop, although it's being initialized
with the next round again and never been used afterwards.
So this can be removed.

Cheers,

Hannes
--
Dr. Hannes Reinecke zSeries & Storage
hare@suse.de +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Markus Rex, HRB 16746 (AG Nürnberg)
Remove curr_queue calculation in block/cciss.c

curr_queue is a local variable in a for loop, and it's
being initialized at the start of each loop. So any
assignment at the end of the loop is pointless.

Signed-off-by: Hannes Reinecke <hare@suse.de>

diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
index d81632c..0ce0c27 100644
--- a/drivers/block/cciss.c
+++ b/drivers/block/cciss.c
@@ -1292,8 +1292,6 @@ static void cciss_check_queues(ctlr_info_t *h)
h->next_to_run = curr_queue;
break;
}
- } else {
- curr_queue = (curr_queue + 1) % (h->highest_lun + 1);
}
}
}
\
 
 \ /
  Last update: 2008-07-22 10:25    [W:0.069 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site