summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToomas Soome <tsoome@me.com>2018-11-22 14:03:02 +0200
committerToomas Soome <tsoome@me.com>2020-02-24 20:49:09 +0200
commit93fec3dabf64a3a6299b6973ba1d0260c667e1c0 (patch)
treed42e7821de5083b89b88668006d0afa922d96f49
parentb877e47f88a401dbef6fff48940d38855c01fcbc (diff)
downloadillumos-joyent-93fec3dabf64a3a6299b6973ba1d0260c667e1c0.tar.gz
12080 udapl_tavor: cast between incompatible function types
Reviewed by: John Levon <john.levon@joyent.com> Approved by: Dan McDonald <danmcd@joyent.com>
-rw-r--r--usr/src/lib/udapl/udapl_tavor/common/dapl_evd_util.c91
-rw-r--r--usr/src/lib/udapl/udapl_tavor/common/dapl_ia_util.c113
2 files changed, 106 insertions, 98 deletions
diff --git a/usr/src/lib/udapl/udapl_tavor/common/dapl_evd_util.c b/usr/src/lib/udapl/udapl_tavor/common/dapl_evd_util.c
index 19e2eaaa5d..b40dd626db 100644
--- a/usr/src/lib/udapl/udapl_tavor/common/dapl_evd_util.c
+++ b/usr/src/lib/udapl/udapl_tavor/common/dapl_evd_util.c
@@ -77,16 +77,16 @@ dapli_evd_event_alloc(
* to create the default async evd.
*
* Input:
- * ia_ptr
+ * ia_ptr
* cno_ptr
* qlen
* evd_flags
*
* Output:
- * evd_ptr_ptr
+ * evd_ptr_ptr
*
* Returns:
- * none
+ * none
*
*/
@@ -136,6 +136,13 @@ dapls_evd_internal_create(
goto bail;
}
+#if 0
+ /*
+ * Current implementation of dapls_ib_setup_async_callback() does
+ * nothing and returns DAT_SUCCESS. However, it is declared to expect
+ * function pointers with different signatures. We do leave the code
+ * block out till dapls_ib_setup_async_callback() is implemented.
+ */
dat_status = dapls_ib_setup_async_callback(
ia_ptr,
DAPL_ASYNC_CQ_COMPLETION,
@@ -145,6 +152,7 @@ dapls_evd_internal_create(
if (dat_status != DAT_SUCCESS) {
goto bail;
}
+#endif
/*
* cq_notify is not required since when evd_wait is called
* time we go and poll cq anyways.
@@ -181,13 +189,13 @@ bail:
* alloc and initialize an EVD struct
*
* Input:
- * ia
+ * ia
*
* Output:
- * evd_ptr
+ * evd_ptr
*
* Returns:
- * none
+ * none
*
*/
DAPL_EVD *
@@ -250,14 +258,14 @@ bail:
* alloc events into an EVD.
*
* Input:
- * evd_ptr
+ * evd_ptr
* qlen
*
* Output:
- * NONE
+ * NONE
*
* Returns:
- * DAT_SUCCESS
+ * DAT_SUCCESS
* ERROR
*
*/
@@ -328,13 +336,13 @@ bail:
* error.
*
* Input:
- * evd_ptr
+ * evd_ptr
*
* Output:
- * none
+ * none
*
* Returns:
- * status
+ * status
*
*/
DAT_RETURN
@@ -413,8 +421,7 @@ bail:
#ifdef DAPL_DBG /* For debugging. */
void
-dapli_evd_eh_print_cqe(
- IN ib_work_completion_t cqe)
+dapli_evd_eh_print_cqe(IN ib_work_completion_t cqe)
{
static char *optable[] = {
"",
@@ -481,7 +488,7 @@ dapli_evd_eh_print_cqe(
* that the lock is held.
*
* Input:
- * evd_ptr
+ * evd_ptr
*
* Output:
* event
@@ -518,8 +525,8 @@ dapli_evd_get_event(
* entry to this function.
*
* Input:
- * evd_ptr
- * event
+ * evd_ptr
+ * event
*
* Output:
* none
@@ -532,7 +539,7 @@ dapli_evd_post_event(
IN const DAT_EVENT *event_ptr)
{
DAT_RETURN dat_status;
- DAPL_CNO *cno_to_trigger = NULL;
+ DAPL_CNO *cno_to_trigger = NULL;
dapl_dbg_log(DAPL_DBG_TYPE_EVD,
"dapli_evd_post_event: Called with event # %x\n",
@@ -606,8 +613,8 @@ dapli_evd_post_event(
* entry to this function.
*
* Input:
- * evd_ptr
- * event
+ * evd_ptr
+ * event
*
* Output:
* none
@@ -643,8 +650,8 @@ dapli_evd_post_event_nosignal(
* format an overflow event for posting
*
* Input:
- * evd_ptr
- * event_ptr
+ * evd_ptr
+ * event_ptr
*
* Output:
* none
@@ -671,8 +678,8 @@ dapli_evd_format_overflow_event(
* post an overflow event
*
* Input:
- * async_evd_ptr
- * evd_ptr
+ * async_evd_ptr
+ * evd_ptr
*
* Output:
* none
@@ -711,7 +718,7 @@ dapli_evd_get_and_init_event(
IN DAPL_EVD *evd_ptr,
IN DAT_EVENT_NUMBER event_number)
{
- DAT_EVENT *event_ptr;
+ DAT_EVENT *event_ptr;
event_ptr = dapli_evd_get_event(evd_ptr);
if (NULL == event_ptr) {
@@ -734,7 +741,7 @@ dapls_evd_post_cr_arrival_event(
DAT_CONN_QUAL conn_qual,
DAT_CR_HANDLE cr_handle)
{
- DAT_EVENT *event_ptr;
+ DAT_EVENT *event_ptr;
event_ptr = dapli_evd_get_and_init_event(evd_ptr, event_number);
/*
* Note event lock may be held on successful return
@@ -765,7 +772,7 @@ dapls_evd_post_connection_event(
IN DAT_COUNT private_data_size,
IN DAT_PVOID private_data)
{
- DAT_EVENT *event_ptr;
+ DAT_EVENT *event_ptr;
event_ptr = dapli_evd_get_and_init_event(evd_ptr, event_number);
/*
* Note event lock may be held on successful return
@@ -793,7 +800,7 @@ dapls_evd_post_async_error_event(
IN DAT_EVENT_NUMBER event_number,
IN DAT_IA_HANDLE ia_handle)
{
- DAT_EVENT *event_ptr;
+ DAT_EVENT *event_ptr;
event_ptr = dapli_evd_get_and_init_event(evd_ptr, event_number);
/*
* Note event lock may be held on successful return
@@ -818,7 +825,7 @@ dapls_evd_post_software_event(
IN DAT_EVENT_NUMBER event_number,
IN DAT_PVOID pointer)
{
- DAT_EVENT *event_ptr;
+ DAT_EVENT *event_ptr;
event_ptr = dapli_evd_get_and_init_event(evd_ptr, event_number);
/*
* Note event lock may be held on successful return
@@ -911,13 +918,13 @@ dapls_evd_post_premature_events(IN DAPL_EP *ep_ptr)
*
* Input:
* evd_ptr
- * cqe_ptr
+ * cqe_ptr
*
* Output:
- * event_ptr
+ * event_ptr
*
* Returns:
- * none
+ * none
*
*/
static DAT_BOOLEAN
@@ -1206,10 +1213,10 @@ dapli_evd_cqe_to_event(
* evd_ptr
*
* Output:
- * nevents
+ * nevents
*
* Returns:
- * none
+ * none
*
*/
void
@@ -1296,16 +1303,14 @@ dapls_evd_copy_cq(
* timeout
*
* Output:
- * return status
+ * return status
*
* Returns:
- * none
+ * none
*
*/
DAT_RETURN
-dapls_evd_copy_events(
- DAPL_EVD *evd_ptr,
- DAT_TIMEOUT timeout)
+dapls_evd_copy_events(DAPL_EVD *evd_ptr, DAT_TIMEOUT timeout)
{
dapl_ib_event_t evp_arr[NUM_EVENTS_PER_POLL];
dapl_ib_event_t *evpp_start;
@@ -1584,16 +1589,14 @@ dapls_evd_copy_events(
* evd_ptr
*
* Output:
- * event
+ * event
*
* Returns:
- * Status of operation
+ * Status of operation
*
*/
DAT_RETURN
-dapls_evd_cq_poll_to_event(
- IN DAPL_EVD *evd_ptr,
- OUT DAT_EVENT *event)
+dapls_evd_cq_poll_to_event(IN DAPL_EVD *evd_ptr, OUT DAT_EVENT *event)
{
DAT_RETURN dat_status;
ib_work_completion_t cur_cqe;
diff --git a/usr/src/lib/udapl/udapl_tavor/common/dapl_ia_util.c b/usr/src/lib/udapl/udapl_tavor/common/dapl_ia_util.c
index bc16ef69b4..714d60eac7 100644
--- a/usr/src/lib/udapl/udapl_tavor/common/dapl_ia_util.c
+++ b/usr/src/lib/udapl/udapl_tavor/common/dapl_ia_util.c
@@ -55,13 +55,13 @@ void dapli_ia_release_hca(
* alloc and initialize an IA INFO struct
*
* Input:
- * none
+ * none
*
* Output:
- * ia_ptr
+ * ia_ptr
*
* Returns:
- * none
+ * none
*
*/
DAPL_IA *
@@ -123,19 +123,18 @@ dapl_ia_alloc(DAT_PROVIDER * provider, DAPL_HCA * hca_ptr)
* Performs an abrupt close of the IA
*
* Input:
- * ia_ptr
+ * ia_ptr
*
* Output:
- * none
+ * none
*
* Returns:
- * status
+ * status
*
*/
DAT_RETURN
-dapl_ia_abrupt_close(
- IN DAPL_IA *ia_ptr)
+dapl_ia_abrupt_close(IN DAPL_IA *ia_ptr)
{
DAT_RETURN dat_status;
DAPL_EP *ep_ptr, *next_ep_ptr;
@@ -346,24 +345,23 @@ dapl_ia_abrupt_close(
* Performs an graceful close of the IA
*
* Input:
- * ia_ptr
+ * ia_ptr
*
* Output:
- * none
+ * none
*
* Returns:
- * status
+ * status
*
*/
DAT_RETURN
-dapl_ia_graceful_close(
- IN DAPL_IA *ia_ptr)
+dapl_ia_graceful_close(IN DAPL_IA *ia_ptr)
{
DAT_RETURN dat_status;
DAT_RETURN cur_dat_status;
DAPL_EVD *evd_ptr;
- DAPL_LLIST_ENTRY *entry;
+ DAPL_LLIST_ENTRY *entry;
DAPL_HCA *hca_ptr;
dat_status = DAT_SUCCESS;
@@ -491,13 +489,13 @@ dapli_ia_release_hca(
* free an IA INFO struct
*
* Input:
- * ia_ptr
+ * ia_ptr
*
* Output:
- * one
+ * one
*
* Returns:
- * none
+ * none
*
*/
void
@@ -535,10 +533,10 @@ dapls_ia_free(DAPL_IA *ia_ptr)
* ep_ptr
*
* Output:
- * none
+ * none
*
* Returns:
- * none
+ * none
*
*/
void
@@ -563,10 +561,10 @@ dapl_ia_link_ep(
* ep_ptr
*
* Output:
- * none
+ * none
*
* Returns:
- * none
+ * none
*
*/
void
@@ -590,10 +588,10 @@ dapl_ia_unlink_ep(
* lmr_ptr
*
* Output:
- * none
+ * none
*
* Returns:
- * none
+ * none
*
*/
void
@@ -618,10 +616,10 @@ dapl_ia_link_lmr(
* lmr_ptr
*
* Output:
- * none
+ * none
*
* Returns:
- * none
+ * none
*
*/
void
@@ -645,10 +643,10 @@ dapl_ia_unlink_lmr(
* rmr_ptr
*
* Output:
- * none
+ * none
*
* Returns:
- * none
+ * none
*
*/
void
@@ -673,10 +671,10 @@ dapl_ia_link_rmr(
* rmr_ptr
*
* Output:
- * none
+ * none
*
* Returns:
- * none
+ * none
*
*/
void
@@ -700,10 +698,10 @@ dapl_ia_unlink_rmr(
* pz_ptr
*
* Output:
- * none
+ * none
*
* Returns:
- * none
+ * none
*
*/
void
@@ -728,10 +726,10 @@ dapl_ia_link_pz(
* pz_ptr
*
* Output:
- * none
+ * none
*
* Returns:
- * none
+ * none
*
*/
void
@@ -755,10 +753,10 @@ dapl_ia_unlink_pz(
* evd_ptr
*
* Output:
- * none
+ * none
*
* Returns:
- * none
+ * none
*
*/
void
@@ -783,10 +781,10 @@ dapl_ia_link_evd(
* evd_ptr
*
* Output:
- * none
+ * none
*
* Returns:
- * none
+ * none
*
*/
void
@@ -810,10 +808,10 @@ dapl_ia_unlink_evd(
* cno_ptr
*
* Output:
- * none
+ * none
*
* Returns:
- * none
+ * none
*
*/
void
@@ -838,10 +836,10 @@ dapl_ia_link_cno(
* cno_ptr
*
* Output:
- * none
+ * none
*
* Returns:
- * none
+ * none
*
*/
void
@@ -865,10 +863,10 @@ dapl_ia_unlink_cno(
* sp_ptr
*
* Output:
- * none
+ * none
*
* Returns:
- * none
+ * none
*
*/
void
@@ -893,10 +891,10 @@ dapl_ia_link_psp(
* sp_ptr
*
* Output:
- * none
+ * none
*
* Returns:
- * none
+ * none
*
*/
void
@@ -930,10 +928,10 @@ dapls_ia_unlink_sp(
* sp_ptr
*
* Output:
- * none
+ * none
*
* Returns:
- * none
+ * none
*
*/
DAPL_SP *
@@ -980,10 +978,10 @@ dapls_ia_sp_search(
* sp_ptr
*
* Output:
- * none
+ * none
*
* Returns:
- * none
+ * none
*
*/
void
@@ -1008,10 +1006,10 @@ dapl_ia_link_rsp(
* srq_ptr
*
* Output:
- * none
+ * none
*
* Returns:
- * none
+ * none
*
*/
void
@@ -1036,10 +1034,10 @@ dapl_ia_link_srq(
* srq_ptr
*
* Output:
- * none
+ * none
*
* Returns:
- * none
+ * none
*
*/
void
@@ -1060,6 +1058,13 @@ dapls_ia_setup_callbacks(
{
DAT_RETURN dat_status = DAT_SUCCESS;
+#if 0
+ /*
+ * Current implementation of dapls_ib_setup_async_callback() does
+ * nothing and returns DAT_SUCCESS. However, it is declared to expect
+ * function pointers with different signatures. We do leave the code
+ * block out till dapls_ib_setup_async_callback() is implemented.
+ */
/* unaffiliated handler */
dat_status =
dapls_ib_setup_async_callback(
@@ -1104,8 +1109,8 @@ dapls_ia_setup_callbacks(
dat_status);
goto bail;
}
-
bail:
+#endif
return (dat_status);
}