From: hujianyang <hujianyang@huawei.com>
To: Jens Axboe <axboe@fb.com>
Cc: <hch@infradead.org>, open list <linux-kernel@vger.kernel.org>
Subject: [PATCH] blk-mq: cleanup additional nr_hw_queues check
Date: Thu, 15 Jan 2015 13:42:06 +0800 [thread overview]
Message-ID: <54B7532E.7010000@huawei.com> (raw)
No need to check set->nr_hw_queues twice in blk_mq_alloc_tag_set(),
remove the latter one.
Signed-off-by: hujianyang <hujianyang@huawei.com>
---
block/blk-mq.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/block/blk-mq.c b/block/blk-mq.c
index a7d4a98..eddeccc 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -2097,7 +2097,7 @@ int blk_mq_alloc_tag_set(struct blk_mq_tag_set *set)
if (set->queue_depth < set->reserved_tags + BLK_MQ_TAG_MIN)
return -EINVAL;
- if (!set->nr_hw_queues || !set->ops->queue_rq || !set->ops->map_queue)
+ if (!set->ops->queue_rq || !set->ops->map_queue)
return -EINVAL;
if (set->queue_depth > BLK_MQ_MAX_DEPTH) {
--
1.6.0.2
reply other threads:[~2015-01-15 5:42 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=54B7532E.7010000@huawei.com \
--to=hujianyang@huawei.com \
--cc=axboe@fb.com \
--cc=hch@infradead.org \
--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