Skip to content

Commit ab91eef

Browse files
pabigotgalak
authored andcommitted
coccinelle: standardize kernel API timeout arguments
Use the int_literal_to_timeout Coccinelle script to convert literal integer arguments for kernel API timeout parameters to the standard timeout value representations. Signed-off-by: Peter Bigot <[email protected]>
1 parent 0e53293 commit ab91eef

File tree

48 files changed

+160
-133
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+160
-133
lines changed

drivers/adc/adc_context.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ static inline void adc_context_enable_timer(struct adc_context *ctx)
9595
u32_t interval_us = ctx->options.interval_us;
9696
u32_t interval_ms = ceiling_fraction(interval_us, 1000UL);
9797

98-
k_timer_start(&ctx->timer, 0, interval_ms);
98+
k_timer_start(&ctx->timer, K_NO_WAIT, interval_ms);
9999
}
100100

101101
static inline void adc_context_disable_timer(struct adc_context *ctx)

drivers/ieee802154/ieee802154_cc1200.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -635,10 +635,10 @@ static int cc1200_tx(struct device *dev,
635635
}
636636

637637
/* Wait for SYNC to be sent */
638-
k_sem_take(&cc1200->tx_sync, 100);
638+
k_sem_take(&cc1200->tx_sync, K_MSEC(100));
639639
if (atomic_get(&cc1200->tx_start) == 1) {
640640
/* Now wait for the packet to be fully sent */
641-
k_sem_take(&cc1200->tx_sync, 100);
641+
k_sem_take(&cc1200->tx_sync, K_MSEC(100));
642642
}
643643

644644
out:

drivers/ieee802154/ieee802154_cc2520.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -839,7 +839,7 @@ static int cc2520_tx(struct device *dev,
839839
goto error;
840840
}
841841

842-
k_sem_take(&cc2520->tx_sync, 10);
842+
k_sem_take(&cc2520->tx_sync, K_MSEC(10));
843843

844844
retry--;
845845
status = verify_tx_done(cc2520);

drivers/led/ht16k33.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ static int ht16k33_init(struct device *dev)
442442

443443
/* Setup timer for polling key data */
444444
k_timer_init(&data->timer, ht16k33_timer_callback, NULL);
445-
k_timer_start(&data->timer, 0,
445+
k_timer_start(&data->timer, K_NO_WAIT,
446446
CONFIG_HT16K33_KEYSCAN_POLL_MSEC);
447447
}
448448

drivers/sensor/hp206c/hp206c.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ static int hp206c_wait_dev_ready(struct device *dev, u32_t timeout_ms)
168168
struct hp206c_device_data *hp206c = dev->driver_data;
169169
u8_t int_src;
170170

171-
k_timer_start(&hp206c->tmr, timeout_ms, 0);
171+
k_timer_start(&hp206c->tmr, timeout_ms, K_NO_WAIT);
172172
k_timer_status_sync(&hp206c->tmr);
173173

174174
if (hp206c_read_reg(dev, HP206C_REG_INT_SRC, &int_src) < 0) {

drivers/serial/uart_nrfx_uarte.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,8 @@ static int uarte_nrfx_tx(struct device *dev, const u8_t *buf, size_t len,
485485
nrf_uarte_tx_buffer_set(uarte, buf, len);
486486
nrf_uarte_task_trigger(uarte, NRF_UARTE_TASK_STARTTX);
487487
if (data->uart_config.flow_ctrl == UART_CFG_FLOW_CTRL_RTS_CTS) {
488-
k_timer_start(&data->async->tx_timeout_timer, timeout, 0);
488+
k_timer_start(&data->async->tx_timeout_timer, timeout,
489+
K_NO_WAIT);
489490
}
490491
return 0;
491492
}

drivers/usb/device/usb_dc_kinetis.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ int usb_dc_ep_configure(const struct usb_dc_ep_cfg_data * const cfg)
361361
(void)memset(&bdt[idx_even], 0, sizeof(struct buf_descriptor));
362362
(void)memset(&bdt[idx_odd], 0, sizeof(struct buf_descriptor));
363363

364-
if (k_mem_pool_alloc(&ep_buf_pool, block, cfg->ep_mps * 2U, 10) == 0) {
364+
if (k_mem_pool_alloc(&ep_buf_pool, block, cfg->ep_mps * 2U, K_MSEC(10)) == 0) {
365365
(void)memset(block->data, 0, cfg->ep_mps * 2U);
366366
} else {
367367
LOG_ERR("Memory allocation time-out");

drivers/usb/device/usb_dc_mcux_ehci.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ int usb_dc_ep_configure(const struct usb_dc_ep_cfg_data *const cfg)
160160
block->data = NULL;
161161
}
162162

163-
if (k_mem_pool_alloc(&ep_buf_pool, block, cfg->ep_mps, 10) == 0) {
163+
if (k_mem_pool_alloc(&ep_buf_pool, block, cfg->ep_mps, K_MSEC(10)) == 0) {
164164
memset(block->data, 0, cfg->ep_mps);
165165
} else {
166166
LOG_ERR("Memory allocation time-out");

drivers/wifi/eswifi/eswifi_offload.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ static int eswifi_off_get(sa_family_t family,
433433
k_sem_init(&socket->accept_sem, 1, 1);
434434

435435
k_delayed_work_submit_to_queue(&eswifi->work_q, &socket->read_work,
436-
500);
436+
K_MSEC(500));
437437

438438
unlock:
439439
eswifi_unlock(eswifi);

drivers/wifi/eswifi/eswifi_socket.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ static void eswifi_off_read_work(struct k_work *work)
141141
done:
142142
err = k_delayed_work_submit_to_queue(&eswifi->work_q,
143143
&socket->read_work,
144-
500);
144+
K_MSEC(500));
145145
if (err) {
146146
LOG_ERR("Rescheduling socket read error");
147147
}

drivers/wifi/eswifi/eswifi_socket_offload.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ static int eswifi_socket_open(int family, int type, int proto)
344344
socket->recv_data = socket;
345345

346346
k_delayed_work_submit_to_queue(&eswifi->work_q, &socket->read_work,
347-
500);
347+
K_MSEC(500));
348348

349349
unlock:
350350
eswifi_unlock(eswifi);

lib/cmsis_rtos_v1/cmsis_mutex.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ osMutexId osMutexCreate(const osMutexDef_t *mutex_def)
2525
return NULL;
2626
}
2727

28-
if (k_mem_slab_alloc(&cmsis_mutex_slab, (void **)&mutex, 100) == 0) {
28+
if (k_mem_slab_alloc(&cmsis_mutex_slab, (void **)&mutex, K_MSEC(100)) == 0) {
2929
(void)memset(mutex, 0, sizeof(struct k_mutex));
3030
} else {
3131
return NULL;

lib/cmsis_rtos_v1/cmsis_semaphore.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ osSemaphoreId osSemaphoreCreate(const osSemaphoreDef_t *semaphore_def,
2727
}
2828

2929
if (k_mem_slab_alloc(&cmsis_semaphore_slab,
30-
(void **)&semaphore, 100) == 0) {
30+
(void **)&semaphore, K_MSEC(100)) == 0) {
3131
(void)memset(semaphore, 0, sizeof(struct k_sem));
3232
} else {
3333
return NULL;

lib/cmsis_rtos_v1/cmsis_timer.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ osTimerId osTimerCreate(const osTimerDef_t *timer_def, os_timer_type type,
4747
return NULL;
4848
}
4949

50-
if (k_mem_slab_alloc(&cmsis_timer_slab, (void **)&timer, 100) == 0) {
50+
if (k_mem_slab_alloc(&cmsis_timer_slab, (void **)&timer, K_MSEC(100)) == 0) {
5151
(void)memset(timer, 0, sizeof(struct timer_obj));
5252
} else {
5353
return NULL;
@@ -79,9 +79,9 @@ osStatus osTimerStart(osTimerId timer_id, uint32_t millisec)
7979
}
8080

8181
if (timer->type == osTimerOnce) {
82-
k_timer_start(&timer->ztimer, millisec, 0);
82+
k_timer_start(&timer->ztimer, millisec, K_NO_WAIT);
8383
} else if (timer->type == osTimerPeriodic) {
84-
k_timer_start(&timer->ztimer, 0, millisec);
84+
k_timer_start(&timer->ztimer, K_NO_WAIT, millisec);
8585
}
8686

8787
timer->status = ACTIVE;

lib/cmsis_rtos_v2/event_flags.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ osEventFlagsId_t osEventFlagsNew(const osEventFlagsAttr_t *attr)
3535
attr = &init_event_flags_attrs;
3636
}
3737

38-
if (k_mem_slab_alloc(&cv2_event_flags_slab, (void **)&events, 100)
38+
if (k_mem_slab_alloc(&cv2_event_flags_slab, (void **)&events, K_MSEC(100))
3939
== 0) {
4040
memset(events, 0, sizeof(struct cv2_event_flags));
4141
} else {

lib/cmsis_rtos_v2/mempool.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ osMemoryPoolId_t osMemoryPoolNew(uint32_t block_count, uint32_t block_size,
4545
attr = &init_mslab_attrs;
4646
}
4747

48-
if (k_mem_slab_alloc(&cv2_mem_slab, (void **)&mslab, 100) == 0) {
48+
if (k_mem_slab_alloc(&cv2_mem_slab, (void **)&mslab, K_MSEC(100)) == 0) {
4949
(void)memset(mslab, 0, sizeof(struct cv2_mslab));
5050
} else {
5151
return NULL;

lib/cmsis_rtos_v2/msgq.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ osMessageQueueId_t osMessageQueueNew(uint32_t msg_count, uint32_t msg_size,
4343
attr = &init_msgq_attrs;
4444
}
4545

46-
if (k_mem_slab_alloc(&cv2_msgq_slab, (void **)&msgq, 100) == 0) {
46+
if (k_mem_slab_alloc(&cv2_msgq_slab, (void **)&msgq, K_MSEC(100)) == 0) {
4747
(void)memset(msgq, 0, sizeof(struct cv2_msgq));
4848
} else {
4949
return NULL;

lib/cmsis_rtos_v2/mutex.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ osMutexId_t osMutexNew(const osMutexAttr_t *attr)
3838
__ASSERT(!(attr->attr_bits & osMutexRobust),
3939
"Zephyr does not support osMutexRobust.\n");
4040

41-
if (k_mem_slab_alloc(&cv2_mutex_slab, (void **)&mutex, 100) == 0) {
41+
if (k_mem_slab_alloc(&cv2_mutex_slab, (void **)&mutex, K_MSEC(100)) == 0) {
4242
memset(mutex, 0, sizeof(struct cv2_mutex));
4343
} else {
4444
return NULL;

lib/cmsis_rtos_v2/semaphore.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ osSemaphoreId_t osSemaphoreNew(uint32_t max_count, uint32_t initial_count,
3434
}
3535

3636
if (k_mem_slab_alloc(&cv2_semaphore_slab,
37-
(void **)&semaphore, 100) == 0) {
37+
(void **)&semaphore, K_MSEC(100)) == 0) {
3838
(void)memset(semaphore, 0, sizeof(struct cv2_sem));
3939
} else {
4040
return NULL;

lib/cmsis_rtos_v2/timer.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ osTimerId_t osTimerNew(osTimerFunc_t func, osTimerType_t type,
5050
attr = &init_timer_attrs;
5151
}
5252

53-
if (k_mem_slab_alloc(&cv2_timer_slab, (void **)&timer, 100) == 0) {
53+
if (k_mem_slab_alloc(&cv2_timer_slab, (void **)&timer, K_MSEC(100)) == 0) {
5454
(void)memset(timer, 0, sizeof(struct cv2_timer));
5555
} else {
5656
return NULL;
@@ -90,9 +90,9 @@ osStatus_t osTimerStart(osTimerId_t timer_id, uint32_t ticks)
9090
}
9191

9292
if (timer->type == osTimerOnce) {
93-
k_timer_start(&timer->z_timer, millisec, 0);
93+
k_timer_start(&timer->z_timer, millisec, K_NO_WAIT);
9494
} else if (timer->type == osTimerPeriodic) {
95-
k_timer_start(&timer->z_timer, 0, millisec);
95+
k_timer_start(&timer->z_timer, K_NO_WAIT, millisec);
9696
}
9797

9898
timer->status = ACTIVE;

lib/posix/timer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ int timer_create(clockid_t clockid, struct sigevent *evp, timer_t *timerid)
5858
return -1;
5959
}
6060

61-
if (k_mem_slab_alloc(&posix_timer_slab, (void **)&timer, 100) == 0) {
61+
if (k_mem_slab_alloc(&posix_timer_slab, (void **)&timer, K_MSEC(100)) == 0) {
6262
(void)memset(timer, 0, sizeof(struct timer_obj));
6363
} else {
6464
errno = ENOMEM;

samples/boards/nrf52/mesh/onoff-app/src/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ static void button_pressed(struct device *dev, struct gpio_callback *cb,
445445
}
446446

447447
if (button_press_cnt == 0U) {
448-
k_timer_start(&sw.button_timer, K_SECONDS(1), 0);
448+
k_timer_start(&sw.button_timer, K_SECONDS(1), K_NO_WAIT);
449449
}
450450

451451
printk("button_press_cnt 0x%02x\n", button_press_cnt);

samples/boards/nrf52/mesh/onoff_level_lighting_vnd_app/src/main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,12 +210,12 @@ void main(void)
210210
update_light_state();
211211

212212
short_time_multireset_bt_mesh_unprovisioning();
213-
k_timer_start(&reset_counter_timer, K_MSEC(7000), 0);
213+
k_timer_start(&reset_counter_timer, K_MSEC(7000), K_NO_WAIT);
214214

215215
#if defined(CONFIG_MCUMGR)
216216
/* Initialize the Bluetooth mcumgr transport. */
217217
smp_bt_register();
218218

219-
k_timer_start(&smp_svr_timer, 0, K_MSEC(1000));
219+
k_timer_start(&smp_svr_timer, K_NO_WAIT, K_MSEC(1000));
220220
#endif
221221
}

samples/boards/nrf52/mesh/onoff_level_lighting_vnd_app/src/mesh/no_transition_work_handler.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,15 @@ static void no_transition_work_handler(struct k_work *work)
6969
update_led_gpio();
7070
}
7171

72-
k_timer_start(&unsolicitedly_publish_states_timer, K_MSEC(5000), 0);
72+
k_timer_start(&unsolicitedly_publish_states_timer, K_MSEC(5000),
73+
K_NO_WAIT);
7374

7475
/* If Lightness & Temperature values remains stable for
7576
* 10 Seconds then & then only get stored on SoC flash.
7677
*/
7778
if (gen_power_onoff_srv_user_data.onpowerup == STATE_RESTORE) {
7879
k_timer_start(&save_lightness_temp_last_values_timer,
79-
K_MSEC(10000), 0);
80+
K_MSEC(10000), K_NO_WAIT);
8081
}
8182
}
8283

subsys/logging/log_core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ static inline void msg_finalize(struct log_msg *msg,
214214
irq_unlock(key);
215215
} else if (proc_tid != NULL && buffered_cnt == 1) {
216216
k_timer_start(&log_process_thread_timer,
217-
CONFIG_LOG_PROCESS_THREAD_SLEEP_MS, 0);
217+
CONFIG_LOG_PROCESS_THREAD_SLEEP_MS, K_NO_WAIT);
218218
} else if (CONFIG_LOG_PROCESS_TRIGGER_THRESHOLD) {
219219
if ((buffered_cnt == CONFIG_LOG_PROCESS_TRIGGER_THRESHOLD) &&
220220
(proc_tid != NULL)) {

subsys/net/l2/ethernet/gptp/gptp.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -735,7 +735,7 @@ void gptp_update_pdelay_req_interval(int port, s8_t log_val)
735735
new_itv = 1;
736736
}
737737

738-
k_timer_start(&state_pdelay->pdelay_timer, new_itv, 0);
738+
k_timer_start(&state_pdelay->pdelay_timer, new_itv, K_NO_WAIT);
739739
}
740740

741741
void gptp_update_sync_interval(int port, s8_t log_val)
@@ -814,7 +814,7 @@ void gptp_update_announce_interval(int port, s8_t log_val)
814814
new_itv = 1;
815815
}
816816

817-
k_timer_start(&state_ann->ann_send_periodic_timer, new_itv, 0);
817+
k_timer_start(&state_ann->ann_send_periodic_timer, new_itv, K_NO_WAIT);
818818
}
819819

820820
struct port_user_data {

subsys/net/l2/ethernet/gptp/gptp_md.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ static void gptp_md_pdelay_check_multiple_resp(int port)
203203
duration = GPTP_MULTIPLE_PDELAY_RESP_WAIT -
204204
gptp_uscaled_ns_to_timer_ms(&port_ds->pdelay_req_itv);
205205

206-
k_timer_start(&state->pdelay_timer, duration, 0);
206+
k_timer_start(&state->pdelay_timer, duration, K_NO_WAIT);
207207
} else {
208208
state->state = GPTP_PDELAY_REQ_SEND_REQ;
209209
}
@@ -636,7 +636,7 @@ static void gptp_md_pdelay_req_state_machine(int port)
636636
k_timer_start(&state->pdelay_timer,
637637
gptp_uscaled_ns_to_timer_ms(
638638
&port_ds->pdelay_req_itv),
639-
0);
639+
K_NO_WAIT);
640640
/*
641641
* Transition directly to GPTP_PDELAY_REQ_WAIT_RESP.
642642
* Check for the TX timestamp will be done during

subsys/net/l2/ethernet/gptp/gptp_messages.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,7 @@ void gptp_handle_sync(int port, struct net_pkt *pkt)
608608
duration = (upstream_sync_itv / 1000000U);
609609

610610
/* Start timeout timer. */
611-
k_timer_start(&state->follow_up_discard_timer, duration, 0);
611+
k_timer_start(&state->follow_up_discard_timer, duration, K_NO_WAIT);
612612
}
613613

614614
int gptp_handle_follow_up(int port, struct net_pkt *pkt)

subsys/net/l2/ethernet/gptp/gptp_mi.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,8 @@ static void start_rcv_sync_timer(struct gptp_port_ds *port_ds,
356356

357357
duration = port_ds->sync_receipt_timeout_time_itv;
358358

359-
k_timer_start(&state->rcv_sync_receipt_timeout_timer, duration, 0);
359+
k_timer_start(&state->rcv_sync_receipt_timeout_timer, duration,
360+
K_NO_WAIT);
360361
}
361362

362363
static void gptp_mi_pss_rcv_state_machine(int port)
@@ -506,7 +507,8 @@ static void gptp_mi_pss_send_state_machine(int port)
506507
&port_ds->half_sync_itv);
507508

508509
/* Start 0.5 * syncInterval timeout timer. */
509-
k_timer_start(&state->half_sync_itv_timer, duration, 0);
510+
k_timer_start(&state->half_sync_itv_timer, duration,
511+
K_NO_WAIT);
510512

511513
gptp_mi_pss_send_md_sync_send(port);
512514

@@ -548,7 +550,7 @@ static void gptp_mi_pss_send_state_machine(int port)
548550
(NSEC_PER_USEC * USEC_PER_MSEC);
549551

550552
k_timer_start(&state->send_sync_receipt_timeout_timer,
551-
duration, 0);
553+
duration, K_NO_WAIT);
552554

553555
} else if (state->send_sync_receipt_timeout_timer_expired) {
554556
state->state = GPTP_PSS_SEND_SYNC_RECEIPT_TIMEOUT;
@@ -1474,7 +1476,7 @@ static void gptp_mi_port_announce_information_state_machine(int port)
14741476
k_timer_start(&state->ann_rcpt_expiry_timer,
14751477
gptp_uscaled_ns_to_timer_ms(
14761478
&bmca_data->ann_rcpt_timeout_time_interval),
1477-
0);
1479+
K_NO_WAIT);
14781480
/* Fallthrough. */
14791481

14801482
case GPTP_PA_INFO_INFERIOR_MASTER_OR_OTHER_PORT:
@@ -1872,7 +1874,7 @@ static void gptp_mi_port_announce_transmit_state_machine(int port)
18721874
k_timer_start(&state->ann_send_periodic_timer,
18731875
gptp_uscaled_ns_to_timer_ms(
18741876
&bmca_data->announce_interval),
1875-
0);
1877+
K_NO_WAIT);
18761878

18771879
state->state = GPTP_PA_TRANSMIT_POST_IDLE;
18781880
/* Fallthrough. */

subsys/net/l2/ieee802154/ieee802154_radio_utils.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ static inline int wait_for_ack(struct net_if *iface,
5151
return 0;
5252
}
5353

54-
if (k_sem_take(&ctx->ack_lock, 10) == 0) {
54+
if (k_sem_take(&ctx->ack_lock, K_MSEC(10)) == 0) {
5555
/*
5656
* We reinit the semaphore in case handle_ack
5757
* got called multiple times.

subsys/net/lib/openthread/platform/alarm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ void otPlatAlarmMilliStartAt(otInstance *aInstance, uint32_t t0, uint32_t dt)
5151
s64_t delta = -k_uptime_delta(&reftime);
5252

5353
if (delta > 0) {
54-
k_timer_start(&ot_timer, K_MSEC(delta), 0);
54+
k_timer_start(&ot_timer, K_MSEC(delta), K_NO_WAIT);
5555
} else {
5656
ot_timer_fired(NULL);
5757
}

subsys/shell/shell_telnet.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ static int write(const struct shell_transport *transport,
420420
*/
421421
timeout = (timeout == 0) ? TELNET_TIMEOUT : timeout;
422422

423-
k_timer_start(&sh_telnet->send_timer, timeout, 0);
423+
k_timer_start(&sh_telnet->send_timer, timeout, K_NO_WAIT);
424424
}
425425

426426
sh_telnet->shell_handler(SHELL_TRANSPORT_EVT_TX_RDY,

0 commit comments

Comments
 (0)