linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Chaitanya Kulkarni <chaitanyak@nvidia.com>
To: <linux-nvme@lists.infradead.org>
Cc: <hch@lst.de>, <kbusch@kernel.org>, <sagi@grimberg.me>,
	Chaitanya Kulkarni <kch@nvidia.com>
Subject: [PATCH 3/9] nvme-tcp: use helper to initialize connect_q
Date: Fri, 28 Jan 2022 01:20:09 -0800	[thread overview]
Message-ID: <20220128092015.19289-4-chaitanyak@nvidia.com> (raw)
In-Reply-To: <20220128092015.19289-1-chaitanyak@nvidia.com>

From: Chaitanya Kulkarni <kch@nvidia.com>

Use helper to remove duplicate code for connect queue initialization
and error handling for all fabrics transports.

Signed-off-by: Chaitanya Kulkarni <kch@nvidia.com>
---
 drivers/nvme/host/tcp.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/nvme/host/tcp.c b/drivers/nvme/host/tcp.c
index 4ceb28675fdf..6cbcc8b4daaf 100644
--- a/drivers/nvme/host/tcp.c
+++ b/drivers/nvme/host/tcp.c
@@ -1825,11 +1825,9 @@ static int nvme_tcp_configure_io_queues(struct nvme_ctrl *ctrl, bool new)
 			goto out_free_io_queues;
 		}
 
-		ctrl->connect_q = blk_mq_init_queue(ctrl->tagset);
-		if (IS_ERR(ctrl->connect_q)) {
-			ret = PTR_ERR(ctrl->connect_q);
+		ret = nvme_ctrl_init_connect_q(ctrl);
+		if (ret)
 			goto out_free_tag_set;
-		}
 	}
 
 	ret = nvme_tcp_start_io_queues(ctrl);
-- 
2.29.0



  parent reply	other threads:[~2022-01-28  9:23 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-28  9:20 [PATCH 0/9] nvme: add helpers and remove duplicate code Chaitanya Kulkarni
2022-01-28  9:20 ` [PATCH 1/9] nvme-fc: add a helper to initialize connect_q Chaitanya Kulkarni
2022-01-28  9:23   ` Chaitanya Kulkarni
2022-01-30  9:44   ` Sagi Grimberg
2022-02-01  8:09   ` Christoph Hellwig
2022-01-28  9:20 ` [PATCH 2/9] nvme-rdma: use " Chaitanya Kulkarni
2022-01-30  9:44   ` Sagi Grimberg
2022-01-28  9:20 ` Chaitanya Kulkarni [this message]
2022-01-30  9:44   ` [PATCH 3/9] nvme-tcp: " Sagi Grimberg
2022-01-28  9:20 ` [PATCH 4/9] nvme-loop: " Chaitanya Kulkarni
2022-01-30  9:44   ` Sagi Grimberg
2022-01-28  9:20 ` [PATCH 5/9] nvme-fc: centralize admin tagset initialization Chaitanya Kulkarni
2022-01-28  9:23   ` Chaitanya Kulkarni
2022-01-30  9:47   ` Sagi Grimberg
2022-02-02  6:48     ` Chaitanya Kulkarni
2022-02-01  8:11   ` Christoph Hellwig
2022-02-02  6:46     ` Chaitanya Kulkarni
2022-01-28  9:20 ` [PATCH 6/9] nvme-pci: use helper for " Chaitanya Kulkarni
2022-01-28  9:20 ` [PATCH 7/9] nvme-rdma: " Chaitanya Kulkarni
2022-01-28  9:20 ` [PATCH 8/9] nvme-tcp: " Chaitanya Kulkarni
2022-01-28  9:20 ` [PATCH 9/9] nvme-loop: " Chaitanya Kulkarni

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=20220128092015.19289-4-chaitanyak@nvidia.com \
    --to=chaitanyak@nvidia.com \
    --cc=hch@lst.de \
    --cc=kbusch@kernel.org \
    --cc=kch@nvidia.com \
    --cc=linux-nvme@lists.infradead.org \
    --cc=sagi@grimberg.me \
    /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).