All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] blk-mq: cleanup additional nr_hw_queues check
@ 2015-01-15  5:42 hujianyang
  0 siblings, 0 replies; only message in thread
From: hujianyang @ 2015-01-15  5:42 UTC (permalink / raw)
  To: Jens Axboe; +Cc: hch, open list

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


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2015-01-15  5:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-15  5:42 [PATCH] blk-mq: cleanup additional nr_hw_queues check hujianyang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.