From b965d36afda54171cde25dedb826c55cc7419762 Mon Sep 17 00:00:00 2001 From: Jinshan Xiong Date: Tue, 26 Nov 2024 21:12:20 +0000 Subject: [PATCH] fix format issue --- src/cart/crt_context.c | 2 +- src/cart/crt_hg.c | 6 ++---- src/cart/crt_hg_proc.c | 5 +++-- src/cart/crt_internal.h | 12 ++++++------ src/cart/crt_register.c | 2 +- src/cart/crt_rpc.c | 2 +- 6 files changed, 14 insertions(+), 15 deletions(-) diff --git a/src/cart/crt_context.c b/src/cart/crt_context.c index 7e32613cced..3cafb8b39fe 100644 --- a/src/cart/crt_context.c +++ b/src/cart/crt_context.c @@ -535,7 +535,7 @@ crt_rpc_complete_and_unlock(struct crt_rpc_priv *rpc_priv, int rc) if (cbinfo.cci_rc != 0) RPC_CWARN(crt_quiet_error(cbinfo.cci_rc), DB_NET, rpc_priv, - "failed, " DF_RC "\n", DP_RC(cbinfo.cci_rc)); + "failed, " DF_RC "\n", DP_RC(cbinfo.cci_rc)); RPC_TRACE(DB_TRACE, rpc_priv, "Invoking RPC callback (rank %d tag %d) rc: " diff --git a/src/cart/crt_hg.c b/src/cart/crt_hg.c index 5cbd68ea6cc..8f2395a44ff 100644 --- a/src/cart/crt_hg.c +++ b/src/cart/crt_hg.c @@ -1154,9 +1154,7 @@ crt_rpc_handler_common(hg_handle_t hg_hdl) else rc = crt_corpc_common_hdlr(rpc_priv); if (unlikely(rc != 0)) { - RPC_INFO(rpc_priv, - "failed to invoke RPC handler, rc: "DF_RC"\n", - DP_RC(rc)); + RPC_INFO(rpc_priv, "failed to invoke RPC handler, rc: " DF_RC "\n", DP_RC(rc)); crt_hg_reply_error_send(rpc_priv, rc); D_GOTO(decref, hg_ret = HG_SUCCESS); } @@ -1365,7 +1363,7 @@ crt_hg_req_send_cb(const struct hg_cb_info *hg_cbinfo) if (crt_cbinfo.cci_rc != 0) RPC_CWARN(crt_quiet_error(crt_cbinfo.cci_rc), DB_NET, rpc_priv, - "RPC failed; rc: " DF_RC "\n", DP_RC(crt_cbinfo.cci_rc)); + "RPC failed; rc: " DF_RC "\n", DP_RC(crt_cbinfo.cci_rc)); RPC_TRACE(DB_TRACE, rpc_priv, "Invoking RPC callback (rank %d tag %d) rc: " DF_RC "\n", diff --git a/src/cart/crt_hg_proc.c b/src/cart/crt_hg_proc.c index 6def265d637..fa6df8b7397 100644 --- a/src/cart/crt_hg_proc.c +++ b/src/cart/crt_hg_proc.c @@ -713,8 +713,9 @@ crt_proc_out_common(crt_proc_t proc, crt_rpc_output_t *data) rc2 = rpc_priv->crp_reply_hdr.cch_rc; if (rc2 != 0) { RPC_CWARN(crt_quiet_error(rc2), DB_NET, rpc_priv, - "RPC failed to execute on target. " - "error code: "DF_RC"\n", DP_RC(rc2)); + "RPC failed to execute on target. " + "error code: " DF_RC "\n", + DP_RC(rc2)); D_GOTO(out, rc); } diff --git a/src/cart/crt_internal.h b/src/cart/crt_internal.h index 216409d0d53..d9cd17b156d 100644 --- a/src/cart/crt_internal.h +++ b/src/cart/crt_internal.h @@ -92,12 +92,12 @@ RPC_ERROR(rpc, fmt, ## __VA_ARGS__); \ } while (0) -#define RPC_CWARN(cond, mask, rpc, fmt, ...) \ - do { \ - if (cond) \ - RPC_TRACE(mask, rpc, fmt, ## __VA_ARGS__); \ - else \ - RPC_WARN(rpc, fmt, ## __VA_ARGS__); \ +#define RPC_CWARN(cond, mask, rpc, fmt, ...) \ + do { \ + if (cond) \ + RPC_TRACE(mask, rpc, fmt, ##__VA_ARGS__); \ + else \ + RPC_WARN(rpc, fmt, ##__VA_ARGS__); \ } while (0) #ifdef CRT_DEBUG_TRACE diff --git a/src/cart/crt_register.c b/src/cart/crt_register.c index c287f63c6ee..fc0118ef787 100644 --- a/src/cart/crt_register.c +++ b/src/cart/crt_register.c @@ -546,7 +546,7 @@ proto_query_cb(const struct crt_cb_info *cb_info) D_FREE(rpc_req_input->pq_ver.iov_buf); if (cb_info->cci_rc != 0) { - D_WARN("rpc (opc: %#x) failed: "DF_RC"\n", rpc_req->cr_opc, + D_WARN("rpc (opc: %#x) failed: " DF_RC "\n", rpc_req->cr_opc, DP_RC(cb_info->cci_rc)); D_GOTO(out, user_cb_info.pq_rc = cb_info->cci_rc); } diff --git a/src/cart/crt_rpc.c b/src/cart/crt_rpc.c index 781f02d8a11..b9effbeb9ce 100644 --- a/src/cart/crt_rpc.c +++ b/src/cart/crt_rpc.c @@ -887,7 +887,7 @@ uri_lookup_cb(const struct crt_cb_info *cb_info) ul_out = crt_reply_get(lookup_rpc); if (ul_out->ul_rc != 0) { - RPC_WARN(chained_rpc_priv, "URI_LOOKUP returned rc="DF_RC"\n", + RPC_WARN(chained_rpc_priv, "URI_LOOKUP returned rc=" DF_RC "\n", DP_RC(ul_out->ul_rc)); D_GOTO(retry, rc = ul_out->ul_rc); }