From: Vivek Goyal <vgoyal@redhat.com>
To: linux-kernel@vger.kernel.org, axboe@kernel.dk
Cc: vgoyal@redhat.com, jmoyer@redhat.com, tj@kernel.org
Subject: [PATCH 5/6] cfq-iosched: Get rid of unnecessary local variable
Date: Wed, 3 Oct 2012 16:57:00 -0400 [thread overview]
Message-ID: <1349297821-30078-6-git-send-email-vgoyal@redhat.com> (raw)
In-Reply-To: <1349297821-30078-1-git-send-email-vgoyal@redhat.com>
Use of local varibale "n" seems to be unnecessary. Remove it. This brings
it inline with function __cfq_group_st_add(), which is also doing the
similar operation of adding a group to a rb tree.
No functionality change here.
Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Acked-by: Jeff Moyer <jmoyer@redhat.com>
---
block/cfq-iosched.c | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
index 6e6e00f..7dc5a49 100644
--- a/block/cfq-iosched.c
+++ b/block/cfq-iosched.c
@@ -1658,8 +1658,6 @@ static void cfq_service_tree_add(struct cfq_data *cfqd, struct cfq_queue *cfqq,
cfqq->service_tree = st;
p = &st->rb.rb_node;
while (*p) {
- struct rb_node **n;
-
parent = *p;
__cfqq = rb_entry(parent, struct cfq_queue, rb_node);
@@ -1667,13 +1665,11 @@ static void cfq_service_tree_add(struct cfq_data *cfqd, struct cfq_queue *cfqq,
* sort by key, that represents service time.
*/
if (time_before(rb_key, __cfqq->rb_key))
- n = &(*p)->rb_left;
+ p = &parent->rb_left;
else {
- n = &(*p)->rb_right;
+ p = &parent->rb_right;
left = 0;
}
-
- p = n;
}
if (left)
--
1.7.7.6
next prev parent reply other threads:[~2012-10-03 20:57 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-03 20:56 [PATCH 0/6] cfq-iosched: Some minor cleanups Vivek Goyal
2012-10-03 20:56 ` [PATCH 1/6] cfq-iosched: Properly name all references to IO class Vivek Goyal
2012-10-03 20:56 ` [PATCH 2/6] cfq-iosched: More renaming to better represent wl_class and wl_type Vivek Goyal
2012-12-06 19:17 ` Tejun Heo
2012-10-03 20:56 ` [PATCH 3/6] cfq-iosched: Rename "service_tree" to "st" at some places Vivek Goyal
2012-12-06 19:18 ` Tejun Heo
2012-10-03 20:56 ` [PATCH 4/6] cfq-iosched: Rename few functions related to selecting workload Vivek Goyal
2012-12-06 19:19 ` Tejun Heo
2012-10-03 20:57 ` Vivek Goyal [this message]
2012-12-06 19:20 ` [PATCH 5/6] cfq-iosched: Get rid of unnecessary local variable Tejun Heo
2012-10-03 20:57 ` [PATCH 6/6] cfq-iosched: Print sync-noidle information in blktrace messages Vivek Goyal
2012-12-06 19:21 ` Tejun Heo
2012-12-06 19:23 ` [PATCH 0/6] cfq-iosched: Some minor cleanups Tejun Heo
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=1349297821-30078-6-git-send-email-vgoyal@redhat.com \
--to=vgoyal@redhat.com \
--cc=axboe@kernel.dk \
--cc=jmoyer@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tj@kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).