nvme-rdma: fix nvme_ctrl_state() conversion
PATCH 1/1 nvme-rdma: fix nvme_ctrl_state() conversion
From: Hannes Reinecke <[email protected]>
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 <[email protected]>
--- drivers/nvme/host/rdma.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/nvme/host/rdma.c +5 -5
@@ -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
Signature · 1 line
2.35.3
Jens Axboe
maintainerQuoted 6 lines · On 11/30/23 6:42 AM, [email protected] wrote:
From: Hannes Reinecke <[email protected]>
The argument to
nvme_ctrl_state()is 'structnvme_ctrl'.Fixes b59ea0f40072 ("nvme: introduce helper function to get ctrl state")Signed-off-by Hannes Reinecke <[email protected]>
The kerneltest bot has been complaining about this one for a few days, it should get folded into the offending commit however.
Signature · 1 line
Jens Axboe
Keith Busch
maintainerQuoted 10 lines · Jens Axboe
Quoted 6 lines · On 11/30/23 6:42 AM, [email protected] wrote:
From: Hannes Reinecke <[email protected]>
The argument to
nvme_ctrl_state()is 'structnvme_ctrl'.Fixes b59ea0f40072 ("nvme: introduce helper function to get ctrl state")Signed-off-by Hannes Reinecke <[email protected]>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.