]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
cfq-iosched: Adjust one function call together with a variable assignment
authorMarkus Elfring <elfring@users.sourceforge.net>
Sat, 21 Jan 2017 21:44:07 +0000 (22:44 +0100)
committerJens Axboe <axboe@fb.com>
Mon, 23 Jan 2017 15:32:18 +0000 (08:32 -0700)
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>
Signed-off-by: Jens Axboe <axboe@fb.com>
block/cfq-iosched.c

index c472886c727fa1a6fd2e76428d73f0c684c3cdfc..f0f29ee731e1fd81450a5baab98bb72055705e11 100644 (file)
@@ -2749,9 +2749,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;
 }