All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nvme-rdma: fix nvme_ctrl_state() conversion
@ 2023-11-30 13:42 hare
  2023-11-30 14:42 ` Jens Axboe
  0 siblings, 1 reply; 3+ messages in thread
From: hare @ 2023-11-30 13:42 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Keith Busch, Sagi Grimberg, linux-nvme, Hannes Reinecke

From: Hannes Reinecke <hare@suse.de>

The argument to nvme_ctrl_state() is 'struct nvme_ctrl'.

Fixes: b59ea0f40072 ("nvme: introduce helper function to get ctrl state")
Signed-off-by: Hannes Reinecke <hare@suse.de>
---
 drivers/nvme/host/rdma.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/nvme/host/rdma.c b/drivers/nvme/host/rdma.c
index 0ef2ac67d2ae..81e2621169e5 100644
--- a/drivers/nvme/host/rdma.c
+++ b/drivers/nvme/host/rdma.c
@@ -984,7 +984,7 @@ static void nvme_rdma_free_ctrl(struct nvme_ctrl *nctrl)
 
 static void nvme_rdma_reconnect_or_remove(struct nvme_rdma_ctrl *ctrl)
 {
-	enum nvme_ctrl_state state = nvme_ctrl_state(ctrl);
+	enum nvme_ctrl_state state = nvme_ctrl_state(&ctrl->ctrl);
 
 	/* If we are resetting/deleting then do nothing */
 	if (state != NVME_CTRL_CONNECTING) {
@@ -1060,7 +1060,7 @@ static int nvme_rdma_setup_ctrl(struct nvme_rdma_ctrl *ctrl, bool new)
 		 * unless we're during creation of a new controller to
 		 * avoid races with teardown flow.
 		 */
-		enum nvme_ctrl_state state = nvme_ctrl_state(ctrl);
+		enum nvme_ctrl_state state = nvme_ctrl_state(&ctrl->ctrl);
 
 		WARN_ON_ONCE(state != NVME_CTRL_DELETING &&
 			     state != NVME_CTRL_DELETING_NOIO);
@@ -1132,7 +1132,7 @@ static void nvme_rdma_error_recovery_work(struct work_struct *work)
 
 	if (!nvme_change_ctrl_state(&ctrl->ctrl, NVME_CTRL_CONNECTING)) {
 		/* state change failure is ok if we started ctrl delete */
-		enum nvme_ctrl_state state = nvme_ctrl_state(ctrl);
+		enum nvme_ctrl_state state = nvme_ctrl_state(&ctrl->ctrl);
 
 		WARN_ON_ONCE(state != NVME_CTRL_DELETING &&
 			     state != NVME_CTRL_DELETING_NOIO);
@@ -1167,7 +1167,7 @@ static void nvme_rdma_wr_error(struct ib_cq *cq, struct ib_wc *wc,
 	struct nvme_rdma_queue *queue = wc->qp->qp_context;
 	struct nvme_rdma_ctrl *ctrl = queue->ctrl;
 
-	if (nvme_ctrl_state(ctrl) == NVME_CTRL_LIVE)
+	if (nvme_ctrl_state(&ctrl->ctrl) == NVME_CTRL_LIVE)
 		dev_info(ctrl->ctrl.device,
 			     "%s for CQE 0x%p failed with status %s (%d)\n",
 			     op, wc->wr_cqe,
@@ -1950,7 +1950,7 @@ static enum blk_eh_timer_return nvme_rdma_timeout(struct request *rq)
 	dev_warn(ctrl->ctrl.device, "I/O %d QID %d timeout\n",
 		 rq->tag, nvme_rdma_queue_idx(queue));
 
-	if (nvme_ctrl_state(ctrl) != NVME_CTRL_LIVE) {
+	if (nvme_ctrl_state(&ctrl->ctrl) != NVME_CTRL_LIVE) {
 		/*
 		 * If we are resetting, connecting or deleting we should
 		 * complete immediately because we may block controller
-- 
2.35.3



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] nvme-rdma: fix nvme_ctrl_state() conversion
  2023-11-30 13:42 [PATCH] nvme-rdma: fix nvme_ctrl_state() conversion hare
@ 2023-11-30 14:42 ` Jens Axboe
  2023-11-30 15:40   ` Keith Busch
  0 siblings, 1 reply; 3+ messages in thread
From: Jens Axboe @ 2023-11-30 14:42 UTC (permalink / raw)
  To: hare, Christoph Hellwig
  Cc: Keith Busch, Sagi Grimberg, linux-nvme, Hannes Reinecke

On 11/30/23 6:42 AM, hare@kernel.org wrote:
> From: Hannes Reinecke <hare@suse.de>
> 
> The argument to nvme_ctrl_state() is 'struct nvme_ctrl'.
> 
> Fixes: b59ea0f40072 ("nvme: introduce helper function to get ctrl state")
> Signed-off-by: Hannes Reinecke <hare@suse.de>

The kerneltest bot has been complaining about this one for a few days,
it should get folded into the offending commit however.

-- 
Jens Axboe




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] nvme-rdma: fix nvme_ctrl_state() conversion
  2023-11-30 14:42 ` Jens Axboe
@ 2023-11-30 15:40   ` Keith Busch
  0 siblings, 0 replies; 3+ messages in thread
From: Keith Busch @ 2023-11-30 15:40 UTC (permalink / raw)
  To: Jens Axboe
  Cc: hare, Christoph Hellwig, Sagi Grimberg, linux-nvme,
	Hannes Reinecke

On Thu, Nov 30, 2023 at 07:42:13AM -0700, Jens Axboe wrote:
> On 11/30/23 6:42 AM, hare@kernel.org wrote:
> > From: Hannes Reinecke <hare@suse.de>
> > 
> > The argument to nvme_ctrl_state() is 'struct nvme_ctrl'.
> > 
> > Fixes: b59ea0f40072 ("nvme: introduce helper function to get ctrl state")
> > Signed-off-by: Hannes Reinecke <hare@suse.de>
> 
> The kerneltest bot has been complaining about this one for a few days,
> it should get folded into the offending commit however.

Mea culpa... I thought I'd tested my usual allconfig before pushing, but
it was the minimal config instead.

I've folded the fix in, will push shortly.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-11-30 15:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-30 13:42 [PATCH] nvme-rdma: fix nvme_ctrl_state() conversion hare
2023-11-30 14:42 ` Jens Axboe
2023-11-30 15:40   ` Keith Busch

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.