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


Groups > linux.kernel > #1564332 > unrolled thread

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

Started bySF Markus Elfring <elfring@users.sourceforge.net>
First post2017-01-22 09:40 +0100
Last post2017-01-23 10:30 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [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

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

FromSF Markus Elfring <elfring@users.sourceforge.net>
Date2017-01-22 09:40 +0100
Subject[PATCH 5/5] cfq-iosched: Adjust one function call together with a variable assignment
Message-ID<t2lQR-6Vp-7@gated-at.bofh.it>
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

[toc] | [next] | [standalone]


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

FromJohannes Thumshirn <jthumshirn@suse.de>
Date2017-01-23 10:30 +0100
SubjectRe: [PATCH 5/5] cfq-iosched: Adjust one function call together with a variable assignment
Message-ID<t2J6O-4DB-19@gated-at.bofh.it>
In reply to#1564332
On Sun, Jan 22, 2017 at 09:35:13AM +0100, SF Markus Elfring wrote:
> 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>
> ---

Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>

-- 
Johannes Thumshirn                                          Storage
jthumshirn@suse.de                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web