Skip to content

Commit

Permalink
coccinelle: Remove extra semicolon
Browse files Browse the repository at this point in the history
coccicheck --mode=patch --cocci=semicolon.cocci

Signed-off-by: Flavio Ceolin <[email protected]>
  • Loading branch information
Flavio Ceolin authored and galak committed Mar 25, 2021
1 parent ce88bd9 commit 9fd4ea9
Show file tree
Hide file tree
Showing 39 changed files with 52 additions and 52 deletions.
2 changes: 1 addition & 1 deletion boards/arm/arty/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
2 changes: 1 addition & 1 deletion drivers/clock_control/clock_control_npcx.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ static int npcx_clock_control_get_subsys_rate(const struct device *dev,
*rate = 0U;
/* Invalid parameters */
return -EINVAL;
};
}

return 0;
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpio/gpio_eos_s3.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ static int gpio_eos_s3_get_irq_num(uint8_t pad)
break;
default:
return -EINVAL;
};
}

return gpio_irq_num;
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpio/gpio_mcp23s17.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion drivers/ieee802154/ieee802154_rf2xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions drivers/pinmux/pinmux_cc13xx_cc26xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/pm_cpu_ops/pm_cpu_ops_psci.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ static int psci_to_dev_err(int ret)
return -EINVAL;
case PSCI_RET_DENIED:
return -EPERM;
};
}

return -EINVAL;
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/pwm/pwm_nrfx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion drivers/spi/spi_xlnx_axi_quadspi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion include/sys/cbprintf_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -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); \
Expand Down
4 changes: 2 additions & 2 deletions lib/libc/minimal/source/string/string.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

Expand Down Expand Up @@ -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 */

Expand Down
2 changes: 1 addition & 1 deletion samples/boards/bbc_microbit/pong/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
2 changes: 1 addition & 1 deletion samples/boards/up_squared/gpio_counter/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,5 +169,5 @@ void main(void)

k_sem_take(&counter_sem, K_FOREVER);
val = counter & MASK;
};
}
}
2 changes: 1 addition & 1 deletion samples/net/cloud/tagoio_http_post/src/wifi.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,5 +69,5 @@ void wifi_connect(void)

while (connected == 0) {
k_msleep(100);
};
}
}
2 changes: 1 addition & 1 deletion samples/net/sockets/websocket_client/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
2 changes: 1 addition & 1 deletion samples/net/wpan_serial/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ void main(void)
if (!init_ieee802154()) {
LOG_ERR("Unable to initialize ieee802154");
return;
};
}

uart_irq_callback_set(dev, interrupt_handler);

Expand Down
2 changes: 1 addition & 1 deletion samples/sensor/hts221/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down
2 changes: 1 addition & 1 deletion samples/sensor/lps22hh/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion samples/sensor/mpu6050/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ void main(void)
handle_mpu6050_drdy) < 0) {
printf("Cannot configure trigger\n");
return;
};
}
printk("Configured for triggered sampling.\n");
#endif

Expand Down
10 changes: 5 additions & 5 deletions soc/arm/atmel_sam/sam4l/soc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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)) {
Expand All @@ -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);

Expand All @@ -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.
Expand Down Expand Up @@ -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. */
Expand Down
6 changes: 3 additions & 3 deletions soc/arm/microchip_mec/mec1501/device_power.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion soc/arm/microchip_mec/mec1501/power.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
4 changes: 2 additions & 2 deletions soc/xtensa/intel_s1000/soc_mp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 |=
Expand All @@ -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 &=
Expand Down
2 changes: 1 addition & 1 deletion subsys/bluetooth/controller/ll_sw/ull_conn.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions subsys/bluetooth/host/br.c
Original file line number Diff line number Diff line change
Expand Up @@ -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]) {
Expand Down Expand Up @@ -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]) {
Expand Down
2 changes: 1 addition & 1 deletion subsys/bluetooth/host/l2cap_br.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions subsys/bluetooth/host/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++;

Expand Down
2 changes: 1 addition & 1 deletion subsys/bluetooth/shell/bredr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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]) {
Expand Down
2 changes: 1 addition & 1 deletion subsys/canbus/canopen/canopen_program.c
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
2 changes: 1 addition & 1 deletion subsys/debug/thread_analyzer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++;
Expand Down
2 changes: 1 addition & 1 deletion subsys/logging/log_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion subsys/net/lib/http/http_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion subsys/shell/modules/kernel_service.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++;
Expand Down
2 changes: 1 addition & 1 deletion subsys/shell/shell_help.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Loading

0 comments on commit 9fd4ea9

Please sign in to comment.