diff mbox series

[4/4] nvme-apple: remove an extra queue reference

Message ID 20221018135720.670094-5-hch@lst.de (mailing list archive)
State Not Applicable
Headers show
Series [1/4] blk-mq: move the call to blk_put_queue out of blk_mq_destroy_queue | expand

Commit Message

Christoph Hellwig Oct. 18, 2022, 1:57 p.m. UTC
Now that blk_mq_destroy_queue does not release the queue reference, there
is no need for a second admin queue reference to be held by the
apple_nvme structure.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 drivers/nvme/host/apple.c | 9 ---------
 1 file changed, 9 deletions(-)

Comments

Sven Peter Oct. 18, 2022, 5:51 p.m. UTC | #1
On Tue, Oct 18, 2022, at 15:57, Christoph Hellwig wrote:
> Now that blk_mq_destroy_queue does not release the queue reference, there
> is no need for a second admin queue reference to be held by the
> apple_nvme structure.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>

Reviewed-by: Sven Peter <sven@svenpeter.dev>
Chaitanya Kulkarni Oct. 18, 2022, 8:45 p.m. UTC | #2
On 10/18/22 06:57, Christoph Hellwig wrote:
> Now that blk_mq_destroy_queue does not release the queue reference, there
> is no need for a second admin queue reference to be held by the
> apple_nvme structure.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>

Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>

-ck
Sagi Grimberg Oct. 19, 2022, 8:19 a.m. UTC | #3
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
diff mbox series

Patch

diff --git a/drivers/nvme/host/apple.c b/drivers/nvme/host/apple.c
index 42b17439dfd57..fe7f0444a8e46 100644
--- a/drivers/nvme/host/apple.c
+++ b/drivers/nvme/host/apple.c
@@ -1505,15 +1505,6 @@  static int apple_nvme_probe(struct platform_device *pdev)
 		goto put_dev;
 	}
 
-	if (!blk_get_queue(anv->ctrl.admin_q)) {
-		nvme_start_admin_queue(&anv->ctrl);
-		blk_mq_destroy_queue(anv->ctrl.admin_q);
-		blk_put_queue(anv->ctrl.admin_q);
-		anv->ctrl.admin_q = NULL;
-		ret = -ENODEV;
-		goto put_dev;
-	}
-
 	nvme_reset_ctrl(&anv->ctrl);
 	async_schedule(apple_nvme_async_probe, anv);