From: Namhyung Kim Date: Tue, 24 May 2011 08:23:21 +0000 (+0200) Subject: cfq-iosched: algebraic simplification in cfq_prio_to_maxrq() X-Git-Tag: v3.0-rc1~163^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b9f8ce059940064a732da49b5d6e618381dad956;p=platform%2Fkernel%2Flinux-exynos.git 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: Namhyung Kim Signed-off-by: Jens Axboe --- diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index 0316f6e..00763e5 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c @@ -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); } /*