From: Ming Lei <tom.leiming@gmail.com>
To: Jens Axboe <axboe@kernel.dk>, linux-kernel@vger.kernel.org
Cc: "Christoph Hellwig" <hch@lst.de>,
"Ming Lei" <tom.leiming@gmail.com>,
"Jörg-Volker Peetz" <jvpeetz@web.de>,
"Max Filippov" <jcmvbkbc@gmail.com>
Subject: [PATCH v1 next 3/4] blk-mq: user (1 << order) to implement order_to_size()
Date: Sat, 19 Apr 2014 18:00:18 +0800 [thread overview]
Message-ID: <1397901619-27226-4-git-send-email-tom.leiming@gmail.com> (raw)
In-Reply-To: <1397901619-27226-1-git-send-email-tom.leiming@gmail.com>
Cc: Jörg-Volker Peetz <jvpeetz@web.de>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Ming Lei <tom.leiming@gmail.com>
---
block/blk-mq.c | 7 +------
1 file changed, 1 insertion(+), 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,
--
1.7.9.5
next prev parent reply other threads:[~2014-04-19 10:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-19 10:00 [PATCH v1 next 0/4] blk-mq: misc changes Ming Lei
2014-04-19 10:00 ` [PATCH v1 next 1/4] blk-mq: free hctx->ctx_map when init failed Ming Lei
2014-04-19 10:00 ` [PATCH v1 next 2/4] blk-mq: fix allocation of set->tags Ming Lei
2014-04-19 10:00 ` Ming Lei [this message]
2014-04-19 10:00 ` [PATCH v1 next 4/4] blk-mq: initialize req->q in allocation Ming Lei
2014-04-22 1:03 ` [PATCH v1 next 0/4] blk-mq: misc changes Jens Axboe
2014-04-22 1:25 ` Ming Lei
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1397901619-27226-4-git-send-email-tom.leiming@gmail.com \
--to=tom.leiming@gmail.com \
--cc=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=jcmvbkbc@gmail.com \
--cc=jvpeetz@web.de \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®