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: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
Daniel Verkamp 2017-02-22 14:26:01 -07:00 committed by Jim Harris
parent 84501695fd
commit 5f2f2052c0
3 changed files with 6 additions and 6 deletions

View File

@ -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.

View File

@ -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;

View File

@ -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);
}
}