Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1564332

[PATCH 5/5] cfq-iosched: Adjust one function call together with a variable assignment

From SF Markus Elfring <elfring@users.sourceforge.net>
Newsgroups linux.kernel
Subject [PATCH 5/5] cfq-iosched: Adjust one function call together with a variable assignment
Date 2017-01-22 09:40 +0100
Message-ID <t2lQR-6Vp-7@gated-at.bofh.it> (permalink)
References <t2lQR-6Vp-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 21 Jan 2017 22:44:07 +0100

The script "checkpatch.pl" pointed information out like the following.

ERROR: do not use assignment in if condition

Thus fix the affected source code place.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 block/cfq-iosched.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
index 454297fe8fd6..8c405eaa2806 100644
--- a/block/cfq-iosched.c
+++ b/block/cfq-iosched.c
@@ -2750,9 +2750,11 @@ static struct cfq_queue *cfq_get_next_queue_forced(struct cfq_data *cfqd)
 	if (!cfqg)
 		return NULL;
 
-	for_each_cfqg_st(cfqg, i, j, st)
-		if ((cfqq = cfq_rb_first(st)) != NULL)
+	for_each_cfqg_st(cfqg, i, j, st) {
+		cfqq = cfq_rb_first(st);
+		if (cfqq)
 			return cfqq;
+	}
 	return NULL;
 }
 
-- 
2.11.0

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH 5/5] cfq-iosched: Adjust one function call together with a  variable assignment SF Markus Elfring <elfring@users.sourceforge.net> - 2017-01-22 09:40 +0100
  Re: [PATCH 5/5] cfq-iosched: Adjust one function call together with  a variable assignment Johannes Thumshirn <jthumshirn@suse.de> - 2017-01-23 10:30 +0100

csiph-web