Skip to content

Commit 1a69449

Browse files
committed
accelio: Some clang-tidy fixes
Signed-off-by: Yan Burman <yanburman@users.noreply.github.com>
1 parent 41c81f8 commit 1a69449

File tree

15 files changed

+27
-28
lines changed

15 files changed

+27
-28
lines changed

examples/usr/hello_world/xio_server.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ static int on_session_event(struct xio_session *session,
150150
break;
151151
default:
152152
break;
153-
};
153+
}
154154

155155
return 0;
156156
}

src/common/xio_connection.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ char *xio_connection_state_str(enum xio_connection_state state)
175175
}
176176

177177
return NULL;
178-
};
178+
}
179179

180180
/*---------------------------------------------------------------------------*/
181181
/* xio_is_connection_online */
@@ -3120,7 +3120,7 @@ int xio_on_fin_ack_recv(struct xio_connection *connection,
31203120
connection->state = transition->next_state;
31213121

31223122
if (connection->state == XIO_CONNECTION_STATE_TIME_WAIT) {
3123-
int retval = xio_ctx_add_delayed_work(
3123+
retval = xio_ctx_add_delayed_work(
31243124
connection->ctx,
31253125
2, connection,
31263126
xio_close_time_wait,

src/common/xio_error.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ static const char *xio_gen_status_str(enum xio_status ev)
129129
return "Application resources are temporary unavailable";
130130
default:
131131
return "Unknown error";
132-
};
132+
}
133133
}
134134

135135
/*---------------------------------------------------------------------------*/

src/common/xio_nexus.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1653,7 +1653,7 @@ static int xio_nexus_on_new_message(struct xio_nexus *nexus,
16531653
ERROR_LOG("unexpected message type %u\n",
16541654
task->tlv_type);
16551655
break;
1656-
};
1656+
}
16571657

16581658
if (retval != 0) {
16591659
ERROR_LOG("failed to handle message. " \
@@ -1684,7 +1684,7 @@ static int xio_nexus_on_send_completion(struct xio_nexus *nexus,
16841684
default:
16851685
retval = xio_nexus_on_send_msg_comp(nexus, task);
16861686
break;
1687-
};
1687+
}
16881688

16891689
if (retval != 0) {
16901690
ERROR_LOG("failed to handle message. " \
@@ -1843,7 +1843,7 @@ static int xio_nexus_on_transport_event(void *observer, void *sender,
18431843

18441844
tx = 0;
18451845
break;
1846-
};
1846+
}
18471847

18481848
if (tx && !list_empty(&nexus->tx_queue))
18491849
xio_nexus_xmit(nexus);

src/common/xio_session.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1853,7 +1853,7 @@ const char *xio_session_event_str(enum xio_session_event event)
18531853
return "connection reconnecting";
18541854
case XIO_SESSION_CONNECTION_RECONNECTED_EVENT:
18551855
return "connection reconnected";
1856-
};
1856+
}
18571857
return "unknown session event";
18581858
}
18591859
EXPORT_SYMBOL(xio_session_event_str);

src/common/xio_session_client.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1002,7 +1002,6 @@ struct xio_connection *xio_connect(struct xio_connection_params *cparams)
10021002
}
10031003
} else if (session->state == XIO_SESSION_STATE_ONLINE ||
10041004
session->state == XIO_SESSION_STATE_ACCEPTED) {
1005-
struct xio_nexus *nexus;
10061005
char *portal;
10071006

10081007
if (cparams->conn_idx == 0) {

src/usr/transport/rdma/xio_rdma_datapath.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4572,7 +4572,7 @@ static int xio_rdma_on_recv_req(struct xio_rdma_transport *rdma_hndl,
45724572
xio_set_error(XIO_E_MSG_INVALID);
45734573
task->status = XIO_E_MSG_INVALID;
45744574
break;
4575-
};
4575+
}
45764576

45774577
/* must delay the send due to pending rdma read requests
45784578
* if not user will get out of order messages - need fence

src/usr/transport/rdma/xio_rdma_management.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1016,7 +1016,7 @@ static int xio_qp_create(struct xio_rdma_transport *rdma_hndl)
10161016
default:
10171017
ERROR_LOG("rdma_create_qp failed. (errno=%d %m)\n", errno);
10181018
break;
1019-
};
1019+
}
10201020
goto destroy_cq;
10211021
}
10221022
rdma_hndl->tcq = tcq;
@@ -2600,7 +2600,7 @@ static void on_cm_error(struct rdma_cm_event *ev,
26002600
default:
26012601
reason = XIO_E_NOT_SUPPORTED;
26022602
break;
2603-
};
2603+
}
26042604
if (rdma_hndl->state == XIO_TRANSPORT_STATE_CONNECTED) {
26052605
rdma_hndl->state = XIO_TRANSPORT_STATE_DISCONNECTED;
26062606
retval = xio_rdma_disconnect(rdma_hndl, 0);
@@ -2743,7 +2743,7 @@ static void xio_handle_cm_event(struct rdma_cm_event *ev,
27432743
default:
27442744
on_cm_error(ev, rdma_hndl);
27452745
break;
2746-
};
2746+
}
27472747
rdma_hndl->handler_nesting--;
27482748

27492749
/* state can be modified to destroyed (side effect) */

src/usr/transport/rdma/xio_rdma_utils.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ const char *xio_cm_rej_reason_str(int reason)
212212
return "Invalid Alt Flow Label";
213213
default:
214214
return "Unknown error";
215-
};
215+
}
216216
}
217217

218218
void xio_validate_ulimit_memlock(void)

src/usr/transport/rdma/xio_rdma_verbs.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ const char *ibv_wc_opcode_str(enum ibv_wc_opcode opcode)
180180
case IBV_WC_RECV: return "IBV_WC_RECV";
181181
case IBV_WC_RECV_RDMA_WITH_IMM: return "IBV_WC_RECV_RDMA_WITH_IMM";
182182
default: return "IBV_WC_UNKNOWN";
183-
};
183+
}
184184
}
185185

186186
/*---------------------------------------------------------------------------*/
@@ -291,7 +291,7 @@ static struct xio_mr *xio_reg_mr_ex(struct xio_context *ctx,
291291
int retval;
292292
static int init_transport = 1;
293293

294-
/* Show a warning in case the memory is non aligned */
294+
/* Show a warning in case the memory is non-aligned */
295295
/*
296296
if ((access & IBV_XIO_ACCESS_ALLOCATE_MR) == 0 &&
297297
((uintptr_t)(*addr) & (page_size - 1)) != 0) {
@@ -325,7 +325,7 @@ static struct xio_mr *xio_reg_mr_ex(struct xio_context *ctx,
325325
goto cleanup2;
326326
}
327327
INIT_LIST_HEAD(&tmr->dm_list);
328-
/* xio_dereg_mr may be called on error path and it will call
328+
/* xio_dereg_mr may be called on error path, and it will call
329329
* list_del on mr_list_entry, make sure it is initialized
330330
*/
331331
INIT_LIST_HEAD(&tmr->mr_list_entry);
@@ -442,7 +442,7 @@ uint32_t xio_lookup_rkey_by_response(const struct xio_reg_mem *reg_mem,
442442

443443
/*---------------------------------------------------------------------------*/
444444
/* xio_reg_mr_add_dev */
445-
/* add a new discovered device to a the mr list */
445+
/* add a new discovered device to the mr list */
446446
/*---------------------------------------------------------------------------*/
447447
int xio_reg_mr_add_dev(struct xio_device *dev)
448448
{

0 commit comments

Comments
 (0)