Skip to content

Commit

Permalink
fix format issue
Browse files Browse the repository at this point in the history
  • Loading branch information
jxiong committed Nov 26, 2024
1 parent cdfa636 commit b965d36
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/cart/crt_context.c
Original file line number Diff line number Diff line change
Expand Up @@ -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: "
Expand Down
6 changes: 2 additions & 4 deletions src/cart/crt_hg.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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",
Expand Down
5 changes: 3 additions & 2 deletions src/cart/crt_hg_proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
12 changes: 6 additions & 6 deletions src/cart/crt_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/cart/crt_register.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion src/cart/crt_rpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit b965d36

Please sign in to comment.