Skip to content

Commit

Permalink
cfq-iosched: Get rid of unnecessary local variable
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: Jeff Moyer <[email protected]>
Signed-off-by: Tejun Heo <[email protected]>
  • Loading branch information
rhvgoyal authored and htejun committed Jan 9, 2013
1 parent 6d816ec commit 1f23f12
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions block/cfq-iosched.c
Original file line number Diff line number Diff line change
Expand Up @@ -1658,22 +1658,18 @@ 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);

/*
* 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)
Expand Down

0 comments on commit 1f23f12

Please sign in to comment.