linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: nimisolo <nimisolo@aliyun.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] blk-mq: remove unnecessary check in blk_mq_alloc_tag_set
Date: Mon, 06 Apr 2015 09:54:30 -0600	[thread overview]
Message-ID: <5522AC36.6010504@kernel.dk> (raw)
In-Reply-To: <1428295474-15585-1-git-send-email-nimisolo@aliyun.com>

On 04/05/2015 10:44 PM, nimisolo wrote:
> already check set->nr_hw_queues above :
> 	if (!set->nr_hw_queues)
> 		return -EINVAL;
>
> Signed-off-by: nimisolo <nimisolo@aliyun.com>
> ---
>   block/blk-mq.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/block/blk-mq.c b/block/blk-mq.c
> index b7b8933..3ae21c4 100644
> --- a/block/blk-mq.c
> +++ b/block/blk-mq.c
> @@ -2161,7 +2161,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) {

This is already fixed in for-4.1/core.

-- 
Jens Axboe


      reply	other threads:[~2015-04-06 15:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-06  4:44 [PATCH] blk-mq: remove unnecessary check in blk_mq_alloc_tag_set nimisolo
2015-04-06 15:54 ` Jens Axboe [this message]

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=5522AC36.6010504@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nimisolo@aliyun.com \
    /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;
as well as URLs for NNTP newsgroup(s).