diff mbox series

[RFC,6/6] nvme-pci: use init alloc tagset helper

Message ID 20221010170026.49808-7-kch@nvidia.com (mailing list archive)
State New, archived
Headers show
Series block: add and use tagset init helper | expand

Commit Message

Chaitanya Kulkarni Oct. 10, 2022, 5 p.m. UTC
Signed-off-by: Chaitanya Kulkarni <kch@nvidia.com>
---
 drivers/nvme/host/pci.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index 7bbffd2a9beb..2c153c08e418 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -1756,6 +1756,7 @@  static void nvme_dev_remove_admin(struct nvme_dev *dev)
 static int nvme_pci_alloc_admin_tag_set(struct nvme_dev *dev)
 {
 	struct blk_mq_tag_set *set = &dev->admin_tagset;
+	int ret;
 
 	set->ops = &nvme_mq_admin_ops;
 	set->nr_hw_queues = 1;
@@ -1767,7 +1768,9 @@  static int nvme_pci_alloc_admin_tag_set(struct nvme_dev *dev)
 	set->flags = BLK_MQ_F_NO_SCHED;
 	set->driver_data = dev;
 
-	if (blk_mq_alloc_tag_set(set))
+	ret = blk_mq_init_alloc_tag_set(set, &nvme_mq_admin_ops, 1,
+					NVME_AQ_MQ_TAG_DEPTH, dev);
+	if (ret)
 		return -ENOMEM;
 	dev->ctrl.admin_tagset = set;