From: Ming Lei Date: Sat, 19 Apr 2014 10:00:18 +0000 (+0800) Subject: blk-mq: user (1 << order) to implement order_to_size() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4ca085009f447abc1c818f8802e908e9afdd77fa;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git blk-mq: user (1 << order) to implement order_to_size() Cc: Jörg-Volker Peetz Cc: Max Filippov Signed-off-by: Ming Lei Signed-off-by: Jens Axboe --- diff --git a/block/blk-mq.c b/block/blk-mq.c index c2777970f28b..3a560a4db0b4 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -1130,12 +1130,7 @@ static void blk_mq_free_rq_map(struct blk_mq_tag_set *set, static size_t order_to_size(unsigned int order) { - size_t ret = PAGE_SIZE; - - while (order--) - ret *= 2; - - return ret; + return (size_t)PAGE_SIZE << order; } static struct blk_mq_tags *blk_mq_init_rq_map(struct blk_mq_tag_set *set,