coccinelle: Remove extra semicolon

coccicheck --mode=patch --cocci=semicolon.cocci

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit is contained in:
Flavio Ceolin 2021-03-24 16:39:15 -07:00 committed by Kumar Gala
commit 9fd4ea91b7
39 changed files with 52 additions and 52 deletions

View file

@ -33,7 +33,7 @@ int board_daplink_qspi_mux_select(enum board_daplink_qspi_mux_mode mode)
default: default:
__ASSERT(0, "invalid mode"); __ASSERT(0, "invalid mode");
return -EINVAL; return -EINVAL;
}; }
gpio = device_get_binding(DT_GPIO_LABEL(DAPLINK_QSPI_MUX_NODE, gpio = device_get_binding(DT_GPIO_LABEL(DAPLINK_QSPI_MUX_NODE,
mux_gpios)); mux_gpios));

View file

@ -95,7 +95,7 @@ static int npcx_clock_control_get_subsys_rate(const struct device *dev,
*rate = 0U; *rate = 0U;
/* Invalid parameters */ /* Invalid parameters */
return -EINVAL; return -EINVAL;
}; }
return 0; return 0;
} }

View file

@ -134,7 +134,7 @@ static int gpio_eos_s3_get_irq_num(uint8_t pad)
break; break;
default: default:
return -EINVAL; return -EINVAL;
}; }
return gpio_irq_num; return gpio_irq_num;
} }

View file

@ -226,7 +226,7 @@ static int mcp23s17_config(const struct device *dev,
if ((flags & GPIO_OPEN_DRAIN) != 0U) { if ((flags & GPIO_OPEN_DRAIN) != 0U) {
ret = -ENOTSUP; ret = -ENOTSUP;
goto done; goto done;
}; }
ret = setup_pin_dir(dev, pin, flags); ret = setup_pin_dir(dev, pin, flags);
if (ret) { if (ret) {

View file

@ -266,7 +266,7 @@ static void rf2xx_process_rx_frame(const struct device *dev)
while (rf2xx_iface_reg_read(dev, RF2XX_TRX_STATUS_REG) == while (rf2xx_iface_reg_read(dev, RF2XX_TRX_STATUS_REG) ==
RF2XX_TRX_PHY_STATUS_BUSY_RX_AACK) { RF2XX_TRX_PHY_STATUS_BUSY_RX_AACK) {
; ;
}; }
/* Set PLL_ON to avoid transceiver receive /* Set PLL_ON to avoid transceiver receive
* new data until finish reading process * new data until finish reading process

View file

@ -52,7 +52,7 @@ static int pinmux_cc13xx_cc26xx_pullup(const struct device *dev, uint32_t pin,
case PINMUX_PULLUP_DISABLE: case PINMUX_PULLUP_DISABLE:
IOCIOPortPullSet(pin, IOC_NO_IOPULL); IOCIOPortPullSet(pin, IOC_NO_IOPULL);
return 0; return 0;
}; }
return -EINVAL; return -EINVAL;
} }
@ -71,7 +71,7 @@ static int pinmux_cc13xx_cc26xx_input(const struct device *dev, uint32_t pin,
case PINMUX_OUTPUT_ENABLED: case PINMUX_OUTPUT_ENABLED:
IOCIOInputSet(pin, IOC_INPUT_DISABLE); IOCIOInputSet(pin, IOC_INPUT_DISABLE);
return 0; return 0;
}; }
return -EINVAL; return -EINVAL;
} }

View file

@ -34,7 +34,7 @@ static int psci_to_dev_err(int ret)
return -EINVAL; return -EINVAL;
case PSCI_RET_DENIED: case PSCI_RET_DENIED:
return -EPERM; return -EPERM;
}; }
return -EINVAL; return -EINVAL;
} }

View file

@ -237,7 +237,7 @@ static int pwm_nrfx_pin_set(const struct device *dev, uint32_t pwm,
* sequence. * sequence.
*/ */
while (!nrfx_pwm_is_stopped(&config->pwm)) { while (!nrfx_pwm_is_stopped(&config->pwm)) {
}; }
nrfx_pwm_simple_playback(&config->pwm, nrfx_pwm_simple_playback(&config->pwm,
&config->seq, &config->seq,
1, 1,

View file

@ -271,7 +271,7 @@ static void xlnx_quadspi_start_tx(const struct device *dev)
break; break;
default: default:
__ASSERT(0, "unsupported num_xfer_bytes"); __ASSERT(0, "unsupported num_xfer_bytes");
}; }
} else { } else {
/* No TX buffer. Use dummy TX data */ /* No TX buffer. Use dummy TX data */
dtr = 0U; dtr = 0U;

View file

@ -204,7 +204,7 @@ static inline void cbprintf_wcpy(int *dst, int *src, uint32_t len)
"Packaging of long double not enabled in Kconfig."); \ "Packaging of long double not enabled in Kconfig."); \
while (_idx % Z_CBPRINTF_ALIGNMENT(_arg)) { \ while (_idx % Z_CBPRINTF_ALIGNMENT(_arg)) { \
_idx += sizeof(int); \ _idx += sizeof(int); \
}; \ } \
uint32_t _arg_size = Z_CBPRINTF_ARG_SIZE(_arg); \ uint32_t _arg_size = Z_CBPRINTF_ARG_SIZE(_arg); \
if (_buf && _idx < _max) { \ if (_buf && _idx < _max) { \
Z_CBPRINTF_STORE_ARG(&_buf[_idx], _arg); \ Z_CBPRINTF_STORE_ARG(&_buf[_idx], _arg); \

View file

@ -313,7 +313,7 @@ void *memcpy(void *_MLIBC_RESTRICT d, const void *_MLIBC_RESTRICT s, size_t n)
} }
*(d_byte++) = *(s_byte++); *(d_byte++) = *(s_byte++);
n--; n--;
}; }
/* do word-sized copying as long as possible */ /* 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; *(d_byte++) = c_byte;
n--; n--;
}; }
/* do word-sized initialization as long as possible */ /* do word-sized initialization as long as possible */

View file

@ -214,7 +214,7 @@ static void mode_selected(int val)
default: default:
printk("Unknown state %d\n", state); printk("Unknown state %d\n", state);
return; return;
}; }
} }
static const struct pong_selection mode_selection = { static const struct pong_selection mode_selection = {

View file

@ -169,5 +169,5 @@ void main(void)
k_sem_take(&counter_sem, K_FOREVER); k_sem_take(&counter_sem, K_FOREVER);
val = counter & MASK; val = counter & MASK;
}; }
} }

View file

@ -69,5 +69,5 @@ void wifi_connect(void)
while (connected == 0) { while (connected == 0) {
k_msleep(100); k_msleep(100);
}; }
} }

View file

@ -214,7 +214,7 @@ static void recv_data_wso_api(int sock, size_t amount, uint8_t *buf,
read_pos += ret; read_pos += ret;
total_read += ret; total_read += ret;
}; }
if (remaining != 0 || total_read != amount || if (remaining != 0 || total_read != amount ||
/* Do not check the final \n at the end of the msg */ /* Do not check the final \n at the end of the msg */

View file

@ -578,7 +578,7 @@ void main(void)
if (!init_ieee802154()) { if (!init_ieee802154()) {
LOG_ERR("Unable to initialize ieee802154"); LOG_ERR("Unable to initialize ieee802154");
return; return;
}; }
uart_irq_callback_set(dev, interrupt_handler); uart_irq_callback_set(dev, interrupt_handler);

View file

@ -63,7 +63,7 @@ void main(void)
if (sensor_trigger_set(dev, &trig, hts221_handler) < 0) { if (sensor_trigger_set(dev, &trig, hts221_handler) < 0) {
printf("Cannot configure trigger\n"); printf("Cannot configure trigger\n");
return; return;
}; }
} }
while (!IS_ENABLED(CONFIG_HTS221_TRIGGER)) { while (!IS_ENABLED(CONFIG_HTS221_TRIGGER)) {

View file

@ -74,7 +74,7 @@ void main(void)
if (sensor_trigger_set(dev, &trig, lps22hh_handler) < 0) { if (sensor_trigger_set(dev, &trig, lps22hh_handler) < 0) {
printf("Cannot configure trigger\n"); printf("Cannot configure trigger\n");
return; return;
}; }
printk("Configured for triggered collection at %u Hz\n", printk("Configured for triggered collection at %u Hz\n",
attr.val1); attr.val1);
} }

View file

@ -103,7 +103,7 @@ void main(void)
handle_mpu6050_drdy) < 0) { handle_mpu6050_drdy) < 0) {
printf("Cannot configure trigger\n"); printf("Cannot configure trigger\n");
return; return;
}; }
printk("Configured for triggered sampling.\n"); printk("Configured for triggered sampling.\n");
#endif #endif

View file

@ -49,7 +49,7 @@ static ALWAYS_INLINE void wdt_set_ctrl(uint32_t ctrl)
dly >>= 3; /* ~8 cycles for one while loop */ dly >>= 3; /* ~8 cycles for one while loop */
while (dly--) { while (dly--) {
; ;
}; }
WDT->CTRL = ctrl | WDT_CTRL_KEY(WDT_FIRST_KEY); WDT->CTRL = ctrl | WDT_CTRL_KEY(WDT_FIRST_KEY);
WDT->CTRL = ctrl | WDT_CTRL_KEY(WDT_SECOND_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) { while (HCACHE->SR & HCACHE_SR_CSTS_EN) {
; ;
}; }
/* Enable PLL */ /* Enable PLL */
if (!pll_is_locked(0)) { if (!pll_is_locked(0)) {
@ -216,7 +216,7 @@ static ALWAYS_INLINE void clock_init(void)
while (!osc_is_ready(OSC_ID_OSC0)) { while (!osc_is_ready(OSC_ID_OSC0)) {
; ;
}; }
uint32_t pll_config = pll_config_init(PLL0_DIV, uint32_t pll_config = pll_config_init(PLL0_DIV,
PLL0_MUL); PLL0_MUL);
@ -227,7 +227,7 @@ static ALWAYS_INLINE void clock_init(void)
while (!pll_is_locked(0)) { while (!pll_is_locked(0)) {
; ;
}; }
} }
/** Set a flash wait state depending on the new cpu frequency. /** 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); wdt_set_ctrl(WDT->CTRL & ~WDT_CTRL_EN);
while (WDT->CTRL & WDT_CTRL_EN) { while (WDT->CTRL & WDT_CTRL_EN) {
; ;
}; }
#endif #endif
/* Setup system clocks. */ /* Setup system clocks. */

View file

@ -145,19 +145,19 @@ static void deep_sleep_save_uarts(void)
uart_activate[0] = UART0_REGS->ACTV; uart_activate[0] = UART0_REGS->ACTV;
if (uart_activate[0]) { if (uart_activate[0]) {
while ((UART0_REGS->LSR & MCHP_UART_LSR_TEMT) == 0) { while ((UART0_REGS->LSR & MCHP_UART_LSR_TEMT) == 0) {
}; }
} }
UART0_REGS->ACTV = 0; UART0_REGS->ACTV = 0;
uart_activate[1] = UART1_REGS->ACTV; uart_activate[1] = UART1_REGS->ACTV;
if (uart_activate[1]) { if (uart_activate[1]) {
while ((UART1_REGS->LSR & MCHP_UART_LSR_TEMT) == 0) { while ((UART1_REGS->LSR & MCHP_UART_LSR_TEMT) == 0) {
}; }
} }
UART1_REGS->ACTV = 0; UART1_REGS->ACTV = 0;
uart_activate[2] = UART2_REGS->ACTV; uart_activate[2] = UART2_REGS->ACTV;
if (uart_activate[2]) { if (uart_activate[2]) {
while ((UART2_REGS->LSR & MCHP_UART_LSR_TEMT) == 0) { while ((UART2_REGS->LSR & MCHP_UART_LSR_TEMT) == 0) {
}; }
} }
UART2_REGS->ACTV = 0; UART2_REGS->ACTV = 0;
} }

View file

@ -64,7 +64,7 @@ static void z_power_soc_deep_sleep(void)
/* Wait for PLL to lock */ /* Wait for PLL to lock */
while ((PCR_REGS->OSC_ID & MCHP_PCR_OSC_ID_PLL_LOCK) == 0) { while ((PCR_REGS->OSC_ID & MCHP_PCR_OSC_ID_PLL_LOCK) == 0) {
}; }
soc_deep_sleep_periph_restore(); soc_deep_sleep_periph_restore();

View file

@ -170,7 +170,7 @@ void arch_start_cpu(int cpu_num, k_thread_stack_t *stack, int sz,
/* Wait for core power down */ /* Wait for core power down */
while ((soc_glb_regs->cavs_dsp1power_control & while ((soc_glb_regs->cavs_dsp1power_control &
SOC_S1000_GLB_CTRL_DSP1_PWRCTL_CPA) != 0) { SOC_S1000_GLB_CTRL_DSP1_PWRCTL_CPA) != 0) {
}; }
/* Now power up the core */ /* Now power up the core */
soc_glb_regs->cavs_dsp1power_control |= 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*/ /* Wait for core power up*/
while ((soc_glb_regs->cavs_dsp1power_control & while ((soc_glb_regs->cavs_dsp1power_control &
SOC_S1000_GLB_CTRL_DSP1_PWRCTL_CPA) == 0) { SOC_S1000_GLB_CTRL_DSP1_PWRCTL_CPA) == 0) {
}; }
/* Then step out of reset, and un-stall */ /* Then step out of reset, and un-stall */
soc_glb_regs->cavs_dsp1power_control &= soc_glb_regs->cavs_dsp1power_control &=

View file

@ -3066,7 +3066,7 @@ static inline void event_vex_prep(struct ll_conn *conn)
rx = ll_pdu_rx_alloc(); rx = ll_pdu_rx_alloc();
if (!rx) { if (!rx) {
return; return;
}; }
/* procedure request acked */ /* procedure request acked */
conn->llcp_version.ack = conn->llcp_version.req; conn->llcp_version.ack = conn->llcp_version.req;

View file

@ -337,7 +337,7 @@ static bool eir_has_name(const uint8_t *eir)
while (len) { while (len) {
if (len < 2) { if (len < 2) {
break; break;
}; }
/* Look for early termination */ /* Look for early termination */
if (!eir[0]) { if (!eir[0]) {
@ -561,7 +561,7 @@ void bt_hci_remote_name_request_complete(struct net_buf *buf)
while (eir_len) { while (eir_len) {
if (eir_len < 2) { if (eir_len < 2) {
break; break;
}; }
/* Look for early termination */ /* Look for early termination */
if (!eir[0]) { if (!eir[0]) {

View file

@ -605,7 +605,7 @@ l2cap_br_conn_security(struct bt_l2cap_chan *chan, const uint16_t psm)
*/ */
if (check == 0) { if (check == 0) {
return L2CAP_CONN_SECURITY_PENDING; return L2CAP_CONN_SECURITY_PENDING;
}; }
/* /*
* For any other values in 'check' it means there was internal * For any other values in 'check' it means there was internal

View file

@ -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_ERR("Unable to create signature for %s",
bt_addr_le_str(&conn->le.dst)); bt_addr_le_str(&conn->le.dst));
return -EIO; return -EIO;
}; }
if (memcmp(sig, net_buf_tail(buf) - sizeof(sig), sizeof(sig))) { if (memcmp(sig, net_buf_tail(buf) - sizeof(sig), sizeof(sig))) {
BT_ERR("Unable to verify signature for %s", BT_ERR("Unable to verify signature for %s",
bt_addr_le_str(&conn->le.dst)); bt_addr_le_str(&conn->le.dst));
return -EBADMSG; return -EBADMSG;
}; }
keys->remote_csrk.cnt++; keys->remote_csrk.cnt++;

View file

@ -114,7 +114,7 @@ static void br_device_found(const bt_addr_t *addr, int8_t rssi,
while (len) { while (len) {
if (len < 2) { if (len < 2) {
break; break;
}; }
/* Look for early termination */ /* Look for early termination */
if (!eir[0]) { if (!eir[0]) {

View file

@ -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) { if (CO_NMT_getInternalState(ctx.nmt) != CO_NMT_PRE_OPERATIONAL) {
LOG_DBG("not in pre-operational state"); LOG_DBG("not in pre-operational state");
return CO_SDO_AB_DATA_DEV_STATE; return CO_SDO_AB_DATA_DEV_STATE;
}; }
/* Preserve old value */ /* Preserve old value */
cmd = odf_arg->data[0]; cmd = odf_arg->data[0];

View file

@ -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) { if (k_thread_runtime_stats_get(thread, &rt_stats_thread) != 0) {
ret++; ret++;
}; }
if (k_thread_runtime_stats_all_get(&rt_stats_all) != 0) { if (k_thread_runtime_stats_all_get(&rt_stats_all) != 0) {
ret++; ret++;

View file

@ -629,7 +629,7 @@ void log_output_hexdump(const struct log_output *output,
data += part_len; data += part_len;
length -= part_len; length -= part_len;
}; }
postfix_print(output, flags, level); postfix_print(output, flags, level);
log_output_flush(output); log_output_flush(output);

View file

@ -98,7 +98,7 @@ static int http_send_data(int sock, char *send_buf,
} while (remaining_len > 0); } while (remaining_len > 0);
data = va_arg(va, const char *); data = va_arg(va, const char *);
}; }
va_end(va); va_end(va);

View file

@ -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) { if (k_thread_runtime_stats_get(thread, &rt_stats_thread) != 0) {
ret++; ret++;
}; }
if (k_thread_runtime_stats_all_get(&rt_stats_all) != 0) { if (k_thread_runtime_stats_all_get(&rt_stats_all) != 0) {
ret++; ret++;

View file

@ -156,7 +156,7 @@ void z_shell_help_subcmd_print(const struct shell *shell,
/* Searching for the longest subcommand to print. */ /* Searching for the longest subcommand to print. */
while ((entry = z_shell_cmd_get(parent, idx++, &dloc)) != NULL) { while ((entry = z_shell_cmd_get(parent, idx++, &dloc)) != NULL) {
longest = Z_MAX(longest, z_shell_strlen(entry->syntax)); longest = Z_MAX(longest, z_shell_strlen(entry->syntax));
}; }
/* No help to print */ /* No help to print */
if (longest == 0) { if (longest == 0) {

View file

@ -296,7 +296,7 @@ const struct shell_static_entry *z_shell_find_cmd(
if (strcmp(cmd_str, entry->syntax) == 0) { if (strcmp(cmd_str, entry->syntax) == 0) {
return entry; return entry;
} }
}; }
return NULL; return NULL;
} }

View file

@ -93,7 +93,7 @@ static enum shell_wildcard_status commands_expand(const struct shell *shell,
} }
cnt++; cnt++;
} }
}; }
if (cnt > 0) { if (cnt > 0) {
z_shell_pattern_remove(shell->ctx->temp_buff, z_shell_pattern_remove(shell->ctx->temp_buff,

View file

@ -201,7 +201,7 @@ static int i2c_virtual_transfer(const struct device *dev, struct i2c_msg *msg,
current++; current++;
num_msgs--; num_msgs--;
}; }
return ret; return ret;
} }

View file

@ -209,7 +209,7 @@ static int test_wdt_no_callback(void)
m_state = WDT_TEST_STATE_CHECK_RESET; m_state = WDT_TEST_STATE_CHECK_RESET;
while (1) { while (1) {
k_yield(); k_yield();
}; }
} }
#if TEST_WDT_CALLBACK_1 #if TEST_WDT_CALLBACK_1
@ -263,7 +263,7 @@ static int test_wdt_callback_1(void)
m_state = WDT_TEST_STATE_CHECK_RESET; m_state = WDT_TEST_STATE_CHECK_RESET;
while (1) { while (1) {
k_yield(); k_yield();
}; }
} }
#endif #endif
@ -325,7 +325,7 @@ static int test_wdt_callback_2(void)
while (1) { while (1) {
wdt_feed(wdt, 0); wdt_feed(wdt, 0);
k_sleep(K_MSEC(100)); k_sleep(K_MSEC(100));
}; }
} }
#endif #endif

View file

@ -476,7 +476,7 @@ static void thread_get_cpu_entry(void *p1, void *p2, void *p3)
/* loop forever to ensure running on this CPU */ /* loop forever to ensure running on this CPU */
while (1) { while (1) {
k_busy_wait(DELAY_US); k_busy_wait(DELAY_US);
}; }
} }
/** /**