From e21ff58d461d18c02e48b3b6595c5920a70d472c Mon Sep 17 00:00:00 2001 From: Gleb Chesnokov Date: Tue, 20 Oct 2026 16:23:12 +0300 Subject: [PATCH] scst: Remove empty statements after control-flow blocks Coccinelle misc/semicolon.cocci reports: iscsi-scst/usr/iscsi_scstd.c:958:2-3: Unneeded semicolon iscsi-scst/usr/iscsid.c:367:4-5: Unneeded semicolon scst/src/scst_event.c:772:2-3: Unneeded semicolon usr/stpgd/stpgd_main.c:269:3-4: Unneeded semicolon Remove the trailing semicolons after the iSCSI netlink-open check, login parameter check, event-size read check and STPG child-cleanup loop. Each semicolon is an empty statement after a completed block, so removing it preserves control flow and requires no analyzer exception. --- iscsi-scst/usr/iscsi_scstd.c | 2 +- iscsi-scst/usr/iscsid.c | 2 +- scst/src/scst_event.c | 2 +- usr/stpgd/stpgd_main.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/iscsi-scst/usr/iscsi_scstd.c b/iscsi-scst/usr/iscsi_scstd.c index 4b1af3141..f9b37f644 100644 --- a/iscsi-scst/usr/iscsi_scstd.c +++ b/iscsi-scst/usr/iscsi_scstd.c @@ -955,7 +955,7 @@ int main(int argc, char **argv) if ((nl_fd = nl_open()) < 0) { perror("netlink open failed"); exit(-1); - }; + } err = kernel_attr_add(NULL, ISCSI_ISNS_SERVER_ATTR_NAME, S_IRUSR|S_IRGRP|S_IROTH|S_IWUSR, 0); diff --git a/iscsi-scst/usr/iscsid.c b/iscsi-scst/usr/iscsid.c index 1c089ab53..d3fb72796 100644 --- a/iscsi-scst/usr/iscsid.c +++ b/iscsi-scst/usr/iscsid.c @@ -364,7 +364,7 @@ static void text_scan_login(struct connection *conn) if (idx == key_max_recv_data_length) { conn->session_params[idx].key_state = KEY_STATE_DONE; idx = key_max_xmit_data_length; - }; + } if (params_str_to_val(session_keys, idx, value, &val) < 0) { if (conn->session_params[idx].key_state == KEY_STATE_START) { diff --git a/scst/src/scst_event.c b/scst/src/scst_event.c index 1aa3fed17..7c1864140 100644 --- a/scst/src/scst_event.c +++ b/scst/src/scst_event.c @@ -769,7 +769,7 @@ static int scst_event_user_next_event(struct scst_event_priv *priv, void __user if (res != 0) { PRINT_ERROR("Failed to get max event size: %d", res); goto out; - }; + } /* Waiting for at least one event, if blocking */ while (list_empty(&priv->queued_events_list)) { diff --git a/usr/stpgd/stpgd_main.c b/usr/stpgd/stpgd_main.c index 21fe03336..1f260245a 100644 --- a/usr/stpgd/stpgd_main.c +++ b/usr/stpgd/stpgd_main.c @@ -266,7 +266,7 @@ static int handle_stpg_received(struct scst_event_user *event_user) rc = wait_until_finished(pids[k], 1, &status, k); if (rc != 0) break; - }; + } } TRACE_EXIT_RES(res);