Commit 5f2f2052 authored by Daniel Verkamp's avatar Daniel Verkamp Committed by Jim Harris
Browse files

nvme: reorder spdk_nvme_timeout_cb arguments



Move cb_arg to the first argument to match the other NVMe callback
function signatures.

Change-Id: I4e699c8071dcb7ba4ce3cdb82ee985600208204c
Signed-off-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
parent 84501695
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -386,9 +386,9 @@ struct spdk_nvme_qpair;
 * Signature for the callback function invoked when a timeout is
 * detected on a request.
 */
typedef void (*spdk_nvme_timeout_cb)(struct spdk_nvme_ctrlr *ctrlr,
				     struct spdk_nvme_qpair *qpair,
				     void *cb_arg);
typedef void (*spdk_nvme_timeout_cb)(void *cb_arg,
				     struct spdk_nvme_ctrlr *ctrlr,
				     struct spdk_nvme_qpair *qpair);

/**
 * \brief Register for timeout callback on a controller.
+2 −2
Original line number Diff line number Diff line
@@ -500,8 +500,8 @@ probe_cb(void *cb_ctx, const struct spdk_nvme_transport_id *trid,
}

static void
blockdev_nvme_timeout_cb(struct spdk_nvme_ctrlr *ctrlr,
			 struct spdk_nvme_qpair *qpair, void *cb_arg)
blockdev_nvme_timeout_cb(void *cb_arg, struct spdk_nvme_ctrlr *ctrlr,
			 struct spdk_nvme_qpair *qpair)
{
	int rc;

+1 −1
Original line number Diff line number Diff line
@@ -1841,7 +1841,7 @@ nvme_pcie_qpair_check_timeout(struct spdk_nvme_qpair *qpair)
		 * Request has timed out. This could be i/o or admin request.
		 * Call the registered timeout function for user to take action.
		 */
		ctrlr->timeout_cb_fn(ctrlr, qpair, ctrlr->timeout_cb_arg);
		ctrlr->timeout_cb_fn(ctrlr->timeout_cb_arg, ctrlr, qpair);
	}
}