From 0aca4d91e8d484dca57c2602976c4c65a2ce5394 Mon Sep 17 00:00:00 2001 From: paul luse Date: Wed, 6 May 2020 10:21:00 -0400 Subject: [PATCH] lib/idxd: clean up some casting and type issues Signed-off-by: paul luse Change-Id: If196c51deead9828fd75388f34b5622884c5e2d8 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2204 Tested-by: SPDK CI Jenkins Reviewed-by: Ben Walker Reviewed-by: Shuhei Matsumoto Community-CI: Mellanox Build Bot --- lib/idxd/idxd.c | 14 +++++++------- lib/idxd/idxd.h | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/idxd/idxd.c b/lib/idxd/idxd.c index df3430412..33e83d3ef 100644 --- a/lib/idxd/idxd.c +++ b/lib/idxd/idxd.c @@ -659,7 +659,7 @@ _idxd_prep_command(struct spdk_idxd_io_channel *chan, desc->flags = IDXD_FLAG_COMPLETION_ADDR_VALID | IDXD_FLAG_REQUEST_COMPLETION; desc->completion_addr = (uintptr_t)&comp->hw; - comp->cb_arg = (uint64_t)cb_arg; + comp->cb_arg = cb_arg; comp->cb_fn = cb_fn; return desc; @@ -685,7 +685,7 @@ spdk_idxd_submit_copy(struct spdk_idxd_io_channel *chan, void *dst, const void * desc->xfer_size = nbytes; /* Submit operation. */ - movdir64b((uint64_t *)chan->ring_ctrl.portal, desc); + movdir64b(chan->ring_ctrl.portal, desc); return 0; } @@ -716,7 +716,7 @@ spdk_idxd_submit_dualcast(struct spdk_idxd_io_channel *chan, void *dst1, void *d desc->xfer_size = nbytes; /* Submit operation. */ - movdir64b((uint64_t *)chan->ring_ctrl.portal, desc); + movdir64b(chan->ring_ctrl.portal, desc); return 0; } @@ -741,7 +741,7 @@ spdk_idxd_submit_compare(struct spdk_idxd_io_channel *chan, void *src1, const vo desc->xfer_size = nbytes; /* Submit operation. */ - movdir64b((uint64_t *)chan->ring_ctrl.portal, desc); + movdir64b(chan->ring_ctrl.portal, desc); return 0; } @@ -766,7 +766,7 @@ spdk_idxd_submit_fill(struct spdk_idxd_io_channel *chan, void *dst, uint64_t fil desc->xfer_size = nbytes; /* Submit operation. */ - movdir64b((uint64_t *)chan->ring_ctrl.portal, desc); + movdir64b(chan->ring_ctrl.portal, desc); return 0; } @@ -793,7 +793,7 @@ spdk_idxd_submit_crc32c(struct spdk_idxd_io_channel *chan, uint32_t *dst, void * desc->xfer_size = nbytes; /* Submit operation. */ - movdir64b((uint64_t *)chan->ring_ctrl.portal, desc); + movdir64b(chan->ring_ctrl.portal, desc); return 0; } @@ -854,7 +854,7 @@ spdk_idxd_process_events(struct spdk_idxd_io_channel *chan) break; } - comp->cb_fn((void *)comp->cb_arg, status); + comp->cb_fn(comp->cb_arg, status); comp->hw.status = status = 0; spdk_bit_array_clear(chan->ring_ctrl.ring_slots, index); } diff --git a/lib/idxd/idxd.h b/lib/idxd/idxd.h index be5de8af1..4664b5c56 100644 --- a/lib/idxd/idxd.h +++ b/lib/idxd/idxd.h @@ -128,7 +128,7 @@ struct idxd_group { */ struct idxd_comp { struct idxd_hw_comp_record hw; - uint64_t cb_arg; + void *cb_arg; spdk_idxd_req_cb cb_fn; uint64_t pad1; uint64_t pad2;