summaryrefslogtreecommitdiff
path: root/block/blk-mq.c
diff options
context:
space:
mode:
authorMing Lei <tom.leiming@gmail.com>2014-04-19 18:00:18 +0800
committerJens Axboe <axboe@fb.com>2014-04-21 10:38:38 -0600
commit4ca085009f447abc1c818f8802e908e9afdd77fa (patch)
tree507b304c0a26595cb67f494abbd60015c5105915 /block/blk-mq.c
parent4847900532c2dc0fc77b67f745c20e636d5b3125 (diff)
blk-mq: user (1 << order) to implement order_to_size()
Cc: Jörg-Volker Peetz <jvpeetz@web.de> Cc: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Ming Lei <tom.leiming@gmail.com> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block/blk-mq.c')
-rw-r--r--block/blk-mq.c7
1 files changed, 1 insertions, 6 deletions
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,