diff options
author | Ming Lei <tom.leiming@gmail.com> | 2014-04-19 10:00:18 (GMT) |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2014-04-21 16:38:38 (GMT) |
commit | 4ca085009f447abc1c818f8802e908e9afdd77fa (patch) | |
tree | 507b304c0a26595cb67f494abbd60015c5105915 /block/blk-mq.c | |
parent | 4847900532c2dc0fc77b67f745c20e636d5b3125 (diff) | |
download | linux-4ca085009f447abc1c818f8802e908e9afdd77fa.tar.xz |
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.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c index c277797..3a560a4 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, |