* [PATCH] Remove pointless curr_queue calculation in block/cciss.c
@ 2008-07-22 8:22 Hannes Reinecke
2008-08-04 9:59 ` Jens Axboe
0 siblings, 1 reply; 2+ messages in thread
From: Hannes Reinecke @ 2008-07-22 8:22 UTC (permalink / raw)
To: Mike Miller; +Cc: Linux Kernel, Jens Axboe
[-- Attachment #1: Type: text/plain, Size: 425 bytes --]
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)
[-- Attachment #2: cciss-remove-curr_queue-statement --]
[-- Type: text/plain, Size: 599 bytes --]
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);
}
}
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Remove pointless curr_queue calculation in block/cciss.c
2008-07-22 8:22 [PATCH] Remove pointless curr_queue calculation in block/cciss.c Hannes Reinecke
@ 2008-08-04 9:59 ` Jens Axboe
0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2008-08-04 9:59 UTC (permalink / raw)
To: Hannes Reinecke; +Cc: Mike Miller, Linux Kernel
On Tue, Jul 22 2008, Hannes Reinecke wrote:
> 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.
Indeed, pretty silly. Applied, thanks.
--
Jens Axboe
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-08-04 9:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-22 8:22 [PATCH] Remove pointless curr_queue calculation in block/cciss.c Hannes Reinecke
2008-08-04 9:59 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox