Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b9f8ce05 authored by Namhyung Kim's avatar Namhyung Kim Committed by Jens Axboe
Browse files

cfq-iosched: algebraic simplification in cfq_prio_to_maxrq()



Simplify the calculation in cfq_prio_to_maxrq(), plus replace CFQ_PRIO_LISTS to
IOPRIO_BE_NR since they are the same and IOPRIO_BE_NR looks more reasonable in
this context IMHO.

Signed-off-by: default avatarNamhyung Kim <namhyung@gmail.com>
Signed-off-by: default avatarJens Axboe <jaxboe@fusionio.com>
parent 4cbadbd1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2102,7 +2102,7 @@ cfq_prio_to_maxrq(struct cfq_data *cfqd, struct cfq_queue *cfqq)

	WARN_ON(cfqq->ioprio >= IOPRIO_BE_NR);

	return 2 * (base_rq + base_rq * (CFQ_PRIO_LISTS - 1 - cfqq->ioprio));
	return 2 * base_rq * (IOPRIO_BE_NR - cfqq->ioprio);
}

/*