samples, tests: Switch main return type from void to int
This applies the coccinelle script to another set of files: samples/bluetooth/bthome_sensor_template/src/main.c samples/boards/stm32/power_mgmt/standby_shutdown/src/main.c samples/drivers/smbus/src/main.c samples/drivers/virtualization/ivshmem/doorbell/src/ivshmem.c samples/fuel_gauge/max17048/src/main.c samples/hello_world/src/main.c samples/sensor/proximity_polling/src/main.c samples/subsys/logging/ble_backend/src/main.c tests/drivers/build_all/mfd/src/main.c Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
parent
7d4a7d79a8
commit
1d5e644d12
9 changed files with 26 additions and 18 deletions
|
@ -88,7 +88,7 @@ void thread_shutdown_standby_mode(void)
|
|||
K_THREAD_DEFINE(thread_shutdown_standby_mode_id, STACKSIZE, thread_shutdown_standby_mode,
|
||||
NULL, NULL, NULL, PRIORITY, 0, 0);
|
||||
|
||||
void main(void)
|
||||
int main(void)
|
||||
{
|
||||
int ret;
|
||||
uint32_t cause;
|
||||
|
@ -117,14 +117,14 @@ void main(void)
|
|||
if (!gpio_is_ready_dt(&button)) {
|
||||
printk("Error: button device %s is not ready\n",
|
||||
button.port->name);
|
||||
return;
|
||||
return 0;
|
||||
}
|
||||
|
||||
ret = gpio_pin_configure_dt(&button, GPIO_INPUT);
|
||||
if (ret != 0) {
|
||||
printk("Error %d: failed to configure %s pin %d\n",
|
||||
ret, button.port->name, button.pin);
|
||||
return;
|
||||
return 0;
|
||||
}
|
||||
|
||||
ret = gpio_pin_interrupt_configure_dt(&button,
|
||||
|
@ -132,7 +132,7 @@ void main(void)
|
|||
if (ret != 0) {
|
||||
printk("Error %d: failed to configure interrupt on %s pin %d\n",
|
||||
ret, button.port->name, button.pin);
|
||||
return;
|
||||
return 0;
|
||||
}
|
||||
|
||||
gpio_init_callback(&button_cb_data, button_pressed, BIT(button.pin));
|
||||
|
@ -152,4 +152,5 @@ void main(void)
|
|||
led_is_on = !led_is_on;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue