linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: James Smart <james.smart@broadcom.com>, linux-nvme@lists.infradead.org
Subject: Re: [PATCH] nvme-fc: fix error loop in create_hw_io_queues
Date: Mon, 19 Oct 2020 12:04:00 +0200	[thread overview]
Message-ID: <a49f995b-d256-51f9-e004-e975fab81104@suse.de> (raw)
In-Reply-To: <20201016210604.48542-1-james.smart@broadcom.com>

On 10/16/20 11:06 PM, James Smart wrote:
> The loop that backs out of hw io queue creation continues through index
> 0, which corresponds to the admin queue as well.
> 
> Fix the loop so it only proceeds through indexes 1..n which correspond to
> io queues.
> 
> Signed-off-by: James Smart <james.smart@broadcom.com>
> ---
>   drivers/nvme/host/fc.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/nvme/host/fc.c b/drivers/nvme/host/fc.c
> index e2e09e25c056..f002522146e2 100644
> --- a/drivers/nvme/host/fc.c
> +++ b/drivers/nvme/host/fc.c
> @@ -2314,7 +2314,7 @@ nvme_fc_create_hw_io_queues(struct nvme_fc_ctrl *ctrl, u16 qsize)
>   	return 0;
>   
>   delete_queues:
> -	for (; i >= 0; i--)
> +	for (; i > 0; i--)
>   		__nvme_fc_delete_hw_queue(ctrl, &ctrl->queues[i], i);
>   	return ret;
>   }
> 
> 
Reviewed-by: Hannes Reinecke <hare@suse.de>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke                Kernel Storage Architect
hare@suse.de                              +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

  reply	other threads:[~2020-10-19 10:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-16 21:06 [PATCH] nvme-fc: fix error loop in create_hw_io_queues James Smart
2020-10-19 10:04 ` Hannes Reinecke [this message]
2020-10-19 14:55 ` Himanshu Madhani
2020-10-22 13:37 ` Christoph Hellwig

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=a49f995b-d256-51f9-e004-e975fab81104@suse.de \
    --to=hare@suse.de \
    --cc=james.smart@broadcom.com \
    --cc=linux-nvme@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).