diff --git a/boards/arm/arty/board.c b/boards/arm/arty/board.c index 04a46800483..67efc74ac26 100644 --- a/boards/arm/arty/board.c +++ b/boards/arm/arty/board.c @@ -33,7 +33,7 @@ int board_daplink_qspi_mux_select(enum board_daplink_qspi_mux_mode mode) default: __ASSERT(0, "invalid mode"); return -EINVAL; - }; + } gpio = device_get_binding(DT_GPIO_LABEL(DAPLINK_QSPI_MUX_NODE, mux_gpios)); diff --git a/drivers/clock_control/clock_control_npcx.c b/drivers/clock_control/clock_control_npcx.c index db8e0072b4a..dc9ab75bb2c 100644 --- a/drivers/clock_control/clock_control_npcx.c +++ b/drivers/clock_control/clock_control_npcx.c @@ -95,7 +95,7 @@ static int npcx_clock_control_get_subsys_rate(const struct device *dev, *rate = 0U; /* Invalid parameters */ return -EINVAL; - }; + } return 0; } diff --git a/drivers/gpio/gpio_eos_s3.c b/drivers/gpio/gpio_eos_s3.c index a950fac7937..eabc85b543f 100644 --- a/drivers/gpio/gpio_eos_s3.c +++ b/drivers/gpio/gpio_eos_s3.c @@ -134,7 +134,7 @@ static int gpio_eos_s3_get_irq_num(uint8_t pad) break; default: return -EINVAL; - }; + } return gpio_irq_num; } diff --git a/drivers/gpio/gpio_mcp23s17.c b/drivers/gpio/gpio_mcp23s17.c index cee6c25ed77..255c0201b9f 100644 --- a/drivers/gpio/gpio_mcp23s17.c +++ b/drivers/gpio/gpio_mcp23s17.c @@ -226,7 +226,7 @@ static int mcp23s17_config(const struct device *dev, if ((flags & GPIO_OPEN_DRAIN) != 0U) { ret = -ENOTSUP; goto done; - }; + } ret = setup_pin_dir(dev, pin, flags); if (ret) { diff --git a/drivers/ieee802154/ieee802154_rf2xx.c b/drivers/ieee802154/ieee802154_rf2xx.c index b697a1024dc..eba58fd7fb8 100644 --- a/drivers/ieee802154/ieee802154_rf2xx.c +++ b/drivers/ieee802154/ieee802154_rf2xx.c @@ -266,7 +266,7 @@ static void rf2xx_process_rx_frame(const struct device *dev) while (rf2xx_iface_reg_read(dev, RF2XX_TRX_STATUS_REG) == RF2XX_TRX_PHY_STATUS_BUSY_RX_AACK) { ; - }; + } /* Set PLL_ON to avoid transceiver receive * new data until finish reading process diff --git a/drivers/pinmux/pinmux_cc13xx_cc26xx.c b/drivers/pinmux/pinmux_cc13xx_cc26xx.c index af76009b1d2..41cecfa4707 100644 --- a/drivers/pinmux/pinmux_cc13xx_cc26xx.c +++ b/drivers/pinmux/pinmux_cc13xx_cc26xx.c @@ -52,7 +52,7 @@ static int pinmux_cc13xx_cc26xx_pullup(const struct device *dev, uint32_t pin, case PINMUX_PULLUP_DISABLE: IOCIOPortPullSet(pin, IOC_NO_IOPULL); return 0; - }; + } return -EINVAL; } @@ -71,7 +71,7 @@ static int pinmux_cc13xx_cc26xx_input(const struct device *dev, uint32_t pin, case PINMUX_OUTPUT_ENABLED: IOCIOInputSet(pin, IOC_INPUT_DISABLE); return 0; - }; + } return -EINVAL; } diff --git a/drivers/pm_cpu_ops/pm_cpu_ops_psci.c b/drivers/pm_cpu_ops/pm_cpu_ops_psci.c index 63672c2aeaf..f09927ae77c 100644 --- a/drivers/pm_cpu_ops/pm_cpu_ops_psci.c +++ b/drivers/pm_cpu_ops/pm_cpu_ops_psci.c @@ -34,7 +34,7 @@ static int psci_to_dev_err(int ret) return -EINVAL; case PSCI_RET_DENIED: return -EPERM; - }; + } return -EINVAL; } diff --git a/drivers/pwm/pwm_nrfx.c b/drivers/pwm/pwm_nrfx.c index c5af3300544..7e0a8177ae3 100644 --- a/drivers/pwm/pwm_nrfx.c +++ b/drivers/pwm/pwm_nrfx.c @@ -237,7 +237,7 @@ static int pwm_nrfx_pin_set(const struct device *dev, uint32_t pwm, * sequence. */ while (!nrfx_pwm_is_stopped(&config->pwm)) { - }; + } nrfx_pwm_simple_playback(&config->pwm, &config->seq, 1, diff --git a/drivers/spi/spi_xlnx_axi_quadspi.c b/drivers/spi/spi_xlnx_axi_quadspi.c index 26ab75acc72..64e834c1adf 100644 --- a/drivers/spi/spi_xlnx_axi_quadspi.c +++ b/drivers/spi/spi_xlnx_axi_quadspi.c @@ -271,7 +271,7 @@ static void xlnx_quadspi_start_tx(const struct device *dev) break; default: __ASSERT(0, "unsupported num_xfer_bytes"); - }; + } } else { /* No TX buffer. Use dummy TX data */ dtr = 0U; diff --git a/include/sys/cbprintf_internal.h b/include/sys/cbprintf_internal.h index 56c02c7972f..4c32e61d3e2 100644 --- a/include/sys/cbprintf_internal.h +++ b/include/sys/cbprintf_internal.h @@ -204,7 +204,7 @@ static inline void cbprintf_wcpy(int *dst, int *src, uint32_t len) "Packaging of long double not enabled in Kconfig."); \ while (_idx % Z_CBPRINTF_ALIGNMENT(_arg)) { \ _idx += sizeof(int); \ - }; \ + } \ uint32_t _arg_size = Z_CBPRINTF_ARG_SIZE(_arg); \ if (_buf && _idx < _max) { \ Z_CBPRINTF_STORE_ARG(&_buf[_idx], _arg); \ diff --git a/lib/libc/minimal/source/string/string.c b/lib/libc/minimal/source/string/string.c index 9344f824ca8..20996e478b3 100644 --- a/lib/libc/minimal/source/string/string.c +++ b/lib/libc/minimal/source/string/string.c @@ -313,7 +313,7 @@ void *memcpy(void *_MLIBC_RESTRICT d, const void *_MLIBC_RESTRICT s, size_t n) } *(d_byte++) = *(s_byte++); n--; - }; + } /* do word-sized copying as long as possible */ @@ -359,7 +359,7 @@ void *memset(void *buf, int c, size_t n) } *(d_byte++) = c_byte; n--; - }; + } /* do word-sized initialization as long as possible */ diff --git a/samples/boards/bbc_microbit/pong/src/main.c b/samples/boards/bbc_microbit/pong/src/main.c index 87af1534736..2a4af34ddac 100644 --- a/samples/boards/bbc_microbit/pong/src/main.c +++ b/samples/boards/bbc_microbit/pong/src/main.c @@ -214,7 +214,7 @@ static void mode_selected(int val) default: printk("Unknown state %d\n", state); return; - }; + } } static const struct pong_selection mode_selection = { diff --git a/samples/boards/up_squared/gpio_counter/src/main.c b/samples/boards/up_squared/gpio_counter/src/main.c index 1534589987c..433138155f3 100644 --- a/samples/boards/up_squared/gpio_counter/src/main.c +++ b/samples/boards/up_squared/gpio_counter/src/main.c @@ -169,5 +169,5 @@ void main(void) k_sem_take(&counter_sem, K_FOREVER); val = counter & MASK; - }; + } } diff --git a/samples/net/cloud/tagoio_http_post/src/wifi.c b/samples/net/cloud/tagoio_http_post/src/wifi.c index c39b3f04e7b..6ee8dbfca13 100644 --- a/samples/net/cloud/tagoio_http_post/src/wifi.c +++ b/samples/net/cloud/tagoio_http_post/src/wifi.c @@ -69,5 +69,5 @@ void wifi_connect(void) while (connected == 0) { k_msleep(100); - }; + } } diff --git a/samples/net/sockets/websocket_client/src/main.c b/samples/net/sockets/websocket_client/src/main.c index d59d2eac0f3..c5153b00219 100644 --- a/samples/net/sockets/websocket_client/src/main.c +++ b/samples/net/sockets/websocket_client/src/main.c @@ -214,7 +214,7 @@ static void recv_data_wso_api(int sock, size_t amount, uint8_t *buf, read_pos += ret; total_read += ret; - }; + } if (remaining != 0 || total_read != amount || /* Do not check the final \n at the end of the msg */ diff --git a/samples/net/wpan_serial/src/main.c b/samples/net/wpan_serial/src/main.c index 769a3ed8f88..b90d5720b6a 100644 --- a/samples/net/wpan_serial/src/main.c +++ b/samples/net/wpan_serial/src/main.c @@ -578,7 +578,7 @@ void main(void) if (!init_ieee802154()) { LOG_ERR("Unable to initialize ieee802154"); return; - }; + } uart_irq_callback_set(dev, interrupt_handler); diff --git a/samples/sensor/hts221/src/main.c b/samples/sensor/hts221/src/main.c index b6f625f906e..142e2c0d191 100644 --- a/samples/sensor/hts221/src/main.c +++ b/samples/sensor/hts221/src/main.c @@ -63,7 +63,7 @@ void main(void) if (sensor_trigger_set(dev, &trig, hts221_handler) < 0) { printf("Cannot configure trigger\n"); return; - }; + } } while (!IS_ENABLED(CONFIG_HTS221_TRIGGER)) { diff --git a/samples/sensor/lps22hh/src/main.c b/samples/sensor/lps22hh/src/main.c index 5c29b287798..a1fa819c03c 100644 --- a/samples/sensor/lps22hh/src/main.c +++ b/samples/sensor/lps22hh/src/main.c @@ -74,7 +74,7 @@ void main(void) if (sensor_trigger_set(dev, &trig, lps22hh_handler) < 0) { printf("Cannot configure trigger\n"); return; - }; + } printk("Configured for triggered collection at %u Hz\n", attr.val1); } diff --git a/samples/sensor/mpu6050/src/main.c b/samples/sensor/mpu6050/src/main.c index 19ba4af02b3..a3a481e381d 100644 --- a/samples/sensor/mpu6050/src/main.c +++ b/samples/sensor/mpu6050/src/main.c @@ -103,7 +103,7 @@ void main(void) handle_mpu6050_drdy) < 0) { printf("Cannot configure trigger\n"); return; - }; + } printk("Configured for triggered sampling.\n"); #endif diff --git a/soc/arm/atmel_sam/sam4l/soc.c b/soc/arm/atmel_sam/sam4l/soc.c index e7502a06075..b06d7e0e41e 100644 --- a/soc/arm/atmel_sam/sam4l/soc.c +++ b/soc/arm/atmel_sam/sam4l/soc.c @@ -49,7 +49,7 @@ static ALWAYS_INLINE void wdt_set_ctrl(uint32_t ctrl) dly >>= 3; /* ~8 cycles for one while loop */ while (dly--) { ; - }; + } WDT->CTRL = ctrl | WDT_CTRL_KEY(WDT_FIRST_KEY); WDT->CTRL = ctrl | WDT_CTRL_KEY(WDT_SECOND_KEY); } @@ -201,7 +201,7 @@ static ALWAYS_INLINE void clock_init(void) while (HCACHE->SR & HCACHE_SR_CSTS_EN) { ; - }; + } /* Enable PLL */ if (!pll_is_locked(0)) { @@ -216,7 +216,7 @@ static ALWAYS_INLINE void clock_init(void) while (!osc_is_ready(OSC_ID_OSC0)) { ; - }; + } uint32_t pll_config = pll_config_init(PLL0_DIV, PLL0_MUL); @@ -227,7 +227,7 @@ static ALWAYS_INLINE void clock_init(void) while (!pll_is_locked(0)) { ; - }; + } } /** Set a flash wait state depending on the new cpu frequency. @@ -284,7 +284,7 @@ static int atmel_sam4l_init(const struct device *arg) wdt_set_ctrl(WDT->CTRL & ~WDT_CTRL_EN); while (WDT->CTRL & WDT_CTRL_EN) { ; - }; + } #endif /* Setup system clocks. */ diff --git a/soc/arm/microchip_mec/mec1501/device_power.c b/soc/arm/microchip_mec/mec1501/device_power.c index f702b7588da..f8ddd687574 100644 --- a/soc/arm/microchip_mec/mec1501/device_power.c +++ b/soc/arm/microchip_mec/mec1501/device_power.c @@ -145,19 +145,19 @@ static void deep_sleep_save_uarts(void) uart_activate[0] = UART0_REGS->ACTV; if (uart_activate[0]) { while ((UART0_REGS->LSR & MCHP_UART_LSR_TEMT) == 0) { - }; + } } UART0_REGS->ACTV = 0; uart_activate[1] = UART1_REGS->ACTV; if (uart_activate[1]) { while ((UART1_REGS->LSR & MCHP_UART_LSR_TEMT) == 0) { - }; + } } UART1_REGS->ACTV = 0; uart_activate[2] = UART2_REGS->ACTV; if (uart_activate[2]) { while ((UART2_REGS->LSR & MCHP_UART_LSR_TEMT) == 0) { - }; + } } UART2_REGS->ACTV = 0; } diff --git a/soc/arm/microchip_mec/mec1501/power.c b/soc/arm/microchip_mec/mec1501/power.c index 4b70c854412..a32278a8ee1 100644 --- a/soc/arm/microchip_mec/mec1501/power.c +++ b/soc/arm/microchip_mec/mec1501/power.c @@ -64,7 +64,7 @@ static void z_power_soc_deep_sleep(void) /* Wait for PLL to lock */ while ((PCR_REGS->OSC_ID & MCHP_PCR_OSC_ID_PLL_LOCK) == 0) { - }; + } soc_deep_sleep_periph_restore(); diff --git a/soc/xtensa/intel_s1000/soc_mp.c b/soc/xtensa/intel_s1000/soc_mp.c index 876e5a28021..94449049f46 100644 --- a/soc/xtensa/intel_s1000/soc_mp.c +++ b/soc/xtensa/intel_s1000/soc_mp.c @@ -170,7 +170,7 @@ void arch_start_cpu(int cpu_num, k_thread_stack_t *stack, int sz, /* Wait for core power down */ while ((soc_glb_regs->cavs_dsp1power_control & SOC_S1000_GLB_CTRL_DSP1_PWRCTL_CPA) != 0) { - }; + } /* Now power up the core */ soc_glb_regs->cavs_dsp1power_control |= @@ -179,7 +179,7 @@ void arch_start_cpu(int cpu_num, k_thread_stack_t *stack, int sz, /* Wait for core power up*/ while ((soc_glb_regs->cavs_dsp1power_control & SOC_S1000_GLB_CTRL_DSP1_PWRCTL_CPA) == 0) { - }; + } /* Then step out of reset, and un-stall */ soc_glb_regs->cavs_dsp1power_control &= diff --git a/subsys/bluetooth/controller/ll_sw/ull_conn.c b/subsys/bluetooth/controller/ll_sw/ull_conn.c index 85a0b573ba5..ab1357d9b47 100644 --- a/subsys/bluetooth/controller/ll_sw/ull_conn.c +++ b/subsys/bluetooth/controller/ll_sw/ull_conn.c @@ -3066,7 +3066,7 @@ static inline void event_vex_prep(struct ll_conn *conn) rx = ll_pdu_rx_alloc(); if (!rx) { return; - }; + } /* procedure request acked */ conn->llcp_version.ack = conn->llcp_version.req; diff --git a/subsys/bluetooth/host/br.c b/subsys/bluetooth/host/br.c index 18c83413626..f67a7eaf6cc 100644 --- a/subsys/bluetooth/host/br.c +++ b/subsys/bluetooth/host/br.c @@ -337,7 +337,7 @@ static bool eir_has_name(const uint8_t *eir) while (len) { if (len < 2) { break; - }; + } /* Look for early termination */ if (!eir[0]) { @@ -561,7 +561,7 @@ void bt_hci_remote_name_request_complete(struct net_buf *buf) while (eir_len) { if (eir_len < 2) { break; - }; + } /* Look for early termination */ if (!eir[0]) { diff --git a/subsys/bluetooth/host/l2cap_br.c b/subsys/bluetooth/host/l2cap_br.c index 04ff727054d..87d1e24db93 100644 --- a/subsys/bluetooth/host/l2cap_br.c +++ b/subsys/bluetooth/host/l2cap_br.c @@ -605,7 +605,7 @@ l2cap_br_conn_security(struct bt_l2cap_chan *chan, const uint16_t psm) */ if (check == 0) { return L2CAP_CONN_SECURITY_PENDING; - }; + } /* * For any other values in 'check' it means there was internal diff --git a/subsys/bluetooth/host/smp.c b/subsys/bluetooth/host/smp.c index a59a158e832..b0c226b99a5 100644 --- a/subsys/bluetooth/host/smp.c +++ b/subsys/bluetooth/host/smp.c @@ -4714,13 +4714,13 @@ int bt_smp_sign_verify(struct bt_conn *conn, struct net_buf *buf) BT_ERR("Unable to create signature for %s", bt_addr_le_str(&conn->le.dst)); return -EIO; - }; + } if (memcmp(sig, net_buf_tail(buf) - sizeof(sig), sizeof(sig))) { BT_ERR("Unable to verify signature for %s", bt_addr_le_str(&conn->le.dst)); return -EBADMSG; - }; + } keys->remote_csrk.cnt++; diff --git a/subsys/bluetooth/shell/bredr.c b/subsys/bluetooth/shell/bredr.c index da6369bdf4d..b6681bfba00 100644 --- a/subsys/bluetooth/shell/bredr.c +++ b/subsys/bluetooth/shell/bredr.c @@ -114,7 +114,7 @@ static void br_device_found(const bt_addr_t *addr, int8_t rssi, while (len) { if (len < 2) { break; - }; + } /* Look for early termination */ if (!eir[0]) { diff --git a/subsys/canbus/canopen/canopen_program.c b/subsys/canbus/canopen/canopen_program.c index e3b06bd4ea1..0bb35bcb90f 100644 --- a/subsys/canbus/canopen/canopen_program.c +++ b/subsys/canbus/canopen/canopen_program.c @@ -243,7 +243,7 @@ static CO_SDO_abortCode_t canopen_odf_1f51(CO_ODF_arg_t *odf_arg) if (CO_NMT_getInternalState(ctx.nmt) != CO_NMT_PRE_OPERATIONAL) { LOG_DBG("not in pre-operational state"); return CO_SDO_AB_DATA_DEV_STATE; - }; + } /* Preserve old value */ cmd = odf_arg->data[0]; diff --git a/subsys/debug/thread_analyzer.c b/subsys/debug/thread_analyzer.c index 280ef73c7d8..f357e852a2b 100644 --- a/subsys/debug/thread_analyzer.c +++ b/subsys/debug/thread_analyzer.c @@ -99,7 +99,7 @@ static void thread_analyze_cb(const struct k_thread *cthread, void *user_data) if (k_thread_runtime_stats_get(thread, &rt_stats_thread) != 0) { ret++; - }; + } if (k_thread_runtime_stats_all_get(&rt_stats_all) != 0) { ret++; diff --git a/subsys/logging/log_output.c b/subsys/logging/log_output.c index 5ce94969428..7d8814d3d31 100644 --- a/subsys/logging/log_output.c +++ b/subsys/logging/log_output.c @@ -629,7 +629,7 @@ void log_output_hexdump(const struct log_output *output, data += part_len; length -= part_len; - }; + } postfix_print(output, flags, level); log_output_flush(output); diff --git a/subsys/net/lib/http/http_client.c b/subsys/net/lib/http/http_client.c index 54bcf08a385..76f7654eecb 100644 --- a/subsys/net/lib/http/http_client.c +++ b/subsys/net/lib/http/http_client.c @@ -98,7 +98,7 @@ static int http_send_data(int sock, char *send_buf, } while (remaining_len > 0); data = va_arg(va, const char *); - }; + } va_end(va); diff --git a/subsys/shell/modules/kernel_service.c b/subsys/shell/modules/kernel_service.c index 8044e22fc31..8b00556edf5 100644 --- a/subsys/shell/modules/kernel_service.c +++ b/subsys/shell/modules/kernel_service.c @@ -86,7 +86,7 @@ static void shell_tdata_dump(const struct k_thread *cthread, void *user_data) if (k_thread_runtime_stats_get(thread, &rt_stats_thread) != 0) { ret++; - }; + } if (k_thread_runtime_stats_all_get(&rt_stats_all) != 0) { ret++; diff --git a/subsys/shell/shell_help.c b/subsys/shell/shell_help.c index 130676273eb..b6c0007a3cc 100644 --- a/subsys/shell/shell_help.c +++ b/subsys/shell/shell_help.c @@ -156,7 +156,7 @@ void z_shell_help_subcmd_print(const struct shell *shell, /* Searching for the longest subcommand to print. */ while ((entry = z_shell_cmd_get(parent, idx++, &dloc)) != NULL) { longest = Z_MAX(longest, z_shell_strlen(entry->syntax)); - }; + } /* No help to print */ if (longest == 0) { diff --git a/subsys/shell/shell_utils.c b/subsys/shell/shell_utils.c index 21acedd1c93..16490575835 100644 --- a/subsys/shell/shell_utils.c +++ b/subsys/shell/shell_utils.c @@ -296,7 +296,7 @@ const struct shell_static_entry *z_shell_find_cmd( if (strcmp(cmd_str, entry->syntax) == 0) { return entry; } - }; + } return NULL; } diff --git a/subsys/shell/shell_wildcard.c b/subsys/shell/shell_wildcard.c index 47f422b15c6..eed9eed100a 100644 --- a/subsys/shell/shell_wildcard.c +++ b/subsys/shell/shell_wildcard.c @@ -93,7 +93,7 @@ static enum shell_wildcard_status commands_expand(const struct shell *shell, } cnt++; } - }; + } if (cnt > 0) { z_shell_pattern_remove(shell->ctx->temp_buff, diff --git a/tests/drivers/i2c/i2c_slave_api/common/i2c_virtual.c b/tests/drivers/i2c/i2c_slave_api/common/i2c_virtual.c index b8a9bdf2a52..0cc2815b298 100644 --- a/tests/drivers/i2c/i2c_slave_api/common/i2c_virtual.c +++ b/tests/drivers/i2c/i2c_slave_api/common/i2c_virtual.c @@ -201,7 +201,7 @@ static int i2c_virtual_transfer(const struct device *dev, struct i2c_msg *msg, current++; num_msgs--; - }; + } return ret; } diff --git a/tests/drivers/watchdog/wdt_basic_api/src/test_wdt.c b/tests/drivers/watchdog/wdt_basic_api/src/test_wdt.c index 3851b225d54..8b236a25d25 100644 --- a/tests/drivers/watchdog/wdt_basic_api/src/test_wdt.c +++ b/tests/drivers/watchdog/wdt_basic_api/src/test_wdt.c @@ -209,7 +209,7 @@ static int test_wdt_no_callback(void) m_state = WDT_TEST_STATE_CHECK_RESET; while (1) { k_yield(); - }; + } } #if TEST_WDT_CALLBACK_1 @@ -263,7 +263,7 @@ static int test_wdt_callback_1(void) m_state = WDT_TEST_STATE_CHECK_RESET; while (1) { k_yield(); - }; + } } #endif @@ -325,7 +325,7 @@ static int test_wdt_callback_2(void) while (1) { wdt_feed(wdt, 0); k_sleep(K_MSEC(100)); - }; + } } #endif diff --git a/tests/kernel/smp/src/main.c b/tests/kernel/smp/src/main.c index 8d653e5d29b..2404e71b0d0 100644 --- a/tests/kernel/smp/src/main.c +++ b/tests/kernel/smp/src/main.c @@ -476,7 +476,7 @@ static void thread_get_cpu_entry(void *p1, void *p2, void *p3) /* loop forever to ensure running on this CPU */ while (1) { k_busy_wait(DELAY_US); - }; + } } /**