Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion cfq-iosched: make new_cfqq variable bool

Received: by 10.180.97.162 with SMTP id eb2mr115637wib.0.1350351206248;
        Mon, 15 Oct 2012 18:33:26 -0700 (PDT)
MIME-Version: 1.0
Path: q10ni65138008wif.0!nntp.google.com!feeder2.cambriumusenet.nl!feed.tweaknews.nl!85.12.40.139.MISMATCH!xlned.com!feeder7.xlned.com!newsfeed10.multikabel.net!multikabel.net!newsfeed20.multikabel.net!border3.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!border4.nntp.ams.giganews.com!border2.nntp.ams.giganews.com!nntp.giganews.com!news.panservice.it!bofh.it!news.nic.it!robomod
From: Vivek Goyal <vgo...@redhat.com>
Newsgroups: linux.kernel
Subject: [PATCH 2/8] cfq-iosched: make new_cfqq variable bool
Date: Mon, 08 Oct 2012 23:50:01 +0200
Message-ID: <jStn3-7hD-1@gated-at.bofh.it>
References: <jStn3-7hD-3@gated-at.bofh.it>
X-Original-To: linux-ker...@vger.kernel.org, ax...@kernel.dk
X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12
Sender: robo...@news.nic.it
List-ID: <linux-kernel.vger.kernel.org>
X-Mailing-List: linux-kernel@vger.kernel.org
Approved: robo...@news.nic.it
Lines: 38
Organization: linux.* mail to news gateway
X-Original-Cc: vgo...@redhat.com, jmo...@redhat.com, t...@kernel.org
X-Original-Date: Mon,  8 Oct 2012 17:44:54 -0400
X-Original-Message-ID: <1349732700-2694-3-git-send-email-vgoyal@redhat.com>
X-Original-References: <1349732700-2694-1-git-send-email-vgo...@redhat.com>
X-Original-Sender: linux-kernel-ow...@vger.kernel.org
Bytes: 2294

Make new_cfqq bool. Also set the variable in the beginning of function.

Signed-off-by: Vivek Goyal <vgo...@redhat.com>
---
 block/cfq-iosched.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
index c0b492e..ad5f9b6 100644
--- a/block/cfq-iosched.c
+++ b/block/cfq-iosched.c
@@ -1618,7 +1618,7 @@ static void cfq_service_tree_add(struct cfq_data *cfqd, struct cfq_queue *cfqq,
 	unsigned long rb_key;
 	struct cfq_rb_root *st;
 	int left;
-	int new_cfqq = 1;
+	bool new_cfqq = RB_EMPTY_NODE(&cfqq->rb_node);
 
 	st = st_for(cfqq->cfqg, cfqq_class(cfqq), cfqq_type(cfqq));
 	if (cfq_class_idle(cfqq)) {
@@ -1645,8 +1645,7 @@ static void cfq_service_tree_add(struct cfq_data *cfqd, struct cfq_queue *cfqq,
 		rb_key += __cfqq ? __cfqq->rb_key : jiffies;
 	}
 
-	if (!RB_EMPTY_NODE(&cfqq->rb_node)) {
-		new_cfqq = 0;
+	if (!new_cfqq) {
 		/*
 		 * same position, nothing more to do
 		 */
-- 
1.7.7.6

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/