Skip to content

Commit

Permalink
cfq-iosched: Adjust one function call together with a variable assign…
Browse files Browse the repository at this point in the history
…ment

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 <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
elfring authored and axboe committed Jan 23, 2017
1 parent d609af3 commit 1cf4175
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions block/cfq-iosched.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 1cf4175

Please sign in to comment.