From: Hannes Reinecke <hare@suse.de>
To: Mike Miller <mike.miller@hp.com>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>,
Jens Axboe <jens.axboe@oracle.com>
Subject: [PATCH] Remove pointless curr_queue calculation in block/cciss.c
Date: Tue, 22 Jul 2008 10:22:33 +0200 [thread overview]
Message-ID: <488598C9.6000701@suse.de> (raw)
[-- 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);
}
}
}
next reply other threads:[~2008-07-22 8:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-22 8:22 Hannes Reinecke [this message]
2008-08-04 9:59 ` [PATCH] Remove pointless curr_queue calculation in block/cciss.c Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=488598C9.6000701@suse.de \
--to=hare@suse.de \
--cc=jens.axboe@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mike.miller@hp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.