coccinelle: standardize kernel API timeout arguments

Re-run with updated script to detect missed cases.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
This commit is contained in:
Peter Bigot 2019-10-04 11:33:29 -05:00 committed by Anas Nashif
commit 66c8756956
4 changed files with 8 additions and 8 deletions

View file

@ -802,6 +802,6 @@ void updatehub_autohandler(void)
static struct k_delayed_work work;
k_delayed_work_init(&work, autohandler);
k_delayed_work_submit(&work, 0);
k_delayed_work_submit(&work, K_NO_WAIT);
}

View file

@ -663,7 +663,7 @@ static void disconnected(struct bt_conn *conn, u8_t reason)
printk("Disconnected (reason 0x%02x)\n", reason);
if (!slot->connectable) {
k_delayed_work_submit(&idle_work, 0);
k_delayed_work_submit(&idle_work, K_NO_WAIT);
}
}

View file

@ -193,11 +193,11 @@ static void ipv4_addr_add_handler(struct net_mgmt_event_callback *cb,
* So run it from work queue instead.
*/
k_delayed_work_init(&ipv4_timer, do_ipv4_lookup);
k_delayed_work_submit(&ipv4_timer, 0);
k_delayed_work_submit(&ipv4_timer, K_NO_WAIT);
#if defined(CONFIG_MDNS_RESOLVER)
k_delayed_work_init(&mdns_ipv4_timer, do_mdns_ipv4_lookup);
k_delayed_work_submit(&mdns_ipv4_timer, 0);
k_delayed_work_submit(&mdns_ipv4_timer, K_NO_WAIT);
#endif
}
@ -281,7 +281,7 @@ static void setup_ipv4(struct net_if *iface)
#if defined(CONFIG_MDNS_RESOLVER) && defined(CONFIG_NET_IPV4)
k_delayed_work_init(&mdns_ipv4_timer, do_mdns_ipv4_lookup);
k_delayed_work_submit(&mdns_ipv4_timer, 0);
k_delayed_work_submit(&mdns_ipv4_timer, K_NO_WAIT);
#endif
}
@ -321,7 +321,7 @@ static void setup_ipv6(struct net_if *iface)
#if defined(CONFIG_MDNS_RESOLVER) && defined(CONFIG_NET_IPV6)
k_delayed_work_init(&mdns_ipv6_timer, do_mdns_ipv6_lookup);
k_delayed_work_submit(&mdns_ipv6_timer, 0);
k_delayed_work_submit(&mdns_ipv6_timer, K_NO_WAIT);
#endif
}

View file

@ -289,7 +289,7 @@ static void coop_delayed_work_cancel_main(int arg1, int arg2)
#if defined(CONFIG_POLL)
k_delayed_work_submit(&delayed_tests[2].work,
0 /* Submit immediately */);
K_NO_WAIT /* Submit immediately */);
TC_PRINT(" - Cancel pending delayed work from coop thread\n");
k_delayed_work_cancel(&delayed_tests[2].work);
@ -370,7 +370,7 @@ static void coop_delayed_work_resubmit(void)
for (i = 0; i < NUM_TEST_ITEMS; i++) {
TC_PRINT(" - Resubmitting delayed work with 1 ms\n");
k_delayed_work_submit(&delayed_tests[0].work, 1);
k_delayed_work_submit(&delayed_tests[0].work, K_MSEC(1));
/* Busy wait 1 ms to force a clash with workqueue */
#if defined(CONFIG_ARCH_POSIX)