diff --git a/arch/arc/core/arc_smp.c b/arch/arc/core/arc_smp.c index a9523a7fc3708..9fb43c4115241 100644 --- a/arch/arc/core/arc_smp.c +++ b/arch/arc/core/arc_smp.c @@ -145,9 +145,8 @@ void arch_sched_ipi(void) } } -static int arc_smp_init(const struct device *dev) +static int arc_smp_init(void) { - ARG_UNUSED(dev); struct arc_connect_bcr bcr; /* necessary master core init */ diff --git a/arch/arc/core/cache.c b/arch/arc/core/cache.c index c67db4621d394..1536c5a173f2b 100644 --- a/arch/arc/core/cache.c +++ b/arch/arc/core/cache.c @@ -216,9 +216,8 @@ int arch_icache_flush_and_invd_range(void *addr, size_t size) return -ENOTSUP; } -static int init_dcache(const struct device *unused) +static int init_dcache(void) { - ARG_UNUSED(unused); arch_dcache_enable(); diff --git a/arch/arc/core/irq_offload.c b/arch/arc/core/irq_offload.c index 85fa664cddaec..b658b8e353d46 100644 --- a/arch/arc/core/irq_offload.c +++ b/arch/arc/core/irq_offload.c @@ -54,9 +54,8 @@ void arch_irq_offload(irq_offload_routine_t routine, const void *parameter) } /* need to be executed on every core in the system */ -int arc_irq_offload_init(const struct device *unused) +int arc_irq_offload_init(void) { - ARG_UNUSED(unused); IRQ_CONNECT(IRQ_OFFLOAD_LINE, IRQ_OFFLOAD_PRIO, arc_irq_offload_handler, NULL, 0); diff --git a/arch/arc/core/mpu/arc_mpu_common_internal.h b/arch/arc/core/mpu/arc_mpu_common_internal.h index e6e2174a59842..736a9742af96b 100644 --- a/arch/arc/core/mpu/arc_mpu_common_internal.h +++ b/arch/arc/core/mpu/arc_mpu_common_internal.h @@ -238,9 +238,8 @@ int arc_core_mpu_buffer_validate(void *addr, size_t size, int write) * This function provides the default configuration mechanism for the Memory * Protection Unit (MPU). */ -static int arc_mpu_init(const struct device *arg) +static int arc_mpu_init(void) { - ARG_UNUSED(arg); uint32_t num_regions = get_num_regions(); diff --git a/arch/arc/core/mpu/arc_mpu_v4_internal.h b/arch/arc/core/mpu/arc_mpu_v4_internal.h index b8348130db687..e7e91fed93fd3 100644 --- a/arch/arc/core/mpu/arc_mpu_v4_internal.h +++ b/arch/arc/core/mpu/arc_mpu_v4_internal.h @@ -814,9 +814,8 @@ int arc_core_mpu_buffer_validate(void *addr, size_t size, int write) * This function provides the default configuration mechanism for the Memory * Protection Unit (MPU). */ -static int arc_mpu_init(const struct device *arg) +static int arc_mpu_init(void) { - ARG_UNUSED(arg); uint32_t num_regions; uint32_t i; diff --git a/arch/arc/core/secureshield/arc_sjli.c b/arch/arc/core/secureshield/arc_sjli.c index ec85421bb1124..22deebc27185a 100644 --- a/arch/arc/core/secureshield/arc_sjli.c +++ b/arch/arc/core/secureshield/arc_sjli.c @@ -48,7 +48,7 @@ static void sjli_table_init(void) /* * @brief initialization of secureshield related functions. */ -static int arc_secureshield_init(const struct device *arg) +static int arc_secureshield_init(void) { sjli_table_init(); diff --git a/arch/arm/core/aarch32/cortex_m/debug.c b/arch/arm/core/aarch32/cortex_m/debug.c index b0cf8d6fb2514..70394b2d361c7 100644 --- a/arch/arm/core/aarch32/cortex_m/debug.c +++ b/arch/arm/core/aarch32/cortex_m/debug.c @@ -58,9 +58,8 @@ BUILD_ASSERT(!(CONFIG_CORTEX_M_NULL_POINTER_EXCEPTION_PAGE_SIZE & (CONFIG_CORTEX_M_NULL_POINTER_EXCEPTION_PAGE_SIZE - 1)), "the size of the partition must be power of 2"); -static int z_arm_debug_enable_null_pointer_detection(const struct device *arg) +static int z_arm_debug_enable_null_pointer_detection(void) { - ARG_UNUSED(arg); z_arm_dwt_init(); z_arm_dwt_enable_debug_monitor(); diff --git a/arch/arm64/core/smp.c b/arch/arm64/core/smp.c index b09f26fdfdb6d..4e97497bdfb12 100644 --- a/arch/arm64/core/smp.c +++ b/arch/arm64/core/smp.c @@ -226,9 +226,8 @@ void z_arm64_flush_fpu_ipi(unsigned int cpu) } #endif -static int arm64_smp_init(const struct device *dev) +static int arm64_smp_init(void) { - ARG_UNUSED(dev); /* * SGI0 is use for sched ipi, this might be changed to use Kconfig diff --git a/arch/arm64/core/xen/enlighten.c b/arch/arm64/core/xen/enlighten.c index 5077d6e9afe49..164947a09ffdc 100644 --- a/arch/arm64/core/xen/enlighten.c +++ b/arch/arm64/core/xen/enlighten.c @@ -42,9 +42,8 @@ static int xen_map_shared_info(const shared_info_t *shared_page) return HYPERVISOR_memory_op(XENMEM_add_to_physmap, &xatp); } -static int xen_enlighten_init(const struct device *dev) +static int xen_enlighten_init(void) { - ARG_UNUSED(dev); int ret = 0; shared_info_t *info = (shared_info_t *) shared_info_buf; diff --git a/arch/riscv/core/smp.c b/arch/riscv/core/smp.c index 636370e4b6878..0be8b0ae39ac4 100644 --- a/arch/riscv/core/smp.c +++ b/arch/riscv/core/smp.c @@ -118,9 +118,8 @@ static void ipi_handler(const void *unused) #endif } -static int riscv_smp_init(const struct device *dev) +static int riscv_smp_init(void) { - ARG_UNUSED(dev); IRQ_CONNECT(RISCV_MACHINE_SOFT_IRQ, 0, ipi_handler, NULL, 0); irq_enable(RISCV_MACHINE_SOFT_IRQ); diff --git a/arch/x86/core/spec_ctrl.c b/arch/x86/core/spec_ctrl.c index d1889a3b92ec6..feb6616250ec3 100644 --- a/arch/x86/core/spec_ctrl.c +++ b/arch/x86/core/spec_ctrl.c @@ -17,9 +17,8 @@ */ #if defined(CONFIG_DISABLE_SSBD) || defined(CONFIG_ENABLE_EXTENDED_IBRS) -static int spec_ctrl_init(const struct device *dev) +static int spec_ctrl_init(void) { - ARG_UNUSED(dev); uint32_t enable_bits = 0U; uint32_t cpuid7 = z_x86_cpuid_extended_features(); diff --git a/arch/x86/core/x86_mmu.c b/arch/x86/core/x86_mmu.c index 3ef53299251e3..119179b72ae8e 100644 --- a/arch/x86/core/x86_mmu.c +++ b/arch/x86/core/x86_mmu.c @@ -702,7 +702,7 @@ void z_x86_dump_page_tables(pentry_t *ptables) #if DUMP_PAGE_TABLES __pinned_func -static int dump_kernel_tables(const struct device *unused) +static int dump_kernel_tables(void) { z_x86_dump_page_tables(z_x86_kernel_ptables); diff --git a/boards/arc/em_starterkit/pmodmux.c b/boards/arc/em_starterkit/pmodmux.c index 2666cacd1da94..da2fb4ee86996 100644 --- a/boards/arc/em_starterkit/pmodmux.c +++ b/boards/arc/em_starterkit/pmodmux.c @@ -123,7 +123,7 @@ #define PM6_LR_CSS_STAT ((1 << BIT2) << PM6_OFFSET) -static int pmod_mux_init(const struct device *dev) +static int pmod_mux_init(void) { volatile uint32_t *mux_regs = (uint32_t *)(PMODMUX_BASE_ADDR); diff --git a/boards/arc/hsdk/platform.c b/boards/arc/hsdk/platform.c index 7f8e5f030d741..0d8840e3c1cfc 100644 --- a/boards/arc/hsdk/platform.c +++ b/boards/arc/hsdk/platform.c @@ -10,9 +10,8 @@ #define HSDK_CREG_GPIO_MUX_REG 0xf0001484 #define HSDK_CREG_GPIO_MUX_VAL 0x00000400 -static int hsdk_creg_gpio_mux_init(const struct device *dev) +static int hsdk_creg_gpio_mux_init(void) { - ARG_UNUSED(dev); sys_write32(HSDK_CREG_GPIO_MUX_REG, HSDK_CREG_GPIO_MUX_VAL); diff --git a/boards/arc/nsim/haps_arcv3_init.c b/boards/arc/nsim/haps_arcv3_init.c index c8b75f3fd521e..78dfc37f6c7db 100644 --- a/boards/arc/nsim/haps_arcv3_init.c +++ b/boards/arc/nsim/haps_arcv3_init.c @@ -30,9 +30,8 @@ #define AUX_CLN_DATA 0x641 -static int haps_arcv3_init(const struct device *dev) +static int haps_arcv3_init(void) { - ARG_UNUSED(dev); z_arc_v2_aux_reg_write(AUX_CLN_ADDR, ARC_CLN_PER0_BASE); z_arc_v2_aux_reg_write(AUX_CLN_DATA, 0xF00); diff --git a/boards/arm/96b_wistrio/rf.c b/boards/arm/96b_wistrio/rf.c index baea79dee250f..bacc48d10c646 100644 --- a/boards/arm/96b_wistrio/rf.c +++ b/boards/arm/96b_wistrio/rf.c @@ -7,7 +7,7 @@ #include #include -static int rf_init(const struct device *dev) +static int rf_init(void) { const struct gpio_dt_spec rf1 = GPIO_DT_SPEC_GET(DT_NODELABEL(rf_switch), rf1_gpios); @@ -16,7 +16,6 @@ static int rf_init(const struct device *dev) const struct gpio_dt_spec rf3 = GPIO_DT_SPEC_GET(DT_NODELABEL(rf_switch), rf3_gpios); - ARG_UNUSED(dev); /* configure RFSW8001 GPIOs (110: RF1/RF2 coexistence mode) */ if (!device_is_ready(rf1.port) || diff --git a/boards/arm/arduino_nano_33_ble/board.c b/boards/arm/arduino_nano_33_ble/board.c index 24383ad852fdb..ee600605871c3 100644 --- a/boards/arm/arduino_nano_33_ble/board.c +++ b/boards/arm/arduino_nano_33_ble/board.c @@ -7,9 +7,8 @@ #include #include -static int board_init(const struct device *dev) +static int board_init(void) { - ARG_UNUSED(dev); int res; static const struct gpio_dt_spec pull_up = diff --git a/boards/arm/arduino_portenta_h7/board.c b/boards/arm/arduino_portenta_h7/board.c index 3cef340c16501..47eb4900221ca 100644 --- a/boards/arm/arduino_portenta_h7/board.c +++ b/boards/arm/arduino_portenta_h7/board.c @@ -7,9 +7,8 @@ #include #include -static int board_init(const struct device *dev) +static int board_init(void) { - ARG_UNUSED(dev); /* Set led1 inactive since the Arduino bootloader leaves it active */ const struct gpio_dt_spec led1 = GPIO_DT_SPEC_GET(DT_ALIAS(led1), gpios); diff --git a/boards/arm/arty/board.c b/boards/arm/arty/board.c index bccbacd49e497..b2539d7aedd47 100644 --- a/boards/arm/arty/board.c +++ b/boards/arm/arty/board.c @@ -60,9 +60,8 @@ bool board_daplink_is_fitted(void) return !NVIC_GetPendingIRQ(DT_IRQN(DAPLINK_QSPI_MUX_NODE)); } -static int board_init(const struct device *dev) +static int board_init(void) { - ARG_UNUSED(dev); /* * Automatically select normal mode unless the DAPLink shield is fitted diff --git a/boards/arm/beagle_bcf/board_antenna.c b/boards/arm/beagle_bcf/board_antenna.c index 005aad042b5b6..131d75448bb22 100644 --- a/boards/arm/beagle_bcf/board_antenna.c +++ b/boards/arm/beagle_bcf/board_antenna.c @@ -41,9 +41,8 @@ const RFCC26XX_HWAttrsV2 RFCC26XX_hwAttrs = { /** * Antenna switch GPIO init routine. */ -static int board_antenna_init(const struct device *dev) +static int board_antenna_init(void) { - ARG_UNUSED(dev); /* set all paths to low */ IOCPinTypeGpioOutput(BOARD_RF_HIGH_PA); diff --git a/boards/arm/bl5340_dvk/bl5340_dvk_cpunet_reset.c b/boards/arm/bl5340_dvk/bl5340_dvk_cpunet_reset.c index 64da5e9142005..2574246d67db0 100644 --- a/boards/arm/bl5340_dvk/bl5340_dvk_cpunet_reset.c +++ b/boards/arm/bl5340_dvk/bl5340_dvk_cpunet_reset.c @@ -23,9 +23,8 @@ static void remoteproc_mgr_config(void) #endif /* !CONFIG_TRUSTED_EXECUTION_NONSECURE */ } -static int remoteproc_mgr_boot(const struct device *dev) +static int remoteproc_mgr_boot(void) { - ARG_UNUSED(dev); /* Secure domain may configure permissions for the Network MCU. */ remoteproc_mgr_config(); diff --git a/boards/arm/cc3220sf_launchxl/pinmux.c b/boards/arm/cc3220sf_launchxl/pinmux.c index 0b5322c5f73ea..69947a875d181 100644 --- a/boards/arm/cc3220sf_launchxl/pinmux.c +++ b/boards/arm/cc3220sf_launchxl/pinmux.c @@ -89,9 +89,8 @@ #define I2C_CC32XX_PIN_16_I2C_SCL 0x90F /*!< PIN 16 is used for I2C_SCL */ #define I2C_CC32XX_PIN_17_I2C_SDA 0x910 /*!< PIN 17 is used for I2C_SDA */ -int pinmux_initialize(const struct device *port) +int pinmux_initialize(void) { - ARG_UNUSED(port); #ifdef CONFIG_UART_CC32XX /* Configure PIN_55 for UART0 UART0_TX */ diff --git a/boards/arm/cc3235sf_launchxl/pinmux.c b/boards/arm/cc3235sf_launchxl/pinmux.c index 1a6d982b57401..f4ebff48d650f 100644 --- a/boards/arm/cc3235sf_launchxl/pinmux.c +++ b/boards/arm/cc3235sf_launchxl/pinmux.c @@ -64,9 +64,8 @@ #define I2C_CC32XX_PIN_16_I2C_SCL 0x90F /*!< PIN 16 is used for I2C_SCL */ #define I2C_CC32XX_PIN_17_I2C_SDA 0x910 /*!< PIN 17 is used for I2C_SDA */ -int pinmux_initialize(const struct device *port) +int pinmux_initialize(void) { - ARG_UNUSED(port); #ifdef CONFIG_UART_CC32XX /* Configure PIN_55 for UART0 UART0_TX */ diff --git a/boards/arm/efm32gg_slwstk6121a/board.c b/boards/arm/efm32gg_slwstk6121a/board.c index 999f08e5b026e..618073d1246d2 100644 --- a/boards/arm/efm32gg_slwstk6121a/board.c +++ b/boards/arm/efm32gg_slwstk6121a/board.c @@ -12,9 +12,8 @@ #include "em_cmu.h" #include "board.h" -static int efm32gg_slwstk6121a_init(const struct device *dev) +static int efm32gg_slwstk6121a_init(void) { - ARG_UNUSED(dev); const struct device *cur_dev; diff --git a/boards/arm/efm32gg_stk3701a/board.c b/boards/arm/efm32gg_stk3701a/board.c index b855984ab2f3d..0096cf11bc92c 100644 --- a/boards/arm/efm32gg_stk3701a/board.c +++ b/boards/arm/efm32gg_stk3701a/board.c @@ -11,11 +11,10 @@ #include #include "em_cmu.h" -static int efm32gg_stk3701a_init(const struct device *dev) +static int efm32gg_stk3701a_init(void) { const struct device *cur_dev; - ARG_UNUSED(dev); /* Enable the board controller to be able to use the serial port */ cur_dev = DEVICE_DT_GET(BC_ENABLE_GPIO_NODE); diff --git a/boards/arm/efm32hg_slstk3400a/board.c b/boards/arm/efm32hg_slstk3400a/board.c index 6b925246b1a30..ae69f6ee5d281 100644 --- a/boards/arm/efm32hg_slstk3400a/board.c +++ b/boards/arm/efm32hg_slstk3400a/board.c @@ -9,11 +9,10 @@ #include #include -static int efm32hg_slstk3400a_init(const struct device *dev) +static int efm32hg_slstk3400a_init(void) { const struct device *bce_dev; /* Board Controller Enable Gpio Device */ - ARG_UNUSED(dev); /* Enable the board controller to be able to use the serial port */ bce_dev = DEVICE_DT_GET(BC_ENABLE_GPIO_NODE); diff --git a/boards/arm/efm32pg_stk3401a/board.c b/boards/arm/efm32pg_stk3401a/board.c index eaaab76560651..a2677965a4aec 100644 --- a/boards/arm/efm32pg_stk3401a/board.c +++ b/boards/arm/efm32pg_stk3401a/board.c @@ -9,11 +9,10 @@ #include #include -static int efm32pg_stk3401a_init(const struct device *dev) +static int efm32pg_stk3401a_init(void) { const struct device *bce_dev; /* Board Controller Enable Gpio Device */ - ARG_UNUSED(dev); /* Enable the board controller to be able to use the serial port */ bce_dev = DEVICE_DT_GET(BC_ENABLE_GPIO_NODE); diff --git a/boards/arm/efm32pg_stk3402a/board.c b/boards/arm/efm32pg_stk3402a/board.c index d47883eeea2d3..8809b013920cc 100644 --- a/boards/arm/efm32pg_stk3402a/board.c +++ b/boards/arm/efm32pg_stk3402a/board.c @@ -9,11 +9,10 @@ #include #include -static int efm32pg_stk3402a_init(const struct device *dev) +static int efm32pg_stk3402a_init(void) { const struct device *bce_dev; /* Board Controller Enable Gpio Device */ - ARG_UNUSED(dev); /* Enable the board controller to be able to use the serial port */ bce_dev = DEVICE_DT_GET(BC_ENABLE_GPIO_NODE); diff --git a/boards/arm/efm32wg_stk3800/board.c b/boards/arm/efm32wg_stk3800/board.c index 653371a95d747..acf9406da6108 100644 --- a/boards/arm/efm32wg_stk3800/board.c +++ b/boards/arm/efm32wg_stk3800/board.c @@ -9,11 +9,10 @@ #include #include -static int efm32wg_stk3800_init(const struct device *dev) +static int efm32wg_stk3800_init(void) { const struct device *bce_dev; /* Board Controller Enable Gpio Device */ - ARG_UNUSED(dev); /* Enable the board controller to be able to use the serial port */ bce_dev = DEVICE_DT_GET(BC_ENABLE_GPIO_NODE); diff --git a/boards/arm/efr32_radio/board.c b/boards/arm/efr32_radio/board.c index c2f8c0a3396a2..b1c80128b339c 100644 --- a/boards/arm/efr32_radio/board.c +++ b/boards/arm/efr32_radio/board.c @@ -17,11 +17,10 @@ #define VCOM_ENABLE_GPIO_PIN 5 #endif /* CONFIG_BOARD_EFR32_RADIO_BRD4180A */ -static int efr32_radio_init(const struct device *dev) +static int efr32_radio_init(void) { const struct device *vce_dev; /* Virtual COM Port Enable GPIO Device */ - ARG_UNUSED(dev); /* Enable the board controller to be able to use the serial port */ vce_dev = DEVICE_DT_GET(VCOM_ENABLE_GPIO_NODE); diff --git a/boards/arm/efr32bg_sltb010a/board.c b/boards/arm/efr32bg_sltb010a/board.c index 9317acbdac3a7..dad825e52dfb0 100644 --- a/boards/arm/efr32bg_sltb010a/board.c +++ b/boards/arm/efr32bg_sltb010a/board.c @@ -16,7 +16,7 @@ LOG_MODULE_REGISTER(efr32bg_sltb010a, CONFIG_BOARD_EFR32BG22_LOG_LEVEL); static int efr32bg_sltb010a_init_clocks(void); -static int efr32bg_sltb010a_init(const struct device *dev) +static int efr32bg_sltb010a_init(void) { int ret; @@ -26,7 +26,6 @@ static int efr32bg_sltb010a_init(const struct device *dev) static struct gpio_dt_spec wake_up_gpio_dev = GPIO_DT_SPEC_GET(DT_NODELABEL(wake_up_trigger), gpios); - ARG_UNUSED(dev); if (!device_is_ready(wake_up_gpio_dev.port)) { LOG_ERR("Wake-up GPIO device was not found!\n"); diff --git a/boards/arm/efr32mg_sltb004a/board.c b/boards/arm/efr32mg_sltb004a/board.c index c78ea6495388f..43dd2a6b3b248 100644 --- a/boards/arm/efr32mg_sltb004a/board.c +++ b/boards/arm/efr32mg_sltb004a/board.c @@ -28,12 +28,11 @@ static int enable_supply(const struct supply_cfg *cfg) return rv; } -static int efr32mg_sltb004a_init(const struct device *dev) +static int efr32mg_sltb004a_init(void) { struct supply_cfg cfg; int rc = 0; - ARG_UNUSED(dev); (void)cfg; #define CCS811 DT_NODELABEL(ccs811) diff --git a/boards/arm/efr32xg24_dk2601b/board.c b/boards/arm/efr32xg24_dk2601b/board.c index 92c3909cc6d6b..7a3fcd316c381 100644 --- a/boards/arm/efr32xg24_dk2601b/board.c +++ b/boards/arm/efr32xg24_dk2601b/board.c @@ -17,7 +17,7 @@ LOG_MODULE_REGISTER(efr32xg24_dk2601b, CONFIG_BOARD_EFR32MG24_LOG_LEVEL); static int efr32xg24_dk2601b_init_clocks(void); -static int efr32xg24_dk2601b_init(const struct device *dev) +static int efr32xg24_dk2601b_init(void) { int ret; @@ -27,7 +27,6 @@ static int efr32xg24_dk2601b_init(const struct device *dev) static struct gpio_dt_spec wake_up_gpio_dev = GPIO_DT_SPEC_GET(DT_NODELABEL(wake_up_trigger), gpios); - ARG_UNUSED(dev); if (!device_is_ready(wake_up_gpio_dev.port)) { LOG_ERR("Wake-up GPIO device was not found!\n"); diff --git a/boards/arm/lpcxpresso55s69/pinmux.c b/boards/arm/lpcxpresso55s69/pinmux.c index ff22460a83253..36095b2a923a6 100644 --- a/boards/arm/lpcxpresso55s69/pinmux.c +++ b/boards/arm/lpcxpresso55s69/pinmux.c @@ -9,9 +9,8 @@ #include #include -static int lpcxpresso_55s69_pinmux_init(const struct device *dev) +static int lpcxpresso_55s69_pinmux_init(void) { - ARG_UNUSED(dev); #if (DT_NODE_HAS_COMPAT_STATUS(DT_NODELABEL(flexcomm6), nxp_lpc_i2s, okay)) && \ (DT_NODE_HAS_COMPAT_STATUS(DT_NODELABEL(flexcomm7), nxp_lpc_i2s, okay)) && \ diff --git a/boards/arm/mec2016evb_assy6797/pinmux.c b/boards/arm/mec2016evb_assy6797/pinmux.c index d45e77b6d2348..d4b1be5c9f5cb 100644 --- a/boards/arm/mec2016evb_assy6797/pinmux.c +++ b/boards/arm/mec2016evb_assy6797/pinmux.c @@ -10,9 +10,8 @@ #include "soc.h" -static int board_pinmux_init(const struct device *dev) +static int board_pinmux_init(void) { - ARG_UNUSED(dev); /* See table 2-4 from the Data sheet*/ #if DT_NODE_HAS_STATUS(DT_NODELABEL(uart0), okay) diff --git a/boards/arm/mercury_xu/board.c b/boards/arm/mercury_xu/board.c index 214f731db962b..8204b29ae905a 100644 --- a/boards/arm/mercury_xu/board.c +++ b/boards/arm/mercury_xu/board.c @@ -14,7 +14,7 @@ #define MIO_DEFAULT 0x0 #define MIO_UART0 0xc0 -static int mercury_xu_init(const struct device *port) +static int mercury_xu_init(void) { /* pinmux settings for uart */ sys_write32(MIO_UART0, MIO_PIN_38); @@ -24,7 +24,6 @@ static int mercury_xu_init(const struct device *port) sys_write32(MIO_DEFAULT, MIO_PIN_18); sys_write32(MIO_DEFAULT, MIO_PIN_19); - ARG_UNUSED(port); return 0; } diff --git a/boards/arm/mimxrt595_evk/board.c b/boards/arm/mimxrt595_evk/board.c index 8adf39cf313e1..ff7e1e1d09fac 100644 --- a/boards/arm/mimxrt595_evk/board.c +++ b/boards/arm/mimxrt595_evk/board.c @@ -45,7 +45,7 @@ static int32_t board_calc_volt_level(void) return volt; } -static int board_config_pmic(const struct device *dev) +static int board_config_pmic(void) { uint32_t volt; int ret = 0; @@ -79,7 +79,7 @@ static int board_config_pmic(const struct device *dev) } #endif -static int mimxrt595_evk_init(const struct device *dev) +static int mimxrt595_evk_init(void) { /* Set the correct voltage range according to the board. */ power_pad_vrange_t vrange = { diff --git a/boards/arm/mimxrt685_evk/init.c b/boards/arm/mimxrt685_evk/init.c index a0c467d3974ce..8c0cd0878811c 100644 --- a/boards/arm/mimxrt685_evk/init.c +++ b/boards/arm/mimxrt685_evk/init.c @@ -7,9 +7,8 @@ #include #include -static int mimxrt685_evk_init(const struct device *dev) +static int mimxrt685_evk_init(void) { - ARG_UNUSED(dev); /* flexcomm1 and flexcomm3 are configured to loopback the TX signal to RX */ #if (DT_NODE_HAS_COMPAT_STATUS(DT_NODELABEL(flexcomm1), nxp_lpc_i2s, okay)) && \ diff --git a/boards/arm/mps2_an385/pinmux.c b/boards/arm/mps2_an385/pinmux.c index ce8e05dc3be8e..6cf9398307286 100644 --- a/boards/arm/mps2_an385/pinmux.c +++ b/boards/arm/mps2_an385/pinmux.c @@ -152,9 +152,8 @@ static void arm_mps2_pinmux_defaults(void) CMSDK_AHB_GPIO2_DEV->altfuncset = gpio_2; } -static int arm_mps2_pinmux_init(const struct device *port) +static int arm_mps2_pinmux_init(void) { - ARG_UNUSED(port); arm_mps2_pinmux_defaults(); diff --git a/boards/arm/mps2_an521/pinmux.c b/boards/arm/mps2_an521/pinmux.c index c9c6333c2b602..bc92dc747d19b 100644 --- a/boards/arm/mps2_an521/pinmux.c +++ b/boards/arm/mps2_an521/pinmux.c @@ -152,9 +152,8 @@ static void arm_mps2_pinmux_defaults(void) CMSDK_AHB_GPIO2_DEV->altfuncset = gpio_2; } -static int arm_mps2_pinmux_init(const struct device *port) +static int arm_mps2_pinmux_init(void) { - ARG_UNUSED(port); arm_mps2_pinmux_defaults(); diff --git a/boards/arm/nrf52840dongle_nrf52840/board.c b/boards/arm/nrf52840dongle_nrf52840/board.c index 0b433d281089d..ac37eacee210e 100644 --- a/boards/arm/nrf52840dongle_nrf52840/board.c +++ b/boards/arm/nrf52840dongle_nrf52840/board.c @@ -7,9 +7,8 @@ #include #include -static int board_nrf52840dongle_nrf52840_init(const struct device *dev) +static int board_nrf52840dongle_nrf52840_init(void) { - ARG_UNUSED(dev); /* if the nrf52840dongle_nrf52840 board is powered from USB * (high voltage mode), GPIO output voltage is set to 1.8 volts by diff --git a/boards/arm/nrf5340_audio_dk_nrf5340/nrf5340_audio_dk_cpunet_reset.c b/boards/arm/nrf5340_audio_dk_nrf5340/nrf5340_audio_dk_cpunet_reset.c index 2d2dce5d1625e..5f30e0d9a66fc 100644 --- a/boards/arm/nrf5340_audio_dk_nrf5340/nrf5340_audio_dk_cpunet_reset.c +++ b/boards/arm/nrf5340_audio_dk_nrf5340/nrf5340_audio_dk_cpunet_reset.c @@ -49,11 +49,10 @@ static void remoteproc_mgr_config(void) #endif /* !defined(CONFIG_TRUSTED_EXECUTION_NONSECURE) */ } -static int remoteproc_mgr_boot(const struct device *dev) +static int remoteproc_mgr_boot(void) { int ret; - ARG_UNUSED(dev); ret = core_config(); if (ret) { diff --git a/boards/arm/nrf5340dk_nrf5340/nrf5340_cpunet_reset.c b/boards/arm/nrf5340dk_nrf5340/nrf5340_cpunet_reset.c index 0094e915b1597..68700225f4eda 100644 --- a/boards/arm/nrf5340dk_nrf5340/nrf5340_cpunet_reset.c +++ b/boards/arm/nrf5340dk_nrf5340/nrf5340_cpunet_reset.c @@ -33,9 +33,8 @@ static void remoteproc_mgr_config(void) #endif /* !defined(CONFIG_TRUSTED_EXECUTION_NONSECURE) */ } -static int remoteproc_mgr_boot(const struct device *dev) +static int remoteproc_mgr_boot(void) { - ARG_UNUSED(dev); /* Secure domain may configure permissions for the Network MCU. */ remoteproc_mgr_config(); diff --git a/boards/arm/nrf9160dk_nrf52840/board.c b/boards/arm/nrf9160dk_nrf52840/board.c index 6a7834d620ea6..e01b8eb64e79c 100644 --- a/boards/arm/nrf9160dk_nrf52840/board.c +++ b/boards/arm/nrf9160dk_nrf52840/board.c @@ -159,7 +159,7 @@ static int reset_pin_configure(void) } #endif /* USE_RESET_GPIO */ -static int init(const struct device *dev) +static int init(void) { int rc; @@ -214,7 +214,7 @@ SYS_INIT(init, POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEVICE); #define EXT_MEM_CTRL DT_NODELABEL(external_flash_pins_routing) #if DT_NODE_EXISTS(EXT_MEM_CTRL) -static int early_init(const struct device *dev) +static int early_init(void) { /* As soon as possible after the system starts up, enable the analog * switch that routes signals to the external flash. Otherwise, the diff --git a/boards/arm/particle_argon/board.c b/boards/arm/particle_argon/board.c index 7357c33882e41..3dbff3cb87f49 100644 --- a/boards/arm/particle_argon/board.c +++ b/boards/arm/particle_argon/board.c @@ -28,9 +28,8 @@ static inline void external_antenna(bool on) gpio_pin_configure_dt(&pcb_gpio, (on ? GPIO_OUTPUT_INACTIVE : GPIO_OUTPUT_ACTIVE)); } -static int board_particle_argon_init(const struct device *dev) +static int board_particle_argon_init(void) { - ARG_UNUSED(dev); /* * On power-up the SKY13351 is left uncontrolled, so neither diff --git a/boards/arm/particle_boron/board.c b/boards/arm/particle_boron/board.c index 0213cd62fedb9..7f313336c112b 100644 --- a/boards/arm/particle_boron/board.c +++ b/boards/arm/particle_boron/board.c @@ -27,9 +27,8 @@ static inline void external_antenna(bool on) gpio_pin_configure_dt(&ufl_gpio, (on ? GPIO_OUTPUT_ACTIVE : GPIO_OUTPUT_INACTIVE)); } -static int board_particle_boron_init(const struct device *dev) +static int board_particle_boron_init(void) { - ARG_UNUSED(dev); external_antenna(false); diff --git a/boards/arm/particle_xenon/board.c b/boards/arm/particle_xenon/board.c index d6d2b890bb6ee..9c29e77a5807d 100644 --- a/boards/arm/particle_xenon/board.c +++ b/boards/arm/particle_xenon/board.c @@ -28,9 +28,8 @@ static inline void external_antenna(bool on) gpio_pin_configure_dt(&pcb_gpio, (on ? GPIO_OUTPUT_INACTIVE : GPIO_OUTPUT_ACTIVE)); } -static int board_particle_xenon_init(const struct device *dev) +static int board_particle_xenon_init(void) { - ARG_UNUSED(dev); /* * On power-up the SKY13351 is left uncontrolled, so neither diff --git a/boards/arm/pinetime_devkit0/key_out.c b/boards/arm/pinetime_devkit0/key_out.c index 66eddc27f087b..db8f3506f9343 100644 --- a/boards/arm/pinetime_devkit0/key_out.c +++ b/boards/arm/pinetime_devkit0/key_out.c @@ -15,9 +15,8 @@ LOG_MODULE_REGISTER(pine64_pinetime_key_out); static const struct gpio_dt_spec key_out = GPIO_DT_SPEC_GET(KEY_OUT_NODE, gpios); -static int pinetime_key_out_init(const struct device *arg) +static int pinetime_key_out_init(void) { - ARG_UNUSED(arg); int ret; if (!device_is_ready(key_out.port)) { diff --git a/boards/arm/qemu_cortex_m0/nrf_timer_timer.c b/boards/arm/qemu_cortex_m0/nrf_timer_timer.c index 203ece46b06ab..eb12afaf532f2 100644 --- a/boards/arm/qemu_cortex_m0/nrf_timer_timer.c +++ b/boards/arm/qemu_cortex_m0/nrf_timer_timer.c @@ -232,9 +232,8 @@ uint32_t sys_clock_cycle_get_32(void) return ret; } -static int sys_clock_driver_init(const struct device *dev) +static int sys_clock_driver_init(void) { - ARG_UNUSED(dev); /* FIXME switch to 1 MHz once this is fixed in QEMU */ nrf_timer_prescaler_set(TIMER, NRF_TIMER_FREQ_2MHz); diff --git a/boards/arm/qomu/board.c b/boards/arm/qomu/board.c index e62357f204437..d6752dff91338 100644 --- a/boards/arm/qomu/board.c +++ b/boards/arm/qomu/board.c @@ -8,9 +8,8 @@ #include #include "board.h" -static int qomu_board_init(const struct device *arg) +static int qomu_board_init(void) { - ARG_UNUSED(arg); /* IO MUX setup for UART */ eos_s3_io_mux(UART_TX_PAD, UART_TX_PAD_CFG); diff --git a/boards/arm/quick_feather/board.c b/boards/arm/quick_feather/board.c index c05ca4ba9a104..cf89c208ced0d 100644 --- a/boards/arm/quick_feather/board.c +++ b/boards/arm/quick_feather/board.c @@ -8,9 +8,8 @@ #include #include -static int eos_s3_board_init(const struct device *arg) +static int eos_s3_board_init(void) { - ARG_UNUSED(arg); /* IO MUX setup for UART */ eos_s3_io_mux(UART_TX_PAD, UART_TX_PAD_CFG); diff --git a/boards/arm/reel_board/board.c b/boards/arm/reel_board/board.c index 6a3d90c6afb7c..3a94dbc057489 100644 --- a/boards/arm/reel_board/board.c +++ b/boards/arm/reel_board/board.c @@ -10,9 +10,8 @@ /* Peripheral voltage ON/OFF GPIO */ #define PERIPH_PON_PIN 0 -static int board_reel_board_init(const struct device *dev) +static int board_reel_board_init(void) { - ARG_UNUSED(dev); volatile NRF_GPIO_Type *gpio = NRF_P1; /* diff --git a/boards/arm/sparkfun_thing_plus_nrf9160/board.c b/boards/arm/sparkfun_thing_plus_nrf9160/board.c index c3ae0c37c1e5b..b582182e6fcf8 100644 --- a/boards/arm/sparkfun_thing_plus_nrf9160/board.c +++ b/boards/arm/sparkfun_thing_plus_nrf9160/board.c @@ -10,9 +10,8 @@ #define GPIO0 DT_NODELABEL(gpio0) #define POWER_LATCH_PIN 31 -static int board_sparkfun_thing_plus_nrf9160_init(const struct device *dev) +static int board_sparkfun_thing_plus_nrf9160_init(void) { - ARG_UNUSED(dev); /* Get handle of the GPIO device. */ const struct device *const gpio = DEVICE_DT_GET(GPIO0); diff --git a/boards/arm/stm32l496g_disco/board_adc_vref.c b/boards/arm/stm32l496g_disco/board_adc_vref.c index 438720fd7b265..3de88bf3dd58d 100644 --- a/boards/arm/stm32l496g_disco/board_adc_vref.c +++ b/boards/arm/stm32l496g_disco/board_adc_vref.c @@ -8,7 +8,7 @@ #include #include -static int enable_adc_reference(const struct device *dev) +static int enable_adc_reference(void) { uint8_t init_status; /* VREF+ is not connected to VDDA by default */ diff --git a/boards/arm/swan_r5/board.c b/boards/arm/swan_r5/board.c index 577e153708711..51a06b7c0f4d5 100644 --- a/boards/arm/swan_r5/board.c +++ b/boards/arm/swan_r5/board.c @@ -7,12 +7,11 @@ #include #include -static int board_swan_init(const struct device *dev) +static int board_swan_init(void) { const struct gpio_dt_spec dischrg = GPIO_DT_SPEC_GET(DT_PATH(zephyr_user), dischrg_gpios); - ARG_UNUSED(dev); if (!device_is_ready(dischrg.port)) { return -ENODEV; diff --git a/boards/arm/thingy52_nrf52832/board.c b/boards/arm/thingy52_nrf52832/board.c index 18f097b657d3b..645cd4a0a3091 100644 --- a/boards/arm/thingy52_nrf52832/board.c +++ b/boards/arm/thingy52_nrf52832/board.c @@ -11,7 +11,7 @@ static const struct gpio_dt_spec ccs_gpio = GPIO_DT_SPEC_GET(DT_NODELABEL(ccs_pwr), enable_gpios); -static int pwr_ctrl_init(const struct device *dev) +static int pwr_ctrl_init(void) { int ret; diff --git a/boards/arm/thingy53_nrf5340/board.c b/boards/arm/thingy53_nrf5340/board.c index 39a194e93de1b..509ec04bdab5e 100644 --- a/boards/arm/thingy53_nrf5340/board.c +++ b/boards/arm/thingy53_nrf5340/board.c @@ -57,9 +57,8 @@ static void enable_cpunet(void) #endif /* !CONFIG_TRUSTED_EXECUTION_SECURE */ } -static int setup(const struct device *dev) +static int setup(void) { - ARG_UNUSED(dev); #if !defined(CONFIG_TRUSTED_EXECUTION_SECURE) if (IS_ENABLED(CONFIG_SENSOR)) { diff --git a/boards/arm/twr_ke18f/pinmux.c b/boards/arm/twr_ke18f/pinmux.c index e6583c561c35a..72eff0697299b 100644 --- a/boards/arm/twr_ke18f/pinmux.c +++ b/boards/arm/twr_ke18f/pinmux.c @@ -8,9 +8,8 @@ #include #include -static int twr_ke18f_pinmux_init(const struct device *dev) +static int twr_ke18f_pinmux_init(void) { - ARG_UNUSED(dev); int err; /* Used by pinctrl functions */ diff --git a/boards/arm/ubx_bmd345eval_nrf52840/board.c b/boards/arm/ubx_bmd345eval_nrf52840/board.c index 7b3a197d99675..879672443b7d5 100644 --- a/boards/arm/ubx_bmd345eval_nrf52840/board.c +++ b/boards/arm/ubx_bmd345eval_nrf52840/board.c @@ -11,9 +11,8 @@ #define MODE_PIN 4 /* P1.04 */ #define A_SEL_PIN 2 /* P1.02 */ -static int bmd345_fem_init(const struct device *dev) +static int bmd345_fem_init(void) { - ARG_UNUSED(dev); int ret; const struct device *mode_asel_port_dev; diff --git a/boards/arm/v2m_beetle/pinmux.c b/boards/arm/v2m_beetle/pinmux.c index 272adec76f03f..856239761b806 100644 --- a/boards/arm/v2m_beetle/pinmux.c +++ b/boards/arm/v2m_beetle/pinmux.c @@ -132,9 +132,8 @@ static void arm_v2m_beetle_pinmux_defaults(void) CMSDK_AHB_GPIO1_DEV->data |= (0x1 << 15); } -static int arm_v2m_beetle_pinmux_init(const struct device *port) +static int arm_v2m_beetle_pinmux_init(void) { - ARG_UNUSED(port); arm_v2m_beetle_pinmux_defaults(); diff --git a/boards/arm/v2m_musca_b1/pinmux.c b/boards/arm/v2m_musca_b1/pinmux.c index 1d7238dc577f4..443d462eb2126 100644 --- a/boards/arm/v2m_musca_b1/pinmux.c +++ b/boards/arm/v2m_musca_b1/pinmux.c @@ -55,9 +55,8 @@ static void arm_musca_b1_pinmux_defaults(void) } #endif -static int arm_musca_pinmux_init(const struct device *port) +static int arm_musca_pinmux_init(void) { - ARG_UNUSED(port); arm_musca_b1_pinmux_defaults(); diff --git a/boards/arm/v2m_musca_s1/pinmux.c b/boards/arm/v2m_musca_s1/pinmux.c index cdf74172dcd0e..a1a1a4ad2523a 100644 --- a/boards/arm/v2m_musca_s1/pinmux.c +++ b/boards/arm/v2m_musca_s1/pinmux.c @@ -54,9 +54,8 @@ static void arm_musca_s1_pinmux_defaults(void) } #endif -static int arm_musca_pinmux_init(const struct device *port) +static int arm_musca_pinmux_init(void) { - ARG_UNUSED(port); arm_musca_s1_pinmux_defaults(); diff --git a/boards/common/actinius/actinius_board_common.c b/boards/common/actinius/actinius_board_common.c index b0a770319ca1a..a18f88a0f77b8 100644 --- a/boards/common/actinius/actinius_board_common.c +++ b/boards/common/actinius/actinius_board_common.c @@ -65,9 +65,8 @@ static int actinius_board_set_charger_enable(void) } #endif /* CHARGER_ENABLE */ -static int actinius_board_init(const struct device *dev) +static int actinius_board_init(void) { - ARG_UNUSED(dev); int result = 0; diff --git a/boards/posix/nrf52_bsim/bstests_entry.c b/boards/posix/nrf52_bsim/bstests_entry.c index 556073c5f9e5d..1f1208b9de200 100644 --- a/boards/posix/nrf52_bsim/bstests_entry.c +++ b/boards/posix/nrf52_bsim/bstests_entry.c @@ -191,18 +191,16 @@ bool bst_irq_sniffer(int irq_number) } } -static int bst_fake_device_driver_pre2_init(const struct device *arg) +static int bst_fake_device_driver_pre2_init(void) { - ARG_UNUSED(arg); if (current_test && current_test->test_fake_ddriver_prekernel_f) { current_test->test_fake_ddriver_prekernel_f(); } return 0; } -static int bst_fake_device_driver_post_init(const struct device *arg) +static int bst_fake_device_driver_post_init(void) { - ARG_UNUSED(arg); if (current_test && current_test->test_fake_ddriver_postkernel_f) { current_test->test_fake_ddriver_postkernel_f(); } diff --git a/boards/posix/nrf52_bsim/trace_hook.c b/boards/posix/nrf52_bsim/trace_hook.c index a54667d5f34cc..cd2f36ce4fb9a 100644 --- a/boards/posix/nrf52_bsim/trace_hook.c +++ b/boards/posix/nrf52_bsim/trace_hook.c @@ -59,9 +59,8 @@ void posix_flush_stdout(void) * * @return 0 if successful, otherwise failed. */ -static int printk_init(const struct device *arg) +static int printk_init(void) { - ARG_UNUSED(arg); extern void __printk_hook_install(int (*fn)(int)); __printk_hook_install(print_char); diff --git a/boards/riscv/rv32m1_vega/board.c b/boards/riscv/rv32m1_vega/board.c index ef201ec70bb45..19ddc931d6177 100644 --- a/boards/riscv/rv32m1_vega/board.c +++ b/boards/riscv/rv32m1_vega/board.c @@ -8,13 +8,12 @@ #include #include -static int rv32m1_vega_board_init(const struct device *dev) +static int rv32m1_vega_board_init(void) { const struct device *const gpiob = DEVICE_DT_GET(DT_NODELABEL(gpiob)); const struct device *const gpioc = DEVICE_DT_GET(DT_NODELABEL(gpioc)); const struct device *const gpiod = DEVICE_DT_GET(DT_NODELABEL(gpiod)); - ARG_UNUSED(dev); __ASSERT_NO_MSG(device_is_ready(gpiob)); __ASSERT_NO_MSG(device_is_ready(gpioc)); diff --git a/boards/xtensa/esp32_ethernet_kit/board_init.c b/boards/xtensa/esp32_ethernet_kit/board_init.c index 230e22d4341e8..b3856fea87b43 100644 --- a/boards/xtensa/esp32_ethernet_kit/board_init.c +++ b/boards/xtensa/esp32_ethernet_kit/board_init.c @@ -8,9 +8,8 @@ #define IP101GRI_RESET_N_PIN 5 -static int board_esp32_ethernet_kit_init(const struct device *dev) +static int board_esp32_ethernet_kit_init(void) { - ARG_UNUSED(dev); const struct device *gpio = DEVICE_DT_GET(DT_NODELABEL(gpio0)); if (!device_is_ready(gpio)) { diff --git a/boards/xtensa/esp_wrover_kit/board_init.c b/boards/xtensa/esp_wrover_kit/board_init.c index c27924740cd40..981799d739f53 100644 --- a/boards/xtensa/esp_wrover_kit/board_init.c +++ b/boards/xtensa/esp_wrover_kit/board_init.c @@ -11,9 +11,8 @@ #define LED_B_PIN DT_GPIO_PIN(DT_ALIAS(led0), gpios) #define BL_PIN 5 -static int board_esp_wrover_kit_init(const struct device *dev) +static int board_esp_wrover_kit_init(void) { - ARG_UNUSED(dev); const struct device *gpio; gpio = DEVICE_DT_GET(DT_NODELABEL(gpio0)); diff --git a/boards/xtensa/heltec_wifi_lora32_v2/board_init.c b/boards/xtensa/heltec_wifi_lora32_v2/board_init.c index a32196e5b7142..8e914cf58fcdf 100644 --- a/boards/xtensa/heltec_wifi_lora32_v2/board_init.c +++ b/boards/xtensa/heltec_wifi_lora32_v2/board_init.c @@ -9,9 +9,8 @@ #define VEXT_PIN DT_GPIO_PIN(DT_NODELABEL(vext), gpios) #define OLED_RST DT_GPIO_PIN(DT_NODELABEL(oledrst), gpios) -static int board_heltec_wifi_lora32_v2_init(const struct device *dev) +static int board_heltec_wifi_lora32_v2_init(void) { - ARG_UNUSED(dev); const struct device *gpio; gpio = DEVICE_DT_GET(DT_NODELABEL(gpio0)); diff --git a/boards/xtensa/odroid_go/board_init.c b/boards/xtensa/odroid_go/board_init.c index c6d2f54a28755..db3c1afeba36d 100644 --- a/boards/xtensa/odroid_go/board_init.c +++ b/boards/xtensa/odroid_go/board_init.c @@ -8,9 +8,8 @@ #define LED_B_PIN DT_GPIO_PIN(DT_ALIAS(led0), gpios) -static int board_odroid_go_init(const struct device *dev) +static int board_odroid_go_init(void) { - ARG_UNUSED(dev); const struct device *gpio; gpio = DEVICE_DT_GET(DT_NODELABEL(gpio0)); diff --git a/doc/releases/release-notes-3.4.rst b/doc/releases/release-notes-3.4.rst index 3bddd0b1b998d..126029acfc8bc 100644 --- a/doc/releases/release-notes-3.4.rst +++ b/doc/releases/release-notes-3.4.rst @@ -147,6 +147,11 @@ Stable API changes in this release * :c:func:`bt_le_oob_set_sc_flag` for setting/clearing OOB flag in SC pairing * :c:func:`bt_le_oob_set_legacy_flag` for setting/clearing OOB flag in legacy paring +* :c:macro:`SYS_INIT` callback no longer requires a :c:struct:`device` argument. + The new callback signature is ``int f(void)``. A utility script to + automatically migrate existing projects can be found in + :zephyr_file:`scripts/utils/migrate_sys_init.py`. + New APIs in this release ======================== diff --git a/drivers/adc/adc_npcx.c b/drivers/adc/adc_npcx.c index 2f8ba074e56fc..4bd81c9ef37a1 100644 --- a/drivers/adc/adc_npcx.c +++ b/drivers/adc/adc_npcx.c @@ -740,9 +740,8 @@ struct k_work_q adc_npcx_work_q; static K_KERNEL_STACK_DEFINE(adc_npcx_work_q_stack, CONFIG_ADC_CMP_NPCX_WORKQUEUE_STACK_SIZE); -static int adc_npcx_init_cmp_work_q(const struct device *dev) +static int adc_npcx_init_cmp_work_q(void) { - ARG_UNUSED(dev); struct k_work_queue_config cfg = { .name = "adc_cmp_work", .no_yield = false, diff --git a/drivers/bluetooth/hci/h4.c b/drivers/bluetooth/hci/h4.c index c790ac475f794..c263c3f0c5d7b 100644 --- a/drivers/bluetooth/hci/h4.c +++ b/drivers/bluetooth/hci/h4.c @@ -553,9 +553,8 @@ static const struct bt_hci_driver drv = { #endif }; -static int bt_uart_init(const struct device *unused) +static int bt_uart_init(void) { - ARG_UNUSED(unused); if (!device_is_ready(h4_dev)) { return -ENODEV; diff --git a/drivers/bluetooth/hci/h5.c b/drivers/bluetooth/hci/h5.c index 3328be2f25e5e..c9395509248eb 100644 --- a/drivers/bluetooth/hci/h5.c +++ b/drivers/bluetooth/hci/h5.c @@ -767,9 +767,8 @@ static const struct bt_hci_driver drv = { .send = h5_queue, }; -static int bt_uart_init(const struct device *unused) +static int bt_uart_init(void) { - ARG_UNUSED(unused); if (!device_is_ready(h5_dev)) { return -ENODEV; diff --git a/drivers/bluetooth/hci/hci_b91.c b/drivers/bluetooth/hci/hci_b91.c index 93061e20d804d..738874596d948 100644 --- a/drivers/bluetooth/hci/hci_b91.c +++ b/drivers/bluetooth/hci/hci_b91.c @@ -241,9 +241,8 @@ static const struct bt_hci_driver drv = { #endif }; -static int bt_b91_init(const struct device *unused) +static int bt_b91_init(void) { - ARG_UNUSED(unused); bt_hci_driver_register(&drv); diff --git a/drivers/bluetooth/hci/hci_esp32.c b/drivers/bluetooth/hci/hci_esp32.c index cf7045bcd9b72..bdcdb7db99aa0 100644 --- a/drivers/bluetooth/hci/hci_esp32.c +++ b/drivers/bluetooth/hci/hci_esp32.c @@ -327,9 +327,8 @@ static const struct bt_hci_driver drv = { #endif }; -static int bt_esp32_init(const struct device *unused) +static int bt_esp32_init(void) { - ARG_UNUSED(unused); bt_hci_driver_register(&drv); diff --git a/drivers/bluetooth/hci/ipm_stm32wb.c b/drivers/bluetooth/hci/ipm_stm32wb.c index 5af02d9ee3352..e0f4ba4297477 100644 --- a/drivers/bluetooth/hci/ipm_stm32wb.c +++ b/drivers/bluetooth/hci/ipm_stm32wb.c @@ -607,11 +607,10 @@ static const struct bt_hci_driver drv = { .send = bt_ipm_send, }; -static int _bt_ipm_init(const struct device *unused) +static int _bt_ipm_init(void) { int err; - ARG_UNUSED(unused); bt_hci_driver_register(&drv); diff --git a/drivers/bluetooth/hci/rpmsg.c b/drivers/bluetooth/hci/rpmsg.c index 3898e57082186..704508d5f32d8 100644 --- a/drivers/bluetooth/hci/rpmsg.c +++ b/drivers/bluetooth/hci/rpmsg.c @@ -327,9 +327,8 @@ static const struct bt_hci_driver drv = { #endif }; -static int bt_rpmsg_init(const struct device *unused) +static int bt_rpmsg_init(void) { - ARG_UNUSED(unused); int err; diff --git a/drivers/bluetooth/hci/spi.c b/drivers/bluetooth/hci/spi.c index b40340668285e..f03fd875a691e 100644 --- a/drivers/bluetooth/hci/spi.c +++ b/drivers/bluetooth/hci/spi.c @@ -517,9 +517,8 @@ static const struct bt_hci_driver drv = { .send = bt_spi_send, }; -static int bt_spi_init(const struct device *unused) +static int bt_spi_init(void) { - ARG_UNUSED(unused); if (!spi_is_ready_dt(&bus)) { LOG_ERR("SPI device not ready"); diff --git a/drivers/bluetooth/hci/userchan.c b/drivers/bluetooth/hci/userchan.c index 2e6e0c1726c55..36135e26ba0cd 100644 --- a/drivers/bluetooth/hci/userchan.c +++ b/drivers/bluetooth/hci/userchan.c @@ -245,9 +245,8 @@ static const struct bt_hci_driver drv = { .send = uc_send, }; -static int bt_uc_init(const struct device *unused) +static int bt_uc_init(void) { - ARG_UNUSED(unused); bt_hci_driver_register(&drv); diff --git a/drivers/console/efi_console.c b/drivers/console/efi_console.c index 84ed2ebe2322b..bf10fb0999274 100644 --- a/drivers/console/efi_console.c +++ b/drivers/console/efi_console.c @@ -66,10 +66,9 @@ static void efi_console_hook_install(void) * * @return 0 if successful, otherwise failed. */ -static int efi_console_init(const struct device *arg) +static int efi_console_init(void) { - ARG_UNUSED(arg); efi_console_hook_install(); diff --git a/drivers/console/ipm_console.c b/drivers/console/ipm_console.c index 753e47115003f..a9374ef96b9f9 100644 --- a/drivers/console/ipm_console.c +++ b/drivers/console/ipm_console.c @@ -64,9 +64,8 @@ static void ipm_console_hook_install(void) __printk_hook_install(console_out); } -static int ipm_console_init(const struct device *dev) +static int ipm_console_init(void) { - ARG_UNUSED(dev); LOG_DBG("IPM console initialization"); diff --git a/drivers/console/jailhouse_debug_console.c b/drivers/console/jailhouse_debug_console.c index 3f924f0baad19..ebc2926553d2b 100644 --- a/drivers/console/jailhouse_debug_console.c +++ b/drivers/console/jailhouse_debug_console.c @@ -45,9 +45,8 @@ extern void __printk_hook_install(int (*fn)(int)); * @brief Initialize the console/debug port * @return 0 if successful, otherwise failed. */ -static int jailhouse_console_init(const struct device *arg) +static int jailhouse_console_init(void) { - ARG_UNUSED(arg); __stdout_hook_install(console_out); __printk_hook_install(console_out); return 0; diff --git a/drivers/console/native_posix_console.c b/drivers/console/native_posix_console.c index 110362debce84..3f43bad9e54eb 100644 --- a/drivers/console/native_posix_console.c +++ b/drivers/console/native_posix_console.c @@ -256,9 +256,8 @@ static void native_stdio_runner(void *p1, void *p2, void *p3) } #endif /* CONFIG_NATIVE_POSIX_STDIN_CONSOLE */ -static int native_posix_console_init(const struct device *arg) +static int native_posix_console_init(void) { - ARG_UNUSED(arg); #if defined(CONFIG_NATIVE_POSIX_STDOUT_CONSOLE) native_posix_stdout_init(); diff --git a/drivers/console/ram_console.c b/drivers/console/ram_console.c index f9e92f90c4877..4ace56f963043 100644 --- a/drivers/console/ram_console.c +++ b/drivers/console/ram_console.c @@ -26,9 +26,8 @@ static int ram_console_out(int character) return character; } -static int ram_console_init(const struct device *d) +static int ram_console_init(void) { - ARG_UNUSED(d); __printk_hook_install(ram_console_out); __stdout_hook_install(ram_console_out); diff --git a/drivers/console/rtt_console.c b/drivers/console/rtt_console.c index 057a931d692a8..9c4b5cfa5cea2 100644 --- a/drivers/console/rtt_console.c +++ b/drivers/console/rtt_console.c @@ -78,9 +78,8 @@ static int rtt_console_out(int character) return character; } -static int rtt_console_init(const struct device *d) +static int rtt_console_init(void) { - ARG_UNUSED(d); #ifdef CONFIG_PRINTK __printk_hook_install(rtt_console_out); diff --git a/drivers/console/semihost_console.c b/drivers/console/semihost_console.c index afe43b2345f40..6c7655189c0e3 100644 --- a/drivers/console/semihost_console.c +++ b/drivers/console/semihost_console.c @@ -16,9 +16,8 @@ int arch_printk_char_out(int _c) return 0; } -static int semihost_console_init(const struct device *dev) +static int semihost_console_init(void) { - ARG_UNUSED(dev); /* * The printk output callback is arch_printk_char_out by default and diff --git a/drivers/console/uart_console.c b/drivers/console/uart_console.c index c6acf50e0e296..4800180b3f87f 100644 --- a/drivers/console/uart_console.c +++ b/drivers/console/uart_console.c @@ -607,11 +607,8 @@ static void uart_console_hook_install(void) * * @return 0 if successful, otherwise failed. */ -static int uart_console_init(const struct device *arg) +static int uart_console_init(void) { - - ARG_UNUSED(arg); - if (!device_is_ready(uart_console_dev)) { return -ENODEV; } diff --git a/drivers/console/uart_mux.c b/drivers/console/uart_mux.c index 74d0e08070ad0..d303d8d86abf7 100644 --- a/drivers/console/uart_mux.c +++ b/drivers/console/uart_mux.c @@ -894,9 +894,8 @@ LISTIFY(CONFIG_UART_MUX_DEVICE_COUNT, DEFINE_UART_MUX_CFG_DATA, (;), _); LISTIFY(CONFIG_UART_MUX_DEVICE_COUNT, DEFINE_UART_MUX_DEV_DATA, (;), _); LISTIFY(CONFIG_UART_MUX_DEVICE_COUNT, DEFINE_UART_MUX_DEVICE, (;), _); -static int init_uart_mux(const struct device *dev) +static int init_uart_mux(void) { - ARG_UNUSED(dev); k_work_queue_start(&uart_mux_workq, uart_mux_stack, K_KERNEL_STACK_SIZEOF(uart_mux_stack), diff --git a/drivers/console/winstream_console.c b/drivers/console/winstream_console.c index 0027e5ef16efe..8d574bbe3a2a8 100644 --- a/drivers/console/winstream_console.c +++ b/drivers/console/winstream_console.c @@ -46,9 +46,8 @@ int arch_printk_char_out(int c) return 0; } -static int winstream_console_init(const struct device *d) +static int winstream_console_init(void) { - ARG_UNUSED(d); const struct device *dev = DEVICE_DT_GET(DT_CHOSEN(zephyr_console)); if (!device_is_ready(dev)) { diff --git a/drivers/console/xtensa_sim_console.c b/drivers/console/xtensa_sim_console.c index a2169dc6b660d..16e48eeee484f 100644 --- a/drivers/console/xtensa_sim_console.c +++ b/drivers/console/xtensa_sim_console.c @@ -62,9 +62,8 @@ static void xt_sim_console_hook_install(void) * @brief Initialize the console/debug port * @return 0 if successful, otherwise failed. */ -static int xt_sim_console_init(const struct device *arg) +static int xt_sim_console_init(void) { - ARG_UNUSED(arg); xt_sim_console_hook_install(); return 0; } diff --git a/drivers/disk/flashdisk.c b/drivers/disk/flashdisk.c index dd491297ff971..6336ad4dfd03e 100644 --- a/drivers/disk/flashdisk.c +++ b/drivers/disk/flashdisk.c @@ -462,9 +462,8 @@ DT_INST_FOREACH_STATUS_OKAY(VERIFY_CACHE_SIZE_IS_NOT_ZERO_IF_NOT_READ_ONLY) " has cache size which is not a multiple of its sector size"); DT_INST_FOREACH_STATUS_OKAY(VERIFY_CACHE_SIZE_IS_MULTIPLY_OF_SECTOR_SIZE) -static int disk_flash_init(const struct device *dev) +static int disk_flash_init(void) { - ARG_UNUSED(dev); int err = 0; for (int i = 0; i < ARRAY_SIZE(flash_disks); i++) { diff --git a/drivers/disk/ramdisk.c b/drivers/disk/ramdisk.c index 0cd1432c80ba7..7c9c8789c85df 100644 --- a/drivers/disk/ramdisk.c +++ b/drivers/disk/ramdisk.c @@ -102,9 +102,8 @@ static struct disk_info ram_disk = { .ops = &ram_disk_ops, }; -static int disk_ram_init(const struct device *dev) +static int disk_ram_init(void) { - ARG_UNUSED(dev); return disk_access_register(&ram_disk); } diff --git a/drivers/display/mb_display.c b/drivers/display/mb_display.c index 540a24fa524f3..0985c6d2bbfd0 100644 --- a/drivers/display/mb_display.c +++ b/drivers/display/mb_display.c @@ -396,9 +396,8 @@ struct mb_display *mb_display_get(void) return &display; } -static int mb_display_init_on_boot(const struct device *dev) +static int mb_display_init_on_boot(void) { - ARG_UNUSED(dev); display.lm_dev = DEVICE_DT_GET_ONE(nordic_nrf_led_matrix); if (!device_is_ready(display.lm_dev)) { diff --git a/drivers/gpio/gpio_hogs.c b/drivers/gpio/gpio_hogs.c index f1558f2974e15..407435e3468dd 100644 --- a/drivers/gpio/gpio_hogs.c +++ b/drivers/gpio/gpio_hogs.c @@ -90,7 +90,7 @@ static const struct gpio_hogs gpio_hogs[] = { DT_FOREACH_STATUS_OKAY_NODE(GPIO_HOGS_COND_INIT) }; -static int gpio_hogs_init(const struct device *dev) +static int gpio_hogs_init(void) { const struct gpio_hogs *hogs; const struct gpio_hog_dt_spec *spec; @@ -98,7 +98,6 @@ static int gpio_hogs_init(const struct device *dev) int i; int j; - ARG_UNUSED(dev); for (i = 0; i < ARRAY_SIZE(gpio_hogs); i++) { hogs = &gpio_hogs[i]; diff --git a/drivers/gpio/gpio_ite_it8xxx2.c b/drivers/gpio/gpio_ite_it8xxx2.c index d691e81da74ad..e55065b17b062 100644 --- a/drivers/gpio/gpio_ite_it8xxx2.c +++ b/drivers/gpio/gpio_ite_it8xxx2.c @@ -722,9 +722,8 @@ DEVICE_DT_INST_DEFINE(inst, \ DT_INST_FOREACH_STATUS_OKAY(GPIO_ITE_DEV_CFG_DATA) -static int gpio_it8xxx2_init_set(const struct device *arg) +static int gpio_it8xxx2_init_set(void) { - ARG_UNUSED(arg); if (IS_ENABLED(CONFIG_SOC_IT8XXX2_GPIO_GROUP_K_L_DEFAULT_PULL_DOWN)) { const struct device *const gpiok = DEVICE_DT_GET(DT_NODELABEL(gpiok)); diff --git a/drivers/hwinfo/hwinfo_sam.c b/drivers/hwinfo/hwinfo_sam.c index e97fc007d1ff1..2c4f759d6e014 100644 --- a/drivers/hwinfo/hwinfo_sam.c +++ b/drivers/hwinfo/hwinfo_sam.c @@ -62,7 +62,7 @@ __ramfunc static void hwinfo_sam_read_device_id(void) } } -static int hwinfo_sam_init(const struct device *arg) +static int hwinfo_sam_init(void) { Efc *efc = (Efc *)DT_REG_ADDR(DT_INST(0, atmel_sam_flash_controller)); uint32_t fmr; diff --git a/drivers/hwinfo/hwinfo_sam_rstc.c b/drivers/hwinfo/hwinfo_sam_rstc.c index 68020b05dea94..56cabb9a948b5 100644 --- a/drivers/hwinfo/hwinfo_sam_rstc.c +++ b/drivers/hwinfo/hwinfo_sam_rstc.c @@ -53,13 +53,12 @@ int z_impl_hwinfo_get_supported_reset_cause(uint32_t *supported) return 0; } -static int hwinfo_rstc_init(const struct device *dev) +static int hwinfo_rstc_init(void) { Rstc *regs = (Rstc *)DT_INST_REG_ADDR(0); const struct atmel_sam_pmc_config clock_cfg = SAM_DT_INST_CLOCK_PMC_CFG(0); uint32_t mode; - ARG_UNUSED(dev); /* Enable RSTC in PMC */ (void)clock_control_on(SAM_DT_PMC_CONTROLLER, diff --git a/drivers/i3c/i3c_ibi_workq.c b/drivers/i3c/i3c_ibi_workq.c index 4df003b3e7b3a..bc1ec94f0f5de 100644 --- a/drivers/i3c/i3c_ibi_workq.c +++ b/drivers/i3c/i3c_ibi_workq.c @@ -207,9 +207,8 @@ static void i3c_ibi_work_handler(struct k_work *work) } } -static int i3c_ibi_work_q_init(const struct device *dev) +static int i3c_ibi_work_q_init(void) { - ARG_UNUSED(dev); struct k_work_queue_config cfg = { .name = "i3c_ibi_workq", .no_yield = true, diff --git a/drivers/interrupt_controller/intc_arcv2_irq_unit.c b/drivers/interrupt_controller/intc_arcv2_irq_unit.c index c3acee26ea71f..5c06d93689353 100644 --- a/drivers/interrupt_controller/intc_arcv2_irq_unit.c +++ b/drivers/interrupt_controller/intc_arcv2_irq_unit.c @@ -58,7 +58,7 @@ static void arc_shared_intc_init(void) } /* Allow to schedule IRQ to all cores after we bring up all secondary cores */ -static int arc_shared_intc_update_post_smp(const struct device *unused) +static int arc_shared_intc_update_post_smp(void) { __ASSERT(z_arc_v2_core_id() == ARC_MP_PRIMARY_CPU_ID, "idu interrupts must be updated from primary core"); @@ -134,7 +134,7 @@ void arc_core_private_intc_init(void) #endif /* CONFIG_ARC_CONNECT */ } -static int arc_irq_init(const struct device *unused) +static int arc_irq_init(void) { #ifdef CONFIG_ARC_CONNECT arc_shared_intc_init(); diff --git a/drivers/interrupt_controller/intc_gic.c b/drivers/interrupt_controller/intc_gic.c index 1c431c4e4cd67..a62de17fb59a4 100644 --- a/drivers/interrupt_controller/intc_gic.c +++ b/drivers/interrupt_controller/intc_gic.c @@ -228,9 +228,8 @@ static void gic_cpu_init(void) /** * @brief Initialize the GIC device driver */ -int arm_gic_init(const struct device *unused) +int arm_gic_init(void) { - ARG_UNUSED(unused); /* Init of Distributor interface registers */ gic_dist_init(); diff --git a/drivers/interrupt_controller/intc_gicv3.c b/drivers/interrupt_controller/intc_gicv3.c index 8127e36ec2594..26e9b974394fb 100644 --- a/drivers/interrupt_controller/intc_gicv3.c +++ b/drivers/interrupt_controller/intc_gicv3.c @@ -565,9 +565,8 @@ static void __arm_gic_init(void) gicv3_cpuif_init(); } -int arm_gic_init(const struct device *unused) +int arm_gic_init(void) { - ARG_UNUSED(unused); gicv3_dist_init(); diff --git a/drivers/interrupt_controller/intc_irqmp.c b/drivers/interrupt_controller/intc_irqmp.c index b15ec8fff33e9..ce2ffc9d6ae23 100644 --- a/drivers/interrupt_controller/intc_irqmp.c +++ b/drivers/interrupt_controller/intc_irqmp.c @@ -108,9 +108,8 @@ int z_sparc_int_get_source(int irl) return source; } -static int irqmp_init(const struct device *dev) +static int irqmp_init(void) { - ARG_UNUSED(dev); volatile struct irqmp_regs *regs = get_irqmp_regs(); regs->ilevel = 0; diff --git a/drivers/interrupt_controller/intc_nuclei_eclic.c b/drivers/interrupt_controller/intc_nuclei_eclic.c index c5500b8b261f0..19f1d682f55c7 100644 --- a/drivers/interrupt_controller/intc_nuclei_eclic.c +++ b/drivers/interrupt_controller/intc_nuclei_eclic.c @@ -159,7 +159,7 @@ void riscv_clic_irq_priority_set(uint32_t irq, uint32_t pri, uint32_t flags) ECLIC_CTRL[irq].INTATTR.b.trg = (uint8_t)(flags & CLIC_INTATTR_TRIG_Msk); } -static int nuclei_eclic_init(const struct device *dev) +static int nuclei_eclic_init(void) { /* check hardware support required interrupt levels */ __ASSERT_NO_MSG(ECLIC_INFO.b.intctlbits >= INTERRUPT_LEVEL); diff --git a/drivers/interrupt_controller/intc_plic.c b/drivers/interrupt_controller/intc_plic.c index 7edc62338ba03..9fdd1fd273372 100644 --- a/drivers/interrupt_controller/intc_plic.c +++ b/drivers/interrupt_controller/intc_plic.c @@ -172,9 +172,8 @@ static void plic_irq_handler(const void *arg) * * @retval 0 on success. */ -static int plic_init(const struct device *dev) +static int plic_init(void) { - ARG_UNUSED(dev); volatile uint32_t *en = (volatile uint32_t *)PLIC_IRQ_EN; volatile uint32_t *prio = (volatile uint32_t *)PLIC_PRIO; diff --git a/drivers/interrupt_controller/intc_swerv_pic.c b/drivers/interrupt_controller/intc_swerv_pic.c index 2cd80b8dd1e5f..65266cf8f9f2f 100644 --- a/drivers/interrupt_controller/intc_swerv_pic.c +++ b/drivers/interrupt_controller/intc_swerv_pic.c @@ -143,9 +143,8 @@ static void swerv_pic_irq_handler(const void *arg) swerv_pic_write(SWERV_PIC_meigwclr(irq), 0); } -static int swerv_pic_init(const struct device *dev) +static int swerv_pic_init(void) { - ARG_UNUSED(dev); int i; /* Init priority order to 0, 0=lowest to 15=highest */ diff --git a/drivers/interrupt_controller/intc_vexriscv_litex.c b/drivers/interrupt_controller/intc_vexriscv_litex.c index b28b05ff64f7c..719bd98ec369f 100644 --- a/drivers/interrupt_controller/intc_vexriscv_litex.c +++ b/drivers/interrupt_controller/intc_vexriscv_litex.c @@ -120,9 +120,8 @@ int arch_irq_is_enabled(unsigned int irq) return vexriscv_litex_irq_getmask() & (1 << irq); } -static int vexriscv_litex_irq_init(const struct device *dev) +static int vexriscv_litex_irq_init(void) { - ARG_UNUSED(dev); __asm__ volatile ("csrrs x0, mie, %0" :: "r"(1 << RISCV_MACHINE_EXT_IRQ)); vexriscv_litex_irq_setie(1); diff --git a/drivers/ipm/ipm_cavs_idc.c b/drivers/ipm/ipm_cavs_idc.c index d330c07971170..5793d2e4b7065 100644 --- a/drivers/ipm/ipm_cavs_idc.c +++ b/drivers/ipm/ipm_cavs_idc.c @@ -228,7 +228,7 @@ DEVICE_DT_INST_DEFINE(0, &cavs_idc_init, NULL, &cavs_idc_driver_api); #ifdef CONFIG_SCHED_IPI_SUPPORTED -int cavs_idc_smp_init(const struct device *dev) +int cavs_idc_smp_init(void) { /* Enable IDC for scheduler IPI */ cavs_idc_set_enabled(dev, 1); diff --git a/drivers/pcie/host/pcie.c b/drivers/pcie/host/pcie.c index 7a4aa4a5985e5..6d89dcbb72b41 100644 --- a/drivers/pcie/host/pcie.c +++ b/drivers/pcie/host/pcie.c @@ -505,7 +505,7 @@ static bool pcie_dev_cb(pcie_bdf_t bdf, pcie_id_t id, void *cb_data) return (data->found != data->max_dev); } -static int pcie_init(const struct device *dev) +static int pcie_init(void) { struct scan_data data; struct pcie_scan_opt opt = { @@ -514,7 +514,6 @@ static int pcie_init(const struct device *dev) .flags = PCIE_SCAN_RECURSIVE, }; - ARG_UNUSED(dev); STRUCT_SECTION_COUNT(pcie_dev, &data.max_dev); /* Don't bother calling pcie_scan() if there are no devices to look for */ diff --git a/drivers/pinctrl/pinctrl_b91.c b/drivers/pinctrl/pinctrl_b91.c index fcf2bece9bb6c..66442e7b01064 100644 --- a/drivers/pinctrl/pinctrl_b91.c +++ b/drivers/pinctrl/pinctrl_b91.c @@ -66,9 +66,8 @@ ((pin & 0xf0) ? 1 : 0))) /* Pinctrl driver initialization */ -static int pinctrl_b91_init(const struct device *dev) +static int pinctrl_b91_init(void) { - ARG_UNUSED(dev); /* set pad_mul_sel register value from dts */ reg_gpio_pad_mul_sel |= DT_INST_PROP(0, pad_mul_sel); diff --git a/drivers/pinctrl/pinctrl_gd32_afio.c b/drivers/pinctrl/pinctrl_gd32_afio.c index 6d5ae57c32e0f..f8dcb67381569 100644 --- a/drivers/pinctrl/pinctrl_gd32_afio.c +++ b/drivers/pinctrl/pinctrl_gd32_afio.c @@ -62,11 +62,10 @@ static const uint16_t gd32_port_clkids[] = { * * @retval 0 Always */ -static int afio_init(const struct device *dev) +static int afio_init(void) { uint16_t clkid = DT_CLOCKS_CELL(AFIO_NODE, id); - ARG_UNUSED(dev); (void)clock_control_on(GD32_CLOCK_CONTROLLER, (clock_control_subsys_t)&clkid); diff --git a/drivers/pinctrl/pinctrl_imx.c b/drivers/pinctrl/pinctrl_imx.c index 866bfdb3ba716..c33a17f236b4b 100644 --- a/drivers/pinctrl/pinctrl_imx.c +++ b/drivers/pinctrl/pinctrl_imx.c @@ -60,9 +60,8 @@ int pinctrl_configure_pins(const pinctrl_soc_pin_t *pins, uint8_t pin_cnt, return 0; } -static int imx_pinctrl_init(const struct device *dev) +static int imx_pinctrl_init(void) { - ARG_UNUSED(dev); #ifdef CONFIG_SOC_SERIES_IMX_RT CLOCK_EnableClock(kCLOCK_Iomuxc); #ifdef CONFIG_SOC_SERIES_IMX_RT10XX diff --git a/drivers/pinctrl/pinctrl_lpc_iocon.c b/drivers/pinctrl/pinctrl_lpc_iocon.c index d1dd5895aa3fd..3d304bbeaa3be 100644 --- a/drivers/pinctrl/pinctrl_lpc_iocon.c +++ b/drivers/pinctrl/pinctrl_lpc_iocon.c @@ -50,9 +50,8 @@ int pinctrl_configure_pins(const pinctrl_soc_pin_t *pins, uint8_t pin_cnt, #if defined(CONFIG_SOC_FAMILY_LPC) && !defined(CONFIG_SOC_SERIES_LPC11U6X) /* LPC family (except 11u6x) needs iocon clock to be enabled */ -static int pinctrl_clock_init(const struct device *dev) +static int pinctrl_clock_init(void) { - ARG_UNUSED(dev); /* Enable IOCon clock */ CLOCK_EnableClock(kCLOCK_Iocon); return 0; diff --git a/drivers/pinctrl/pinctrl_stm32.c b/drivers/pinctrl/pinctrl_stm32.c index 476b8d4d4637d..dd3db79086867 100644 --- a/drivers/pinctrl/pinctrl_stm32.c +++ b/drivers/pinctrl/pinctrl_stm32.c @@ -74,9 +74,8 @@ static const size_t gpio_ports_cnt = ARRAY_SIZE(gpio_ports); #if REMAP_PA11 || REMAP_PA12 || REMAP_PA11_PA12 -int stm32_pinmux_init_remap(const struct device *dev) +int stm32_pinmux_init_remap(void) { - ARG_UNUSED(dev); #if REMAP_PA11 || REMAP_PA12 @@ -117,9 +116,8 @@ SYS_INIT(stm32_pinmux_init_remap, PRE_KERNEL_1, #if ((DT_NODE_HAS_PROP(DT_NODELABEL(pinctrl), swj_cfg)) && \ (DT_ENUM_IDX(DT_NODELABEL(pinctrl), swj_cfg) != 0)) -static int stm32f1_swj_cfg_init(const struct device *dev) +static int stm32f1_swj_cfg_init(void) { - ARG_UNUSED(dev); LL_APB2_GRP1_EnableClock(LL_APB2_GRP1_PERIPH_AFIO); diff --git a/drivers/sensor/ite_vcmp_it8xxx2/vcmp_ite_it8xxx2.c b/drivers/sensor/ite_vcmp_it8xxx2/vcmp_ite_it8xxx2.c index 2d3a04747c97e..3a40c574a7f8d 100644 --- a/drivers/sensor/ite_vcmp_it8xxx2/vcmp_ite_it8xxx2.c +++ b/drivers/sensor/ite_vcmp_it8xxx2/vcmp_ite_it8xxx2.c @@ -364,9 +364,8 @@ struct k_work_q vcmp_it8xxx2_work_q; static K_KERNEL_STACK_DEFINE(vcmp_it8xxx2_work_q_stack, CONFIG_VCMP_IT8XXX2_WORKQUEUE_STACK_SIZE); -static int vcmp_it8xxx2_init_work_q(const struct device *dev) +static int vcmp_it8xxx2_init_work_q(void) { - ARG_UNUSED(dev); struct k_work_queue_config cfg = { .name = "vcmp_work", .no_yield = false, diff --git a/drivers/serial/uart_hvc_xen.c b/drivers/serial/uart_hvc_xen.c index 478a1e0b39933..2768716de0aae 100644 --- a/drivers/serial/uart_hvc_xen.c +++ b/drivers/serial/uart_hvc_xen.c @@ -280,9 +280,8 @@ int xen_consoleio_putc(int c) -int consoleio_hooks_set(const struct device *dev) +int consoleio_hooks_set(void) { - ARG_UNUSED(dev); /* Will be replaced with poll_in/poll_out by uart_console.c later on boot */ __stdout_hook_install(xen_consoleio_putc); diff --git a/drivers/timer/altera_avalon_timer_hal.c b/drivers/timer/altera_avalon_timer_hal.c index c1d58a8ad8248..f2dc1082f33e0 100644 --- a/drivers/timer/altera_avalon_timer_hal.c +++ b/drivers/timer/altera_avalon_timer_hal.c @@ -73,9 +73,8 @@ uint32_t sys_clock_elapsed(void) return 0; } -static int sys_clock_driver_init(const struct device *dev) +static int sys_clock_driver_init(void) { - ARG_UNUSED(dev); IOWR_ALTERA_AVALON_TIMER_PERIODL(TIMER_0_BASE, k_ticks_to_cyc_floor32(1) & 0xFFFF); diff --git a/drivers/timer/apic_timer.c b/drivers/timer/apic_timer.c index 9282cb706ba99..55e3da8b3240b 100644 --- a/drivers/timer/apic_timer.c +++ b/drivers/timer/apic_timer.c @@ -218,11 +218,10 @@ uint32_t sys_clock_cycle_get_32(void) #endif -static int sys_clock_driver_init(const struct device *dev) +static int sys_clock_driver_init(void) { uint32_t val; - ARG_UNUSED(dev); val = x86_read_loapic(LOAPIC_TIMER_CONFIG); /* set divider */ val &= ~DCR_DIVIDER_MASK; diff --git a/drivers/timer/apic_tsc.c b/drivers/timer/apic_tsc.c index 81c9acaf76170..d3c37ff4ac8a9 100644 --- a/drivers/timer/apic_tsc.c +++ b/drivers/timer/apic_tsc.c @@ -156,7 +156,7 @@ static inline void cpuid(uint32_t *eax, uint32_t *ebx, uint32_t *ecx, uint32_t * : "a"(*eax), "c"(*ecx)); } -static int sys_clock_driver_init(const struct device *dev) +static int sys_clock_driver_init(void) { #ifdef CONFIG_ASSERT uint32_t eax, ebx, ecx, edx; diff --git a/drivers/timer/arcv2_timer0.c b/drivers/timer/arcv2_timer0.c index 5ede2d438b328..d38f80edb38a8 100644 --- a/drivers/timer/arcv2_timer0.c +++ b/drivers/timer/arcv2_timer0.c @@ -414,9 +414,8 @@ void smp_timer_init(void) * * @return 0 */ -static int sys_clock_driver_init(const struct device *dev) +static int sys_clock_driver_init(void) { - ARG_UNUSED(dev); /* ensure that the timer will not generate interrupts */ timer0_control_register_set(0); diff --git a/drivers/timer/arm_arch_timer.c b/drivers/timer/arm_arch_timer.c index d030958812b24..4a62c52de918e 100644 --- a/drivers/timer/arm_arch_timer.c +++ b/drivers/timer/arm_arch_timer.c @@ -197,9 +197,8 @@ void smp_timer_init(void) } #endif -static int sys_clock_driver_init(const struct device *dev) +static int sys_clock_driver_init(void) { - ARG_UNUSED(dev); IRQ_CONNECT(ARM_ARCH_TIMER_IRQ, ARM_ARCH_TIMER_PRIO, arm_arch_timer_compare_isr, NULL, ARM_ARCH_TIMER_FLAGS); diff --git a/drivers/timer/cc13x2_cc26x2_rtc_timer.c b/drivers/timer/cc13x2_cc26x2_rtc_timer.c index 99981fb411cdd..f07b09fee3d09 100644 --- a/drivers/timer/cc13x2_cc26x2_rtc_timer.c +++ b/drivers/timer/cc13x2_cc26x2_rtc_timer.c @@ -233,9 +233,8 @@ uint64_t sys_clock_cycle_get_64(void) return AONRTCCurrent64BitValueGet() / RTC_COUNTS_PER_CYCLE; } -static int sys_clock_driver_init(const struct device *dev) +static int sys_clock_driver_init(void) { - ARG_UNUSED(dev); rtc_last = 0U; diff --git a/drivers/timer/cortex_m_systick.c b/drivers/timer/cortex_m_systick.c index cb95845cd6b87..791478a570dee 100644 --- a/drivers/timer/cortex_m_systick.c +++ b/drivers/timer/cortex_m_systick.c @@ -267,9 +267,8 @@ void sys_clock_disable(void) SysTick->CTRL &= ~SysTick_CTRL_ENABLE_Msk; } -static int sys_clock_driver_init(const struct device *dev) +static int sys_clock_driver_init(void) { - ARG_UNUSED(dev); NVIC_SetPriority(SysTick_IRQn, _IRQ_PRIO_OFFSET); last_load = CYC_PER_TICK - 1; diff --git a/drivers/timer/esp32c3_sys_timer.c b/drivers/timer/esp32c3_sys_timer.c index f239de5faad2a..997465407785e 100644 --- a/drivers/timer/esp32c3_sys_timer.c +++ b/drivers/timer/esp32c3_sys_timer.c @@ -135,9 +135,8 @@ uint64_t sys_clock_cycle_get_64(void) return get_systimer_alarm(); } -static int sys_clock_driver_init(const struct device *dev) +static int sys_clock_driver_init(void) { - ARG_UNUSED(dev); esp_intr_alloc(DT_IRQN(DT_NODELABEL(systimer0)), 0, diff --git a/drivers/timer/hpet.c b/drivers/timer/hpet.c index 5b8233767081f..f51b0c1e7735e 100644 --- a/drivers/timer/hpet.c +++ b/drivers/timer/hpet.c @@ -413,12 +413,11 @@ void sys_clock_idle_exit(void) } __boot_func -static int sys_clock_driver_init(const struct device *dev) +static int sys_clock_driver_init(void) { extern int z_clock_hw_cycles_per_sec; uint32_t hz, reg; - ARG_UNUSED(dev); ARG_UNUSED(hz); ARG_UNUSED(z_clock_hw_cycles_per_sec); diff --git a/drivers/timer/intel_adsp_timer.c b/drivers/timer/intel_adsp_timer.c index 178dd4bbf8242..2afc6b10406d2 100644 --- a/drivers/timer/intel_adsp_timer.c +++ b/drivers/timer/intel_adsp_timer.c @@ -214,7 +214,7 @@ void smp_timer_init(void) } /* Runs on core 0 only */ -static int sys_clock_driver_init(const struct device *dev) +static int sys_clock_driver_init(void) { uint64_t curr = count(); diff --git a/drivers/timer/ite_it8xxx2_timer.c b/drivers/timer/ite_it8xxx2_timer.c index 0325930bd65ab..47b8a3aaf26e2 100644 --- a/drivers/timer/ite_it8xxx2_timer.c +++ b/drivers/timer/ite_it8xxx2_timer.c @@ -381,11 +381,10 @@ static int timer_init(enum ext_timer_idx ext_timer, return 0; } -static int sys_clock_driver_init(const struct device *dev) +static int sys_clock_driver_init(void) { int ret; - ARG_UNUSED(dev); /* Enable 32-bit free run timer overflow interrupt */ IRQ_CONNECT(FREE_RUN_TIMER_IRQ, 0, free_run_timer_overflow_isr, NULL, diff --git a/drivers/timer/leon_gptimer.c b/drivers/timer/leon_gptimer.c index f6c7a294f1054..a223d8e1533f2 100644 --- a/drivers/timer/leon_gptimer.c +++ b/drivers/timer/leon_gptimer.c @@ -103,9 +103,8 @@ static void init_downcounter(volatile struct gptimer_timer_regs *tmr) tmr->ctrl = GPTIMER_CTRL_LD | GPTIMER_CTRL_RS | GPTIMER_CTRL_EN; } -static int sys_clock_driver_init(const struct device *dev) +static int sys_clock_driver_init(void) { - ARG_UNUSED(dev); const int timer_interrupt = get_timer_irq(); volatile struct gptimer_regs *regs = get_regs(); volatile struct gptimer_timer_regs *tmr = ®s->timer[0]; diff --git a/drivers/timer/litex_timer.c b/drivers/timer/litex_timer.c index 5ba70e1ee9d7c..a4ba243530554 100644 --- a/drivers/timer/litex_timer.c +++ b/drivers/timer/litex_timer.c @@ -77,9 +77,8 @@ uint32_t sys_clock_elapsed(void) return 0; } -static int sys_clock_driver_init(const struct device *dev) +static int sys_clock_driver_init(void) { - ARG_UNUSED(dev); IRQ_CONNECT(TIMER_IRQ, DT_INST_IRQ(0, priority), litex_timer_irq_handler, NULL, 0); irq_enable(TIMER_IRQ); diff --git a/drivers/timer/mchp_xec_rtos_timer.c b/drivers/timer/mchp_xec_rtos_timer.c index 848a7e930e7e3..65d11a2cfd53f 100644 --- a/drivers/timer/mchp_xec_rtos_timer.c +++ b/drivers/timer/mchp_xec_rtos_timer.c @@ -398,9 +398,8 @@ void arch_busy_wait(uint32_t usec_to_wait) } #endif -static int sys_clock_driver_init(const struct device *dev) +static int sys_clock_driver_init(void) { - ARG_UNUSED(dev); #ifdef CONFIG_TICKLESS_KERNEL cached_icr = MAX_TICKS; diff --git a/drivers/timer/mcux_gpt_timer.c b/drivers/timer/mcux_gpt_timer.c index 94e3b8adf87f4..a7718fefaacc6 100644 --- a/drivers/timer/mcux_gpt_timer.c +++ b/drivers/timer/mcux_gpt_timer.c @@ -191,11 +191,10 @@ uint32_t sys_clock_cycle_get_32(void) * * Enable the hw timer, setting its tick period, and setup its interrupt */ -int sys_clock_driver_init(const struct device *dev) +int sys_clock_driver_init(void) { gpt_config_t gpt_config; - ARG_UNUSED(dev); /* Configure ISR. Use instance 0 of the GPT timer */ IRQ_CONNECT(DT_IRQN(GPT_INST), DT_IRQ(GPT_INST, priority), mcux_imx_gpt_isr, NULL, 0); diff --git a/drivers/timer/mcux_lptmr_timer.c b/drivers/timer/mcux_lptmr_timer.c index 502eb39e6e1cf..65566b434df8c 100644 --- a/drivers/timer/mcux_lptmr_timer.c +++ b/drivers/timer/mcux_lptmr_timer.c @@ -95,11 +95,10 @@ static void mcux_lptmr_timer_isr(const void *arg) LPTMR_ClearStatusFlags(LPTMR_BASE, kLPTMR_TimerCompareFlag); } -static int sys_clock_driver_init(const struct device *dev) +static int sys_clock_driver_init(void) { lptmr_config_t config; - ARG_UNUSED(dev); LPTMR_GetDefaultConfig(&config); config.timerMode = kLPTMR_TimerModeTimeCounter; diff --git a/drivers/timer/mcux_os_timer.c b/drivers/timer/mcux_os_timer.c index 940970c37687f..b20ba46272786 100644 --- a/drivers/timer/mcux_os_timer.c +++ b/drivers/timer/mcux_os_timer.c @@ -113,9 +113,8 @@ uint64_t sys_clock_cycle_get_64(void) return OSTIMER_GetCurrentTimerValue(base); } -static int sys_clock_driver_init(const struct device *dev) +static int sys_clock_driver_init(void) { - ARG_UNUSED(dev); /* Configure event timer's ISR */ IRQ_CONNECT(DT_INST_IRQN(0), DT_INST_IRQ(0, priority), diff --git a/drivers/timer/mips_cp0_timer.c b/drivers/timer/mips_cp0_timer.c index 7afc9c47a19db..81af49ab95616 100644 --- a/drivers/timer/mips_cp0_timer.c +++ b/drivers/timer/mips_cp0_timer.c @@ -112,9 +112,8 @@ uint32_t sys_clock_cycle_get_32(void) return get_cp0_count(); } -static int sys_clock_driver_init(const struct device *dev) +static int sys_clock_driver_init(void) { - ARG_UNUSED(dev); IRQ_CONNECT(MIPS_MACHINE_TIMER_IRQ, 0, timer_isr, NULL, 0); last_count = get_cp0_count(); diff --git a/drivers/timer/native_posix_timer.c b/drivers/timer/native_posix_timer.c index 288b8eb378a97..9f0b10fcb18bf 100644 --- a/drivers/timer/native_posix_timer.c +++ b/drivers/timer/native_posix_timer.c @@ -123,9 +123,8 @@ void sys_clock_disable(void) * * Enable the hw timer, setting its tick period, and setup its interrupt */ -static int sys_clock_driver_init(const struct device *dev) +static int sys_clock_driver_init(void) { - ARG_UNUSED(dev); tick_period = 1000000ul / CONFIG_SYS_CLOCK_TICKS_PER_SEC; diff --git a/drivers/timer/npcx_itim_timer.c b/drivers/timer/npcx_itim_timer.c index 4d5b066de312d..66409e235ce95 100644 --- a/drivers/timer/npcx_itim_timer.c +++ b/drivers/timer/npcx_itim_timer.c @@ -303,9 +303,8 @@ uint64_t npcx_clock_get_sleep_ticks(void) } #endif /* CONFIG_PM */ -static int sys_clock_driver_init(const struct device *dev) +static int sys_clock_driver_init(void) { - ARG_UNUSED(dev); int ret; uint32_t sys_tmr_rate; const struct device *const clk_dev = DEVICE_DT_GET(NPCX_CLK_CTRL_NODE); diff --git a/drivers/timer/nrf_rtc_timer.c b/drivers/timer/nrf_rtc_timer.c index ebf3ad92b2894..ef7b2aab574b2 100644 --- a/drivers/timer/nrf_rtc_timer.c +++ b/drivers/timer/nrf_rtc_timer.c @@ -684,9 +684,8 @@ void sys_clock_disable(void) NVIC_ClearPendingIRQ(RTC_IRQn); } -static int sys_clock_driver_init(const struct device *dev) +static int sys_clock_driver_init(void) { - ARG_UNUSED(dev); static const enum nrf_lfclk_start_mode mode = IS_ENABLED(CONFIG_SYSTEM_CLOCK_NO_WAIT) ? CLOCK_CONTROL_NRF_LF_START_NOWAIT : diff --git a/drivers/timer/rcar_cmt_timer.c b/drivers/timer/rcar_cmt_timer.c index 934f90995e5e8..925c7f472ebd3 100644 --- a/drivers/timer/rcar_cmt_timer.c +++ b/drivers/timer/rcar_cmt_timer.c @@ -89,13 +89,12 @@ uint32_t sys_clock_cycle_get_32(void) * The second one is used for cycles count, the match value is set * at max uint32_t. */ -static int sys_clock_driver_init(const struct device *dev) +static int sys_clock_driver_init(void) { const struct device *clk; uint32_t reg_val; int i, ret; - ARG_UNUSED(dev); clk = DEVICE_DT_GET(DT_INST_CLOCKS_CTLR(0)); if (!device_is_ready(clk)) { return -ENODEV; diff --git a/drivers/timer/riscv_machine_timer.c b/drivers/timer/riscv_machine_timer.c index 37f50f27a370e..f4ac7afe4d43f 100644 --- a/drivers/timer/riscv_machine_timer.c +++ b/drivers/timer/riscv_machine_timer.c @@ -220,9 +220,8 @@ uint64_t sys_clock_cycle_get_64(void) return mtime() << CONFIG_RISCV_MACHINE_TIMER_SYSTEM_CLOCK_DIVIDER; } -static int sys_clock_driver_init(const struct device *dev) +static int sys_clock_driver_init(void) { - ARG_UNUSED(dev); set_divider(); diff --git a/drivers/timer/rv32m1_lptmr_timer.c b/drivers/timer/rv32m1_lptmr_timer.c index c643b0ae2e817..d628dcbe2caee 100644 --- a/drivers/timer/rv32m1_lptmr_timer.c +++ b/drivers/timer/rv32m1_lptmr_timer.c @@ -71,11 +71,10 @@ uint32_t sys_clock_elapsed(void) return 0; } -static int sys_clock_driver_init(const struct device *unused) +static int sys_clock_driver_init(void) { uint32_t csr, psr, sircdiv; /* LPTMR registers */ - ARG_UNUSED(unused); IRQ_CONNECT(DT_INST_IRQN(0), 0, lptmr_irq_handler, NULL, 0); diff --git a/drivers/timer/sam0_rtc_timer.c b/drivers/timer/sam0_rtc_timer.c index 8345c75e726d8..f4cdd9891b12b 100644 --- a/drivers/timer/sam0_rtc_timer.c +++ b/drivers/timer/sam0_rtc_timer.c @@ -245,11 +245,10 @@ uint32_t sys_clock_cycle_get_32(void) return rtc_count(); } -static int sys_clock_driver_init(const struct device *dev) +static int sys_clock_driver_init(void) { int retval; - ARG_UNUSED(dev); #ifdef MCLK MCLK->APBAMASK.reg |= MCLK_APBAMASK_RTC; diff --git a/drivers/timer/stm32_lptim_timer.c b/drivers/timer/stm32_lptim_timer.c index ccba850ea8046..f27b07182cbb0 100644 --- a/drivers/timer/stm32_lptim_timer.c +++ b/drivers/timer/stm32_lptim_timer.c @@ -315,11 +315,10 @@ void stm32_lptim_wait_ready(void) #endif } -static int sys_clock_driver_init(const struct device *dev) +static int sys_clock_driver_init(void) { int err; - ARG_UNUSED(dev); if (!device_is_ready(clk_ctrl)) { return -ENODEV; diff --git a/drivers/timer/xlnx_psttc_timer.c b/drivers/timer/xlnx_psttc_timer.c index 6001f90750d20..f9bb7ff1e430a 100644 --- a/drivers/timer/xlnx_psttc_timer.c +++ b/drivers/timer/xlnx_psttc_timer.c @@ -146,10 +146,9 @@ uint32_t sys_clock_cycle_get_32(void) return read_count(); } -static int sys_clock_driver_init(const struct device *dev) +static int sys_clock_driver_init(void) { uint32_t reg_val; - ARG_UNUSED(dev); /* Stop timer */ sys_write32(XTTCPS_CNT_CNTRL_DIS_MASK, diff --git a/drivers/timer/xtensa_sys_timer.c b/drivers/timer/xtensa_sys_timer.c index 26bb42cb4f39c..e3fe740380014 100644 --- a/drivers/timer/xtensa_sys_timer.c +++ b/drivers/timer/xtensa_sys_timer.c @@ -120,9 +120,8 @@ void smp_timer_init(void) } #endif -static int sys_clock_driver_init(const struct device *dev) +static int sys_clock_driver_init(void) { - ARG_UNUSED(dev); IRQ_CONNECT(TIMER_IRQ, 0, ccompare_isr, 0, 0); set_ccompare(ccount() + CYC_PER_TICK); diff --git a/drivers/usb/device/usb_dc_kinetis.c b/drivers/usb/device/usb_dc_kinetis.c index 757cbca2ad6a5..bcbbd246483b0 100644 --- a/drivers/usb/device/usb_dc_kinetis.c +++ b/drivers/usb/device/usb_dc_kinetis.c @@ -1038,9 +1038,8 @@ static void usb_kinetis_thread_main(void *arg1, void *unused1, void *unused2) } } -static int usb_kinetis_init(const struct device *dev) +static int usb_kinetis_init(void) { - ARG_UNUSED(dev); k_thread_create(&dev_data.thread, dev_data.thread_stack, USBD_THREAD_STACK_SIZE, diff --git a/drivers/usb/device/usb_dc_mcux.c b/drivers/usb/device/usb_dc_mcux.c index 7614c3de15e6e..b0dbf0717e48d 100644 --- a/drivers/usb/device/usb_dc_mcux.c +++ b/drivers/usb/device/usb_dc_mcux.c @@ -883,9 +883,8 @@ static void usb_isr_handler(void) #endif } -static int usb_mcux_init(const struct device *dev) +static int usb_mcux_init(void) { - ARG_UNUSED(dev); k_thread_create(&dev_state.thread, dev_state.thread_stack, CONFIG_USB_MCUX_THREAD_STACK_SIZE, diff --git a/drivers/usb/device/usb_dc_nrfx.c b/drivers/usb/device/usb_dc_nrfx.c index 2da566ec3b33f..98d027a8e88b5 100644 --- a/drivers/usb/device/usb_dc_nrfx.c +++ b/drivers/usb/device/usb_dc_nrfx.c @@ -1869,7 +1869,7 @@ int usb_dc_wakeup_request(void) return 0; } -static int usb_init(const struct device *arg) +static int usb_init(void) { struct nrf_usbd_ctx *ctx = get_usbd_ctx(); nrfx_err_t err; diff --git a/drivers/usb/device/usb_dc_rpi_pico.c b/drivers/usb/device/usb_dc_rpi_pico.c index 24bda0b310b79..1fb3da3edaa42 100644 --- a/drivers/usb/device/usb_dc_rpi_pico.c +++ b/drivers/usb/device/usb_dc_rpi_pico.c @@ -982,9 +982,8 @@ static void udc_rpi_thread_main(void *arg1, void *unused1, void *unused2) } } -static int usb_rpi_init(const struct device *dev) +static int usb_rpi_init(void) { - ARG_UNUSED(dev); k_thread_create(&thread, thread_stack, USBD_THREAD_STACK_SIZE, diff --git a/drivers/usb/udc/udc_common.c b/drivers/usb/udc/udc_common.c index 736f4462f1749..58fee5acdde12 100644 --- a/drivers/usb/udc/udc_common.c +++ b/drivers/usb/udc/udc_common.c @@ -1081,9 +1081,8 @@ K_KERNEL_STACK_DEFINE(udc_work_q_stack, CONFIG_UDC_WORKQUEUE_STACK_SIZE); struct k_work_q udc_work_q; -static int udc_work_q_init(const struct device *dev) +static int udc_work_q_init(void) { - ARG_UNUSED(dev); k_work_queue_start(&udc_work_q, udc_work_q_stack, diff --git a/drivers/usb/uvb/uvb.c b/drivers/usb/uvb/uvb.c index 965ca6d8bca59..d56c1fa88bbd2 100644 --- a/drivers/usb/uvb/uvb.c +++ b/drivers/usb/uvb/uvb.c @@ -316,7 +316,7 @@ static void uvb_work_handler(struct k_work *work) } } -static int uvb_init(const struct device *dev) +static int uvb_init(void) { STRUCT_SECTION_FOREACH(uvb_node, host) { LOG_DBG("Host %p - %s", host, host->name); diff --git a/drivers/xen/gnttab.c b/drivers/xen/gnttab.c index 65dd0eb0421ab..8cb0fe299e8db 100644 --- a/drivers/xen/gnttab.c +++ b/drivers/xen/gnttab.c @@ -287,7 +287,7 @@ const char *gnttabop_error(int16_t status) } } -static int gnttab_init(const struct device *d) +static int gnttab_init(void) { grant_ref_t gref; struct xen_add_to_physmap xatp; diff --git a/include/zephyr/device.h b/include/zephyr/device.h index b8608d2ae88fe..c66eebdb6303a 100644 --- a/include/zephyr/device.h +++ b/include/zephyr/device.h @@ -906,13 +906,17 @@ static inline bool z_impl_device_is_ready(const struct device *dev) * @brief Define the init entry for a device. * * @param dev_id Device identifier. - * @param init_fn Device init function. + * @param init_fn_ Device init function. * @param level Initialization level. * @param prio Initialization priority. */ -#define Z_DEVICE_INIT_ENTRY_DEFINE(dev_id, init_fn, level, prio) \ - Z_INIT_ENTRY_DEFINE(DEVICE_NAME_GET(dev_id), init_fn, \ - (&DEVICE_NAME_GET(dev_id)), level, prio) +#define Z_DEVICE_INIT_ENTRY_DEFINE(dev_id, init_fn_, level, prio) \ + static const Z_DECL_ALIGN(struct init_entry) \ + Z_INIT_ENTRY_SECTION(level, prio) __used \ + Z_INIT_ENTRY_NAME(DEVICE_NAME_GET(dev_id)) = { \ + .init_fn = {.dev = (init_fn_)}, \ + .dev = &DEVICE_NAME_GET(dev_id), \ + } /** * @brief Define a @ref device and all other required objects. diff --git a/include/zephyr/init.h b/include/zephyr/init.h index 98e1e7c85a539..c7b496feb8ed1 100644 --- a/include/zephyr/init.h +++ b/include/zephyr/init.h @@ -47,17 +47,49 @@ extern "C" { struct device; -/** @brief Structure to store initialization entry information. */ -struct init_entry { +/** + * @brief Initialization function for init entries. + * + * Init entries support both the system initialization and the device + * APIs. Each API has its own init function signature; hence, we have a + * union to cover both. + */ +union init_function { /** - * Initialization function for the init entry. - * - * @param dev Device pointer, NULL if not a device init function. + * System initialization function. * * @retval 0 On success * @retval -errno If init fails. */ - int (*init)(const struct device *dev); + int (*sys)(void); + /** + * Device initialization function. + * + * @param dev Device instance. + * + * @retval 0 On success + * @retval -errno If device initialization fails. + */ + int (*dev)(const struct device *dev); +}; + +/** + * @brief Structure to store initialization entry information. + * + * @internal + * Init entries need to be defined following these rules: + * + * - Their name must be set using Z_INIT_ENTRY_NAME(). + * - They must be placed in a special init section, given by + * Z_INIT_ENTRY_SECTION(). + * - They must be aligned, e.g. using Z_DECL_ALIGN(). + * + * See SYS_INIT_NAMED() for an example. + * @endinternal + */ +struct init_entry { + /** Initialization function. */ + union init_function init_fn; /** * If the init entry belongs to a device, this fields stores a * reference to it, otherwise it is set to NULL. @@ -83,29 +115,6 @@ struct init_entry { #define Z_INIT_ENTRY_SECTION(level, prio) \ __attribute__((__section__(".z_init_" #level STRINGIFY(prio)"_"))) -/** - * @brief Create an init entry object. - * - * This macro defines an init entry object that will be automatically - * configured by the kernel during system initialization. Note that init - * entries will not be accessible from user mode. - * - * @param init_id Init entry unique identifier. - * @param init_fn Init function. - * @param device Device instance (optional). - * @param level Initialization level. - * @param prio Initialization priority within @p level. - * - * @see SYS_INIT() - */ -#define Z_INIT_ENTRY_DEFINE(init_id, init_fn, device, level, prio) \ - static const Z_DECL_ALIGN(struct init_entry) \ - Z_INIT_ENTRY_SECTION(level, prio) __used __noasan \ - Z_INIT_ENTRY_NAME(init_id) = { \ - .init = (init_fn), \ - .dev = (device), \ - } - /** @endcond */ /** @@ -134,14 +143,18 @@ struct init_entry { * same init function. * * @param name Unique name for SYS_INIT entry. - * @param init_fn See SYS_INIT(). + * @param init_fn_ See SYS_INIT(). * @param level See SYS_INIT(). * @param prio See SYS_INIT(). * * @see SYS_INIT() */ -#define SYS_INIT_NAMED(name, init_fn, level, prio) \ - Z_INIT_ENTRY_DEFINE(name, init_fn, NULL, level, prio) +#define SYS_INIT_NAMED(name, init_fn_, level, prio) \ + static const Z_DECL_ALIGN(struct init_entry) \ + Z_INIT_ENTRY_SECTION(level, prio) __used \ + Z_INIT_ENTRY_NAME(name) = { \ + .init_fn = {.sys = (init_fn_)}, \ + } /** @} */ diff --git a/kernel/init.c b/kernel/init.c index be4c13d228c8a..ba8d72944daf5 100644 --- a/kernel/init.c +++ b/kernel/init.c @@ -250,9 +250,9 @@ static void z_sys_init_run_level(enum init_level level) for (entry = levels[level]; entry < levels[level+1]; entry++) { const struct device *dev = entry->dev; - int rc = entry->init(dev); if (dev != NULL) { + int rc = entry->init_fn.dev(dev); /* Mark device initialized. If initialization * failed, record the error condition. */ @@ -270,6 +270,8 @@ static void z_sys_init_run_level(enum init_level level) /* Run automatic device runtime enablement */ (void)pm_device_runtime_auto_enable(dev); } + } else { + (void)entry->init_fn.sys(); } } } diff --git a/kernel/kheap.c b/kernel/kheap.c index 9a044deebfbf5..196b395ff857d 100644 --- a/kernel/kheap.c +++ b/kernel/kheap.c @@ -18,9 +18,8 @@ void k_heap_init(struct k_heap *h, void *mem, size_t bytes) SYS_PORT_TRACING_OBJ_INIT(k_heap, h); } -static int statics_init(const struct device *unused) +static int statics_init(void) { - ARG_UNUSED(unused); STRUCT_SECTION_FOREACH(k_heap, h) { #if defined(CONFIG_DEMAND_PAGING) && !defined(CONFIG_LINKER_GENERIC_SECTIONS_PRESENT_AT_BOOT) /* Some heaps may not present at boot, so we need to wait for diff --git a/kernel/mailbox.c b/kernel/mailbox.c index 55ec740abf5bf..3014af57063a3 100644 --- a/kernel/mailbox.c +++ b/kernel/mailbox.c @@ -49,10 +49,8 @@ static inline void mbox_async_free(struct k_mbox_async *async) /* * Do run-time initialization of mailbox object subsystem. */ -static int init_mbox_module(const struct device *dev) +static int init_mbox_module(void) { - ARG_UNUSED(dev); - /* array of asynchronous message descriptors */ static struct k_mbox_async __noinit async_msg[CONFIG_NUM_MBOX_ASYNC_MSGS]; diff --git a/kernel/mem_domain.c b/kernel/mem_domain.c index 3cb6903f7259d..268d218ce3e28 100644 --- a/kernel/mem_domain.c +++ b/kernel/mem_domain.c @@ -338,11 +338,10 @@ int k_mem_domain_add_thread(struct k_mem_domain *domain, k_tid_t thread) return ret; } -static int init_mem_domain_module(const struct device *arg) +static int init_mem_domain_module(void) { int ret; - ARG_UNUSED(arg); ARG_UNUSED(ret); max_partitions = arch_mem_domain_max_partitions_get(); diff --git a/kernel/mem_slab.c b/kernel/mem_slab.c index 28f5c471bd85d..d1b3b9796579a 100644 --- a/kernel/mem_slab.c +++ b/kernel/mem_slab.c @@ -53,10 +53,9 @@ static int create_free_list(struct k_mem_slab *slab) * * @return 0 on success, fails otherwise. */ -static int init_mem_slab_module(const struct device *dev) +static int init_mem_slab_module(void) { int rc = 0; - ARG_UNUSED(dev); STRUCT_SECTION_FOREACH(k_mem_slab, slab) { rc = create_free_list(slab); diff --git a/kernel/system_work_q.c b/kernel/system_work_q.c index 221e5ed5b155c..02b1c4c2d221b 100644 --- a/kernel/system_work_q.c +++ b/kernel/system_work_q.c @@ -19,9 +19,8 @@ static K_KERNEL_STACK_DEFINE(sys_work_q_stack, struct k_work_q k_sys_work_q; -static int k_sys_work_q_init(const struct device *dev) +static int k_sys_work_q_init(void) { - ARG_UNUSED(dev); struct k_work_queue_config cfg = { .name = "sysworkq", .no_yield = IS_ENABLED(CONFIG_SYSTEM_WORKQUEUE_NO_YIELD), diff --git a/kernel/userspace.c b/kernel/userspace.c index f8a273673d52a..9d8611a3873a5 100644 --- a/kernel/userspace.c +++ b/kernel/userspace.c @@ -859,11 +859,10 @@ int z_user_string_copy(char *dst, const char *src, size_t maxlen) extern char __app_shmem_regions_start[]; extern char __app_shmem_regions_end[]; -static int app_shmem_bss_zero(const struct device *unused) +static int app_shmem_bss_zero(void) { struct z_app_region *region, *end; - ARG_UNUSED(unused); end = (struct z_app_region *)&__app_shmem_regions_end; region = (struct z_app_region *)&__app_shmem_regions_start; diff --git a/lib/libc/minimal/source/stdlib/malloc.c b/lib/libc/minimal/source/stdlib/malloc.c index da408f77c0cab..af9b95e94f49f 100644 --- a/lib/libc/minimal/source/stdlib/malloc.c +++ b/lib/libc/minimal/source/stdlib/malloc.c @@ -76,9 +76,8 @@ void *aligned_alloc(size_t alignment, size_t size) } #endif /* __STDC_VERSION__ >= 201112L */ -static int malloc_prepare(const struct device *unused) +static int malloc_prepare(void) { - ARG_UNUSED(unused); sys_heap_init(&z_malloc_heap, z_malloc_heap_mem, HEAP_BYTES); sys_mutex_init(&z_malloc_heap_mutex); diff --git a/lib/libc/newlib/libc-hooks.c b/lib/libc/newlib/libc-hooks.c index 4d7233657f975..1769e32dc1405 100644 --- a/lib/libc/newlib/libc-hooks.c +++ b/lib/libc/newlib/libc-hooks.c @@ -98,9 +98,8 @@ #endif /* CONFIG_XTENSA */ #endif -static int malloc_prepare(const struct device *unused) +static int malloc_prepare(void) { - ARG_UNUSED(unused); #ifdef USE_MALLOC_PREPARE #ifdef CONFIG_MMU @@ -333,9 +332,8 @@ K_SEM_DEFINE(__lock___arc4random_mutex, 1, 1); #ifdef CONFIG_USERSPACE /* Grant public access to all static locks after boot */ -static int newlib_locks_prepare(const struct device *unused) +static int newlib_locks_prepare(void) { - ARG_UNUSED(unused); /* Initialise recursive locks */ k_object_access_all_grant(&__lock___sinit_recursive_mutex); diff --git a/lib/libc/picolibc/libc-hooks.c b/lib/libc/picolibc/libc-hooks.c index 8affddb6dd080..70c3429e0dd6c 100644 --- a/lib/libc/picolibc/libc-hooks.c +++ b/lib/libc/picolibc/libc-hooks.c @@ -141,9 +141,8 @@ extern char _heap_sentry[]; #ifdef USE_MALLOC_PREPARE -static int malloc_prepare(const struct device *unused) +static int malloc_prepare(void) { - ARG_UNUSED(unused); #ifdef CONFIG_MMU @@ -329,9 +328,8 @@ K_MUTEX_DEFINE(__lock___libc_recursive_mutex); #ifdef CONFIG_USERSPACE /* Grant public access to picolibc lock after boot */ -static int picolibc_locks_prepare(const struct device *unused) +static int picolibc_locks_prepare(void) { - ARG_UNUSED(unused); /* Initialise recursive locks */ k_object_access_all_grant(&__lock___libc_recursive_mutex); diff --git a/lib/os/p4wq.c b/lib/os/p4wq.c index de9e5acfff5f9..ada5e3e2c21df 100644 --- a/lib/os/p4wq.c +++ b/lib/os/p4wq.c @@ -139,9 +139,8 @@ void k_p4wq_add_thread(struct k_p4wq *queue, struct k_thread *thread, queue->flags & K_P4WQ_DELAYED_START ? K_FOREVER : K_NO_WAIT); } -static int static_init(const struct device *dev) +static int static_init(void) { - ARG_UNUSED(dev); STRUCT_SECTION_FOREACH(k_p4wq_initparam, pp) { for (int i = 0; i < pp->num; i++) { diff --git a/lib/posix/pthread.c b/lib/posix/pthread.c index d561bd49e8d93..ad16a1d8692f4 100644 --- a/lib/posix/pthread.c +++ b/lib/posix/pthread.c @@ -710,11 +710,10 @@ int pthread_getname_np(pthread_t thread, char *name, size_t len) #endif } -static int posix_thread_pool_init(const struct device *dev) +static int posix_thread_pool_init(void) { size_t i; - ARG_UNUSED(dev); for (i = 0; i < CONFIG_MAX_PTHREAD_COUNT; ++i) { posix_thread_pool[i].state = PTHREAD_EXITED; diff --git a/modules/canopennode/CO_driver.c b/modules/canopennode/CO_driver.c index c40aa3647c71b..e8892e080f5fb 100644 --- a/modules/canopennode/CO_driver.c +++ b/modules/canopennode/CO_driver.c @@ -509,9 +509,8 @@ void CO_CANverifyErrors(CO_CANmodule_t *CANmodule) } } -static int canopen_init(const struct device *dev) +static int canopen_init(void) { - ARG_UNUSED(dev); k_work_queue_start(&canopen_tx_workq, canopen_tx_workq_stack, K_KERNEL_STACK_SIZEOF(canopen_tx_workq_stack), diff --git a/modules/hal_nordic/nrf_802154/serialization/platform/nrf_802154_init_net.c b/modules/hal_nordic/nrf_802154/serialization/platform/nrf_802154_init_net.c index d91cc4bac66dc..152df4c6bf756 100644 --- a/modules/hal_nordic/nrf_802154/serialization/platform/nrf_802154_init_net.c +++ b/modules/hal_nordic/nrf_802154/serialization/platform/nrf_802154_init_net.c @@ -9,7 +9,7 @@ #include "nrf_802154.h" #include "nrf_802154_serialization.h" -static int serialization_init(const struct device *dev) +static int serialization_init(void) { /* On NET core we don't use Zephyr's shim layer so we have to call inits manually */ nrf_802154_init(); diff --git a/modules/hal_nordic/nrf_802154/sl_opensource/platform/nrf_802154_temperature_zephyr.c b/modules/hal_nordic/nrf_802154/sl_opensource/platform/nrf_802154_temperature_zephyr.c index cc2a1e69bccb5..0791dcb148cee 100644 --- a/modules/hal_nordic/nrf_802154/sl_opensource/platform/nrf_802154_temperature_zephyr.c +++ b/modules/hal_nordic/nrf_802154/sl_opensource/platform/nrf_802154_temperature_zephyr.c @@ -52,9 +52,8 @@ static void work_handler(struct k_work *work) k_work_reschedule(&dwork, K_MSEC(CONFIG_NRF_802154_TEMPERATURE_UPDATE_PERIOD)); } -static int temperature_update_init(const struct device *dev) +static int temperature_update_init(void) { - ARG_UNUSED(dev); __ASSERT_NO_MSG(device_is_ready(device)); diff --git a/modules/mbedtls/zephyr_init.c b/modules/mbedtls/zephyr_init.c index 5a929e4c608b3..a157dac54e67c 100644 --- a/modules/mbedtls/zephyr_init.c +++ b/modules/mbedtls/zephyr_init.c @@ -83,9 +83,8 @@ int mbedtls_hardware_poll(void *data, unsigned char *output, size_t len, } #endif /* CONFIG_MBEDTLS_ZEPHYR_ENTROPY */ -static int _mbedtls_init(const struct device *device) +static int _mbedtls_init(void) { - ARG_UNUSED(device); init_heap(); diff --git a/modules/segger/SEGGER_RTT_zephyr.c b/modules/segger/SEGGER_RTT_zephyr.c index 32f6b0c255123..b7b8e83e4abcb 100644 --- a/modules/segger/SEGGER_RTT_zephyr.c +++ b/modules/segger/SEGGER_RTT_zephyr.c @@ -22,9 +22,8 @@ K_MUTEX_DEFINE(rtt_term_mutex); -static int rtt_init(const struct device *unused) +static int rtt_init(void) { - ARG_UNUSED(unused); SEGGER_RTT_Init(); diff --git a/modules/trusted-firmware-m/interface/interface.c b/modules/trusted-firmware-m/interface/interface.c index 200e9a9d41a78..66100b9e62ac7 100644 --- a/modules/trusted-firmware-m/interface/interface.c +++ b/modules/trusted-firmware-m/interface/interface.c @@ -88,9 +88,8 @@ enum tfm_status_e tfm_ns_interface_init(void) #include "psa_manifest/sid.h" #endif /* TFM_PSA_API */ -static int ns_interface_init(const struct device *arg) +static int ns_interface_init(void) { - ARG_UNUSED(arg); __ASSERT(tfm_ns_interface_init() == TFM_SUCCESS, "TF-M NS interface init failed"); diff --git a/samples/application_development/code_relocation_nocopy/boards/nrf5340dk_nrf5340_cpuapp/ext_mem_init.c b/samples/application_development/code_relocation_nocopy/boards/nrf5340dk_nrf5340_cpuapp/ext_mem_init.c index e1f4d2c13de1a..36610748a590c 100644 --- a/samples/application_development/code_relocation_nocopy/boards/nrf5340dk_nrf5340_cpuapp/ext_mem_init.c +++ b/samples/application_development/code_relocation_nocopy/boards/nrf5340dk_nrf5340_cpuapp/ext_mem_init.c @@ -16,9 +16,8 @@ #define QSPI_NODE DT_NODELABEL(qspi) -static int qspi_ext_mem_init(const struct device *dev) +static int qspi_ext_mem_init(void) { - ARG_UNUSED(dev); static const nrfx_qspi_config_t qspi_config = { .prot_if = { diff --git a/samples/bluetooth/hci_spi/src/main.c b/samples/bluetooth/hci_spi/src/main.c index 77c97053a54a4..e88349c2aff79 100644 --- a/samples/bluetooth/hci_spi/src/main.c +++ b/samples/bluetooth/hci_spi/src/main.c @@ -259,9 +259,8 @@ static void bt_tx_thread(void *p1, void *p2, void *p3) } } -static int hci_spi_init(const struct device *unused) +static int hci_spi_init(void) { - ARG_UNUSED(unused); LOG_DBG(""); diff --git a/samples/bluetooth/hci_uart/src/main.c b/samples/bluetooth/hci_uart/src/main.c index 6accd9ee49768..24fb3f1e76a46 100644 --- a/samples/bluetooth/hci_uart/src/main.c +++ b/samples/bluetooth/hci_uart/src/main.c @@ -326,7 +326,7 @@ void bt_ctlr_assert_handle(char *file, uint32_t line) } #endif /* CONFIG_BT_CTLR_ASSERT_HANDLER */ -static int hci_uart_init(const struct device *unused) +static int hci_uart_init(void) { LOG_DBG(""); diff --git a/samples/boards/nrf/battery/src/battery.c b/samples/boards/nrf/battery/src/battery.c index ef844c697b641..a0fbb651b58b9 100644 --- a/samples/boards/nrf/battery/src/battery.c +++ b/samples/boards/nrf/battery/src/battery.c @@ -142,7 +142,7 @@ static int divider_setup(void) static bool battery_ok; -static int battery_setup(const struct device *arg) +static int battery_setup(void) { int rc = divider_setup(); diff --git a/samples/boards/nrf/dynamic_pinctrl/src/remap.c b/samples/boards/nrf/dynamic_pinctrl/src/remap.c index cb59ce050730f..2731036659056 100644 --- a/samples/boards/nrf/dynamic_pinctrl/src/remap.c +++ b/samples/boards/nrf/dynamic_pinctrl/src/remap.c @@ -28,13 +28,12 @@ static const struct pinctrl_state uart0_alt[] = { #endif }; -static int remap_pins(const struct device *dev) +static int remap_pins(void) { int ret; const struct gpio_dt_spec button = GPIO_DT_SPEC_GET_OR(DT_ALIAS(sw0), gpios, {0}); - ARG_UNUSED(dev); if (!device_is_ready(button.port)) { return -ENODEV; diff --git a/samples/boards/nrf/system_off/src/main.c b/samples/boards/nrf/system_off/src/main.c index 5f99e51de092c..60c1a826f5ff4 100644 --- a/samples/boards/nrf/system_off/src/main.c +++ b/samples/boards/nrf/system_off/src/main.c @@ -25,9 +25,8 @@ * before the threading system starts up between PRE_KERNEL_2 and * POST_KERNEL. Do it at the start of PRE_KERNEL_2. */ -static int disable_ds_1(const struct device *dev) +static int disable_ds_1(void) { - ARG_UNUSED(dev); pm_policy_state_lock_get(PM_STATE_SOFT_OFF, PM_ALL_SUBSTATES); return 0; diff --git a/samples/subsys/ipc/openamp/src/main.c b/samples/subsys/ipc/openamp/src/main.c index bdbfc17bb4394..38237081b2b99 100644 --- a/samples/subsys/ipc/openamp/src/main.c +++ b/samples/subsys/ipc/openamp/src/main.c @@ -298,7 +298,7 @@ void main(void) /* Make sure we clear out the status flag very early (before we bringup the * secondary core) so the secondary core see's the proper status */ -int init_status_flag(const struct device *arg) +int init_status_flag(void) { virtio_set_status(NULL, 0); diff --git a/samples/subsys/ipc/rpmsg_service/remote/src/main.c b/samples/subsys/ipc/rpmsg_service/remote/src/main.c index 5b804387e5ed1..65833ef51f2a3 100644 --- a/samples/subsys/ipc/rpmsg_service/remote/src/main.c +++ b/samples/subsys/ipc/rpmsg_service/remote/src/main.c @@ -83,7 +83,7 @@ void main(void) } /* Make sure we register endpoint before RPMsg Service is initialized. */ -int register_endpoint(const struct device *arg) +int register_endpoint(void) { int status; diff --git a/samples/subsys/ipc/rpmsg_service/src/main.c b/samples/subsys/ipc/rpmsg_service/src/main.c index cd0cd4e949a7b..f79f1983ec84a 100644 --- a/samples/subsys/ipc/rpmsg_service/src/main.c +++ b/samples/subsys/ipc/rpmsg_service/src/main.c @@ -99,7 +99,7 @@ void main(void) } /* Make sure we register endpoint before RPMsg Service is initialized. */ -int register_endpoint(const struct device *arg) +int register_endpoint(void) { int status; diff --git a/samples/subsys/usb/hid/src/main.c b/samples/subsys/usb/hid/src/main.c index ec28291a2a50f..90f23b13126b8 100644 --- a/samples/subsys/usb/hid/src/main.c +++ b/samples/subsys/usb/hid/src/main.c @@ -149,7 +149,7 @@ void main(void) k_work_init(&report_send, send_report); } -static int composite_pre_init(const struct device *dev) +static int composite_pre_init(void) { hdev = device_get_binding("HID_0"); if (hdev == NULL) { diff --git a/scripts/utils/migrate_sys_init.py b/scripts/utils/migrate_sys_init.py new file mode 100644 index 0000000000000..e327ce6b46ed6 --- /dev/null +++ b/scripts/utils/migrate_sys_init.py @@ -0,0 +1,86 @@ +""" +Utility script to migrate SYS_INIT() calls from the old signature +``int (*init_fn)(const struct device *dev)`` to ``int (*init_fn)(void)``. + +.. warning:: + Review the output carefully! This script may not cover all cases! + +Usage:: + + python $ZEPHYR_BASE/scripts/utils/migrate_sys_init.py \ + -p path/to/zephyr-based-project + +Copyright (c) 2022 Nordic Semiconductor ASA +SPDX-License-Identifier: Apache-2.0 +""" + +import argparse +from pathlib import Path +import re + + +ZEPHYR_BASE = Path(__file__).parents[2] + + +def update_sys_init(project, dry_run): + for p in project.glob("**/*"): + if not p.is_file() or not p.suffix or p.suffix[1:] not in ("c", "cpp"): + continue + + with open(p) as f: + lines = f.readlines() + + sys_inits = [] + for line in lines: + m = re.match(r"^SYS_INIT\(([A-Za-z0-9_]+),.*", line) + if m: + sys_inits.append(m.group(1)) + continue + + m = re.match(r"^SYS_INIT_NAMED\([A-Za-z0-9_]+,\s?([A-Za-z0-9_]+).*", line) + if m: + sys_inits.append(m.group(1)) + continue + + if not sys_inits: + continue + + arg = None + content = "" + update = False + for line in lines: + m = re.match( + r"(.*)int (" + + "|".join(sys_inits) + + r")\(const\s+struct\s+device\s+\*\s?(.*)\)(.*)", + line, + ) + if m: + b, sys_init, arg, e = m.groups() + content += f"{b}int {sys_init}(void){e}\n" + update = True + elif arg: + m = re.match(r"^\s?ARG_UNUSED\(" + arg + r"\);.*$", line) + if m: + arg = None + else: + content += line + else: + content += line + + if update: + print(f"Updating {p}{' (dry run)' if dry_run else ''}") + if not dry_run: + with open(p, "w") as f: + f.write(content) + + +if __name__ == "__main__": + parser = argparse.ArgumentParser(allow_abbrev=False) + parser.add_argument( + "-p", "--project", type=Path, required=True, help="Zephyr-based project path" + ) + parser.add_argument("--dry-run", action="store_true", help="Dry run") + args = parser.parse_args() + + update_sys_init(args.project, args.dry_run) diff --git a/soc/arc/snps_arc_iot/soc.c b/soc/arc/snps_arc_iot/soc.c index 9abaf8b3d97b1..832c6df5f51d0 100644 --- a/soc/arc/snps_arc_iot/soc.c +++ b/soc/arc/snps_arc_iot/soc.c @@ -15,9 +15,8 @@ #define CPU_FREQ DT_PROP(DT_PATH(cpus, cpu_0), clock_frequency) -static int arc_iot_init(const struct device *dev) +static int arc_iot_init(void) { - ARG_UNUSED(dev); if (arc_iot_pll_fout_config(CPU_FREQ / 1000000) < 0) { return -1; diff --git a/soc/arc/snps_emsk/soc_config.c b/soc/arc/snps_emsk/soc_config.c index a7cfd9b1eb968..adca19b683c09 100644 --- a/soc/arc/snps_emsk/soc_config.c +++ b/soc/arc/snps_emsk/soc_config.c @@ -11,9 +11,8 @@ #ifdef CONFIG_UART_NS16550 -static int uart_ns16550_init(const struct device *dev) +static int uart_ns16550_init(void) { - ARG_UNUSED(dev); /* On ARC EM Starter kit board, * send the UART the command to clear the interrupt diff --git a/soc/arm/arm/beetle/soc.c b/soc/arm/arm/beetle/soc.c index c8eb66487d2a8..c61e753b7ec2a 100644 --- a/soc/arm/arm/beetle/soc.c +++ b/soc/arm/arm/beetle/soc.c @@ -30,11 +30,10 @@ * * @return 0 */ -static int arm_beetle_init(const struct device *arg) +static int arm_beetle_init(void) { uint32_t key; - ARG_UNUSED(arg); key = irq_lock(); diff --git a/soc/arm/arm/designstart/soc.c b/soc/arm/arm/designstart/soc.c index 3ca646777958c..d914210277bac 100644 --- a/soc/arm/arm/designstart/soc.c +++ b/soc/arm/arm/designstart/soc.c @@ -7,9 +7,8 @@ #include #include -static int arm_designstart_init(const struct device *arg) +static int arm_designstart_init(void) { - ARG_UNUSED(arg); /* * Install default handler that simply resets the CPU if diff --git a/soc/arm/arm/mps2/soc.c b/soc/arm/arm/mps2/soc.c index 7147a0f5b1f6d..4b9659d72a851 100644 --- a/soc/arm/arm/mps2/soc.c +++ b/soc/arm/arm/mps2/soc.c @@ -76,9 +76,8 @@ uint32_t sse_200_platform_get_cpu_id(void) * * @return 0 */ -static int arm_mps2_init(const struct device *arg) +static int arm_mps2_init(void) { - ARG_UNUSED(arg); /* * Install default handler that simply resets the CPU diff --git a/soc/arm/arm/mps3/soc.c b/soc/arm/arm/mps3/soc.c index 48191d87830e1..86c7c2649bff1 100644 --- a/soc/arm/arm/mps3/soc.c +++ b/soc/arm/arm/mps3/soc.c @@ -30,9 +30,8 @@ FPGAIO_INIT(2); * * @return 0 */ -static int arm_mps3_init(const struct device *arg) +static int arm_mps3_init(void) { - ARG_UNUSED(arg); /* * Install default handler that simply resets the CPU diff --git a/soc/arm/arm/musca_b1/soc.c b/soc/arm/arm/musca_b1/soc.c index e1e1ab8cb21dc..44d8d887d50b5 100644 --- a/soc/arm/arm/musca_b1/soc.c +++ b/soc/arm/arm/musca_b1/soc.c @@ -52,9 +52,8 @@ uint32_t sse_200_platform_get_cpu_id(void) * * @return 0 */ -static int arm_musca_b1_init(const struct device *arg) +static int arm_musca_b1_init(void) { - ARG_UNUSED(arg); /* * Install default handler that simply resets the CPU diff --git a/soc/arm/arm/musca_s1/soc.c b/soc/arm/arm/musca_s1/soc.c index 2fdf43f25b094..7570678d1a3b0 100644 --- a/soc/arm/arm/musca_s1/soc.c +++ b/soc/arm/arm/musca_s1/soc.c @@ -13,9 +13,8 @@ * * @return 0 */ -static int arm_musca_s1_init(const struct device *arg) +static int arm_musca_s1_init(void) { - ARG_UNUSED(arg); /* * Install default handler that simply resets the CPU diff --git a/soc/arm/atmel_sam/sam3x/soc.c b/soc/arm/atmel_sam/sam3x/soc.c index 7a1a81c8157f0..891b205e195e2 100644 --- a/soc/arm/atmel_sam/sam3x/soc.c +++ b/soc/arm/atmel_sam/sam3x/soc.c @@ -202,11 +202,10 @@ static ALWAYS_INLINE void clock_init(void) * * @return 0 */ -static int atmel_sam3x_init(const struct device *arg) +static int atmel_sam3x_init(void) { uint32_t key; - ARG_UNUSED(arg); key = irq_lock(); diff --git a/soc/arm/atmel_sam/sam4e/soc.c b/soc/arm/atmel_sam/sam4e/soc.c index 3bf6c83f9d141..4407b2325d386 100644 --- a/soc/arm/atmel_sam/sam4e/soc.c +++ b/soc/arm/atmel_sam/sam4e/soc.c @@ -190,11 +190,10 @@ static ALWAYS_INLINE void clock_init(void) * * @return 0 */ -static int atmel_sam4e_init(const struct device *arg) +static int atmel_sam4e_init(void) { uint32_t key; - ARG_UNUSED(arg); key = irq_lock(); diff --git a/soc/arm/atmel_sam/sam4l/soc.c b/soc/arm/atmel_sam/sam4l/soc.c index 59a08a84e4825..daa56188404ac 100644 --- a/soc/arm/atmel_sam/sam4l/soc.c +++ b/soc/arm/atmel_sam/sam4l/soc.c @@ -273,11 +273,10 @@ static ALWAYS_INLINE void clock_init(void) * * @return 0 */ -static int atmel_sam4l_init(const struct device *arg) +static int atmel_sam4l_init(void) { uint32_t key; - ARG_UNUSED(arg); key = irq_lock(); diff --git a/soc/arm/atmel_sam/sam4s/soc.c b/soc/arm/atmel_sam/sam4s/soc.c index f3bdcfdf77fc1..395972549d734 100644 --- a/soc/arm/atmel_sam/sam4s/soc.c +++ b/soc/arm/atmel_sam/sam4s/soc.c @@ -189,11 +189,10 @@ static ALWAYS_INLINE void clock_init(void) * * @return 0 */ -static int atmel_sam4s_init(const struct device *arg) +static int atmel_sam4s_init(void) { uint32_t key; - ARG_UNUSED(arg); key = irq_lock(); diff --git a/soc/arm/atmel_sam/same70/soc.c b/soc/arm/atmel_sam/same70/soc.c index 34198736698b4..5bded6490db51 100644 --- a/soc/arm/atmel_sam/same70/soc.c +++ b/soc/arm/atmel_sam/same70/soc.c @@ -232,11 +232,10 @@ static ALWAYS_INLINE void clock_init(void) * * @return 0 */ -static int atmel_same70_init(const struct device *arg) +static int atmel_same70_init(void) { uint32_t key; - ARG_UNUSED(arg); key = irq_lock(); diff --git a/soc/arm/atmel_sam/same70/soc_config.c b/soc/arm/atmel_sam/same70/soc_config.c index 9c29038976f5c..27d71da492078 100644 --- a/soc/arm/atmel_sam/same70/soc_config.c +++ b/soc/arm/atmel_sam/same70/soc_config.c @@ -20,7 +20,7 @@ * * @return 0 */ -static int atmel_same70_config(const struct device *dev) +static int atmel_same70_config(void) { #ifdef CONFIG_SOC_ATMEL_SAME70_DISABLE_ERASE_PIN /* Disable ERASE function on PB12 pin, this is controlled by Bus Matrix */ diff --git a/soc/arm/atmel_sam/samv71/soc.c b/soc/arm/atmel_sam/samv71/soc.c index 083e2f44ea6a5..7f04c0bbb3ca3 100644 --- a/soc/arm/atmel_sam/samv71/soc.c +++ b/soc/arm/atmel_sam/samv71/soc.c @@ -233,11 +233,10 @@ static ALWAYS_INLINE void clock_init(void) * * @return 0 */ -static int atmel_samv71_init(const struct device *arg) +static int atmel_samv71_init(void) { uint32_t key; - ARG_UNUSED(arg); key = irq_lock(); diff --git a/soc/arm/atmel_sam/samv71/soc_config.c b/soc/arm/atmel_sam/samv71/soc_config.c index f594016277bae..2bcff02753984 100644 --- a/soc/arm/atmel_sam/samv71/soc_config.c +++ b/soc/arm/atmel_sam/samv71/soc_config.c @@ -21,7 +21,7 @@ * * @return 0 */ -static int atmel_samv71_config(const struct device *dev) +static int atmel_samv71_config(void) { #ifdef CONFIG_SOC_ATMEL_SAMV71_DISABLE_ERASE_PIN /* Disable ERASE function on PB12 pin, this is controlled by Bus diff --git a/soc/arm/atmel_sam0/common/bossa.c b/soc/arm/atmel_sam0/common/bossa.c index 13e9dadcd3aae..b978d3d50c45c 100644 --- a/soc/arm/atmel_sam0/common/bossa.c +++ b/soc/arm/atmel_sam0/common/bossa.c @@ -43,7 +43,7 @@ static void bossa_reset(const struct device *dev, uint32_t rate) NVIC_SystemReset(); } -static int bossa_init(const struct device *unused) +static int bossa_init(void) { const struct device *dev = device_get_binding(CONFIG_BOOTLOADER_BOSSA_DEVICE_NAME); diff --git a/soc/arm/atmel_sam0/common/soc_samc2x.c b/soc/arm/atmel_sam0/common/soc_samc2x.c index 3efc4071eea85..4eefe27af4dce 100644 --- a/soc/arm/atmel_sam0/common/soc_samc2x.c +++ b/soc/arm/atmel_sam0/common/soc_samc2x.c @@ -43,11 +43,10 @@ static void gclks_init(void) | GCLK_GENCTRL_GENEN; } -static int atmel_samc_init(const struct device *arg) +static int atmel_samc_init(void) { uint32_t key; - ARG_UNUSED(arg); key = irq_lock(); diff --git a/soc/arm/atmel_sam0/common/soc_samd2x.c b/soc/arm/atmel_sam0/common/soc_samd2x.c index 049d2dceaca07..90c0d1b008d2f 100644 --- a/soc/arm/atmel_sam0/common/soc_samd2x.c +++ b/soc/arm/atmel_sam0/common/soc_samd2x.c @@ -255,11 +255,10 @@ static inline void osc8m_disable(void) } #endif -static int atmel_samd_init(const struct device *arg) +static int atmel_samd_init(void) { uint32_t key; - ARG_UNUSED(arg); key = irq_lock(); diff --git a/soc/arm/atmel_sam0/common/soc_samd5x.c b/soc/arm/atmel_sam0/common/soc_samd5x.c index 5b7abfadb041f..557b4e5599902 100644 --- a/soc/arm/atmel_sam0/common/soc_samd5x.c +++ b/soc/arm/atmel_sam0/common/soc_samd5x.c @@ -105,7 +105,7 @@ static void gclk_connect(uint8_t gclk, uint8_t src, uint8_t div) | GCLK_GENCTRL_GENEN; } -static int atmel_samd_init(const struct device *arg) +static int atmel_samd_init(void) { uint32_t key; uint8_t dfll_div; @@ -118,7 +118,6 @@ static int atmel_samd_init(const struct device *arg) dfll_div = 1; } - ARG_UNUSED(arg); key = irq_lock(); diff --git a/soc/arm/atmel_sam0/common/soc_saml2x.c b/soc/arm/atmel_sam0/common/soc_saml2x.c index 3ba38392f96bf..5e8d0a8061c49 100644 --- a/soc/arm/atmel_sam0/common/soc_saml2x.c +++ b/soc/arm/atmel_sam0/common/soc_saml2x.c @@ -243,11 +243,10 @@ static inline void pause_for_debug(void) static inline void pause_for_debug(void) {} #endif -static int atmel_saml_init(const struct device *arg) +static int atmel_saml_init(void) { uint32_t key; - ARG_UNUSED(arg); key = irq_lock(); diff --git a/soc/arm/atmel_sam0/common/soc_samr34.c b/soc/arm/atmel_sam0/common/soc_samr34.c index 7db477929b829..a0e7bace1b645 100644 --- a/soc/arm/atmel_sam0/common/soc_samr34.c +++ b/soc/arm/atmel_sam0/common/soc_samr34.c @@ -13,11 +13,10 @@ * unexpected behavior and increased current consumption... see Chapter 10 of * DS70005356C. We also hold the radio in reset. */ -static int soc_pinconf_init(const struct device *dev) +static int soc_pinconf_init(void) { const struct device *const portb = DEVICE_DT_GET(DT_NODELABEL(portb)); - ARG_UNUSED(dev); if (!device_is_ready(portb)) { return -ENODEV; diff --git a/soc/arm/bcm_vk/valkyrie/soc.c b/soc/arm/bcm_vk/valkyrie/soc.c index 1d33a00dc88a7..bd5e025107cf4 100644 --- a/soc/arm/bcm_vk/valkyrie/soc.c +++ b/soc/arm/bcm_vk/valkyrie/soc.c @@ -17,11 +17,10 @@ * * @return 0 */ -static int valkyrie_init(const struct device *arg) +static int valkyrie_init(void) { uint32_t key; - ARG_UNUSED(arg); key = irq_lock(); diff --git a/soc/arm/bcm_vk/viper/soc.c b/soc/arm/bcm_vk/viper/soc.c index cd22c2feb6516..49ee4a78ebe20 100644 --- a/soc/arm/bcm_vk/viper/soc.c +++ b/soc/arm/bcm_vk/viper/soc.c @@ -18,12 +18,11 @@ * * @return 0 */ -static int viper_init(const struct device *arg) +static int viper_init(void) { uint32_t key; uint32_t data; - ARG_UNUSED(arg); key = irq_lock(); diff --git a/soc/arm/cypress/psoc6/soc.c b/soc/arm/cypress/psoc6/soc.c index ba1ec9f0c7f6a..9a5baefea106c 100644 --- a/soc/arm/cypress/psoc6/soc.c +++ b/soc/arm/cypress/psoc6/soc.c @@ -383,9 +383,8 @@ void Cy_SystemInit(void) #endif } -static int init_cycfg_platform_wraper(const struct device *arg) +static int init_cycfg_platform_wraper(void) { - ARG_UNUSED(arg); SystemInit(); return 0; } diff --git a/soc/arm/gigadevice/gd32a50x/soc.c b/soc/arm/gigadevice/gd32a50x/soc.c index e20bdfab0cd6a..0a5033796c6bd 100644 --- a/soc/arm/gigadevice/gd32a50x/soc.c +++ b/soc/arm/gigadevice/gd32a50x/soc.c @@ -19,11 +19,10 @@ void z_arm_platform_init(void) } } -static int gd32a50x_soc_init(const struct device *dev) +static int gd32a50x_soc_init(void) { uint32_t key; - ARG_UNUSED(dev); key = irq_lock(); diff --git a/soc/arm/gigadevice/gd32e10x/soc.c b/soc/arm/gigadevice/gd32e10x/soc.c index 2ca3748c9d805..6958f5bb1c135 100644 --- a/soc/arm/gigadevice/gd32e10x/soc.c +++ b/soc/arm/gigadevice/gd32e10x/soc.c @@ -8,11 +8,10 @@ #include #include -static int gd32e10x_soc_init(const struct device *dev) +static int gd32e10x_soc_init(void) { uint32_t key; - ARG_UNUSED(dev); key = irq_lock(); diff --git a/soc/arm/gigadevice/gd32e50x/soc.c b/soc/arm/gigadevice/gd32e50x/soc.c index ece50f1cdad55..e8731171d583e 100644 --- a/soc/arm/gigadevice/gd32e50x/soc.c +++ b/soc/arm/gigadevice/gd32e50x/soc.c @@ -6,11 +6,10 @@ #include #include -static int gd32e50x_soc_init(const struct device *dev) +static int gd32e50x_soc_init(void) { uint32_t key; - ARG_UNUSED(dev); key = irq_lock(); diff --git a/soc/arm/gigadevice/gd32f3x0/soc.c b/soc/arm/gigadevice/gd32f3x0/soc.c index 9b253303d284a..1f160d495954a 100644 --- a/soc/arm/gigadevice/gd32f3x0/soc.c +++ b/soc/arm/gigadevice/gd32f3x0/soc.c @@ -8,11 +8,10 @@ #include #include -static int gd32f3x0_init(const struct device *dev) +static int gd32f3x0_init(void) { uint32_t key; - ARG_UNUSED(dev); key = irq_lock(); diff --git a/soc/arm/gigadevice/gd32f403/soc.c b/soc/arm/gigadevice/gd32f403/soc.c index 64bdc42f4b0ed..2c5c0c5e0371f 100644 --- a/soc/arm/gigadevice/gd32f403/soc.c +++ b/soc/arm/gigadevice/gd32f403/soc.c @@ -23,11 +23,10 @@ * * @return 0 */ -static int gigadevice_gd32_soc_init(const struct device *arg) +static int gigadevice_gd32_soc_init(void) { uint32_t key; - ARG_UNUSED(arg); key = irq_lock(); diff --git a/soc/arm/gigadevice/gd32f4xx/soc.c b/soc/arm/gigadevice/gd32f4xx/soc.c index 266d906a37c8d..d7b189530a987 100644 --- a/soc/arm/gigadevice/gd32f4xx/soc.c +++ b/soc/arm/gigadevice/gd32f4xx/soc.c @@ -7,11 +7,10 @@ #include #include -static int gd32f4xx_soc_init(const struct device *dev) +static int gd32f4xx_soc_init(void) { uint32_t key; - ARG_UNUSED(dev); key = irq_lock(); diff --git a/soc/arm/gigadevice/gd32l23x/soc.c b/soc/arm/gigadevice/gd32l23x/soc.c index 4f057a2f28353..89e8821be5a3f 100644 --- a/soc/arm/gigadevice/gd32l23x/soc.c +++ b/soc/arm/gigadevice/gd32l23x/soc.c @@ -8,11 +8,10 @@ #include #include -static int gd32l23x_init(const struct device *dev) +static int gd32l23x_init(void) { uint32_t key; - ARG_UNUSED(dev); key = irq_lock(); diff --git a/soc/arm/infineon_cat1/psoc6/soc.c b/soc/arm/infineon_cat1/psoc6/soc.c index 200cd62f35684..74c3703bb03a1 100644 --- a/soc/arm/infineon_cat1/psoc6/soc.c +++ b/soc/arm/infineon_cat1/psoc6/soc.c @@ -54,9 +54,8 @@ cy_en_sysint_status_t Cy_SysInt_Init(const cy_stc_sysint_t *config, cy_israddres return status; } -static int init_cycfg_platform_wraper(const struct device *arg) +static int init_cycfg_platform_wraper(void) { - ARG_UNUSED(arg); /* Initializes the system */ SystemInit(); diff --git a/soc/arm/intel_socfpga_std/cyclonev/soc.c b/soc/arm/intel_socfpga_std/cyclonev/soc.c index 2925323a02223..3ae336ebe6782 100644 --- a/soc/arm/intel_socfpga_std/cyclonev/soc.c +++ b/soc/arm/intel_socfpga_std/cyclonev/soc.c @@ -70,9 +70,8 @@ const struct arm_mmu_config mmu_config = { * * @return 0 */ -static int soc_intel_cyclonev_init(const struct device *arg) +static int soc_intel_cyclonev_init(void) { - ARG_UNUSED(arg); NMI_INIT(); unsigned int sctlr = __get_SCTLR(); /* modifying some registers prior to initialization */ diff --git a/soc/arm/microchip_mec/mec1501/soc.c b/soc/arm/microchip_mec/mec1501/soc.c index bec90693ea122..11960427ae6ed 100644 --- a/soc/arm/microchip_mec/mec1501/soc.c +++ b/soc/arm/microchip_mec/mec1501/soc.c @@ -71,11 +71,10 @@ static void configure_debug_interface(void) #endif /* CONFIG_SOC_MEC1501_DEBUG_WITHOUT_TRACING */ } -static int soc_init(const struct device *dev) +static int soc_init(void) { uint32_t isave; - ARG_UNUSED(dev); isave = __get_PRIMASK(); __disable_irq(); diff --git a/soc/arm/microchip_mec/mec1701/soc.c b/soc/arm/microchip_mec/mec1701/soc.c index ef84c10e43dee..63c6e699054fe 100644 --- a/soc/arm/microchip_mec/mec1701/soc.c +++ b/soc/arm/microchip_mec/mec1701/soc.c @@ -10,7 +10,7 @@ #include -static int soc_init(const struct device *dev) +static int soc_init(void) { __IO uint32_t *girc_enable_set; diff --git a/soc/arm/microchip_mec/mec172x/soc.c b/soc/arm/microchip_mec/mec172x/soc.c index 9b8af78cd3367..e8edd7e7aaef9 100644 --- a/soc/arm/microchip_mec/mec172x/soc.c +++ b/soc/arm/microchip_mec/mec172x/soc.c @@ -38,9 +38,8 @@ static void configure_debug_interface(void) #endif /* CONFIG_SOC_MEC172X_DEBUG_DISABLED */ } -static int soc_init(const struct device *dev) +static int soc_init(void) { - ARG_UNUSED(dev); configure_debug_interface(); diff --git a/soc/arm/nordic_nrf/nrf51/soc.c b/soc/arm/nordic_nrf/nrf51/soc.c index 72f362cd4ecc5..c8f8df24dc923 100644 --- a/soc/arm/nordic_nrf/nrf51/soc.c +++ b/soc/arm/nordic_nrf/nrf51/soc.c @@ -32,11 +32,10 @@ void sys_arch_reboot(int type) NVIC_SystemReset(); } -static int nordicsemi_nrf51_init(const struct device *arg) +static int nordicsemi_nrf51_init(void) { uint32_t key; - ARG_UNUSED(arg); key = irq_lock(); diff --git a/soc/arm/nordic_nrf/nrf52/soc.c b/soc/arm/nordic_nrf/nrf52/soc.c index 2c472321233ed..d608bc2adfd99 100644 --- a/soc/arm/nordic_nrf/nrf52/soc.c +++ b/soc/arm/nordic_nrf/nrf52/soc.c @@ -49,11 +49,10 @@ void sys_arch_reboot(int type) NVIC_SystemReset(); } -static int nordicsemi_nrf52_init(const struct device *arg) +static int nordicsemi_nrf52_init(void) { uint32_t key; - ARG_UNUSED(arg); key = irq_lock(); diff --git a/soc/arm/nordic_nrf/nrf53/soc.c b/soc/arm/nordic_nrf/nrf53/soc.c index a116bb59d4017..dddeefeec4227 100644 --- a/soc/arm/nordic_nrf/nrf53/soc.c +++ b/soc/arm/nordic_nrf/nrf53/soc.c @@ -150,12 +150,10 @@ bool z_arm_on_enter_cpu_idle(void) } #endif /* CONFIG_SOC_NRF53_ANOMALY_160_WORKAROUND */ -static int nordicsemi_nrf53_init(const struct device *arg) +static int nordicsemi_nrf53_init(void) { uint32_t key; - ARG_UNUSED(arg); - key = irq_lock(); #if defined(CONFIG_SOC_NRF5340_CPUAPP) && defined(CONFIG_NRF_ENABLE_CACHE) diff --git a/soc/arm/nordic_nrf/nrf53/sync_rtc.c b/soc/arm/nordic_nrf/nrf53/sync_rtc.c index 96b2feb6ae48b..a8ae2f547c8c4 100644 --- a/soc/arm/nordic_nrf/nrf53/sync_rtc.c +++ b/soc/arm/nordic_nrf/nrf53/sync_rtc.c @@ -226,10 +226,8 @@ static int mbox_rx_init(void *user_data) } /* Setup RTC synchronization. */ -static int sync_rtc_setup(const struct device *unused) +static int sync_rtc_setup(void) { - ARG_UNUSED(unused); - nrfx_err_t err; union rtc_sync_channels channels; int32_t sync_rtc_ch; diff --git a/soc/arm/nordic_nrf/nrf91/soc.c b/soc/arm/nordic_nrf/nrf91/soc.c index 2715ae0dfee29..2a4ed52e799e4 100644 --- a/soc/arm/nordic_nrf/nrf91/soc.c +++ b/soc/arm/nordic_nrf/nrf91/soc.c @@ -28,11 +28,10 @@ #define LOG_LEVEL CONFIG_SOC_LOG_LEVEL LOG_MODULE_REGISTER(soc); -static int nordicsemi_nrf91_init(const struct device *arg) +static int nordicsemi_nrf91_init(void) { uint32_t key; - ARG_UNUSED(arg); key = irq_lock(); diff --git a/soc/arm/nuvoton_npcx/common/scfg.c b/soc/arm/nuvoton_npcx/common/scfg.c index 8641676266fe0..18d7f228d2dc1 100644 --- a/soc/arm/nuvoton_npcx/common/scfg.c +++ b/soc/arm/nuvoton_npcx/common/scfg.c @@ -130,7 +130,7 @@ void npcx_host_interface_sel(enum npcx_hif_type hif_type) } /* Pin-control driver registration */ -static int npcx_scfg_init(const struct device *dev) +static int npcx_scfg_init(void) { struct scfg_reg *inst_scfg = HAL_SFCG_INST(); diff --git a/soc/arm/nuvoton_npcx/npcx7/soc.c b/soc/arm/nuvoton_npcx/npcx7/soc.c index de0fcec37ef9c..31c867e1a8ddc 100644 --- a/soc/arm/nuvoton_npcx/npcx7/soc.c +++ b/soc/arm/nuvoton_npcx/npcx7/soc.c @@ -12,9 +12,8 @@ LOG_MODULE_REGISTER(soc, CONFIG_SOC_LOG_LEVEL); -static int soc_init(const struct device *dev) +static int soc_init(void) { - ARG_UNUSED(dev); return 0; } diff --git a/soc/arm/nuvoton_npcx/npcx9/soc.c b/soc/arm/nuvoton_npcx/npcx9/soc.c index 0a461a2586bd6..6a11cce38bc75 100644 --- a/soc/arm/nuvoton_npcx/npcx9/soc.c +++ b/soc/arm/nuvoton_npcx/npcx9/soc.c @@ -12,9 +12,8 @@ LOG_MODULE_REGISTER(soc, CONFIG_SOC_LOG_LEVEL); -static int soc_init(const struct device *dev) +static int soc_init(void) { - ARG_UNUSED(dev); return 0; } diff --git a/soc/arm/nxp_imx/mcimx6x_m4/soc.c b/soc/arm/nxp_imx/mcimx6x_m4/soc.c index 7b3199def5c70..dc10b5c300e90 100644 --- a/soc/arm/nxp_imx/mcimx6x_m4/soc.c +++ b/soc/arm/nxp_imx/mcimx6x_m4/soc.c @@ -277,9 +277,8 @@ static void SOC_ClockInit(void) * * @return 0 */ -static int mcimx6x_m4_init(const struct device *arg) +static int mcimx6x_m4_init(void) { - ARG_UNUSED(arg); unsigned int oldLevel; /* Old interrupt lock level */ diff --git a/soc/arm/nxp_imx/mcimx7_m4/soc.c b/soc/arm/nxp_imx/mcimx7_m4/soc.c index 50f67270593cd..5ebf3ec073839 100644 --- a/soc/arm/nxp_imx/mcimx7_m4/soc.c +++ b/soc/arm/nxp_imx/mcimx7_m4/soc.c @@ -222,9 +222,8 @@ static void nxp_mcimx7_mu_config(void) } #endif /* CONFIG_IPM_IMX */ -static int nxp_mcimx7_init(const struct device *arg) +static int nxp_mcimx7_init(void) { - ARG_UNUSED(arg); /* SoC specific RDC settings */ SOC_RdcInit(); diff --git a/soc/arm/nxp_imx/mimx8ml8_m7/soc.c b/soc/arm/nxp_imx/mimx8ml8_m7/soc.c index 5b9f818d97bec..835985eb663b3 100644 --- a/soc/arm/nxp_imx/mimx8ml8_m7/soc.c +++ b/soc/arm/nxp_imx/mimx8ml8_m7/soc.c @@ -148,9 +148,8 @@ static void SOC_ClockInit(void) CLOCK_EnableClock(kCLOCK_Sec_Debug); } -static int nxp_mimx8ml8_init(const struct device *arg) +static int nxp_mimx8ml8_init(void) { - ARG_UNUSED(arg); /* SoC specific RDC settings */ SOC_RdcInit(); diff --git a/soc/arm/nxp_imx/mimx8mm6_m4/soc.c b/soc/arm/nxp_imx/mimx8mm6_m4/soc.c index c2ff6d1bc09d9..fab49d98bffce 100644 --- a/soc/arm/nxp_imx/mimx8mm6_m4/soc.c +++ b/soc/arm/nxp_imx/mimx8mm6_m4/soc.c @@ -148,9 +148,8 @@ static void SOC_ClockInit(void) CLOCK_EnableClock(kCLOCK_Sec_Debug); } -static int nxp_mimx8mm6_init(const struct device *arg) +static int nxp_mimx8mm6_init(void) { - ARG_UNUSED(arg); /* SoC specific RDC settings */ SOC_RdcInit(); diff --git a/soc/arm/nxp_imx/mimx8mq6_m4/soc.c b/soc/arm/nxp_imx/mimx8mq6_m4/soc.c index 2f58ac9e4ef88..e2849f62fe4c1 100644 --- a/soc/arm/nxp_imx/mimx8mq6_m4/soc.c +++ b/soc/arm/nxp_imx/mimx8mq6_m4/soc.c @@ -111,9 +111,8 @@ static void SOC_ClockInit(void) CLOCK_EnableClock(kCLOCK_Sec_Debug); } -static int nxp_mimx8mq6_init(const struct device *arg) +static int nxp_mimx8mq6_init(void) { - ARG_UNUSED(arg); /* SoC specific RDC settings */ SOC_RdcInit(); diff --git a/soc/arm/nxp_imx/rt/lpm_rt1064.c b/soc/arm/nxp_imx/rt/lpm_rt1064.c index 0fde542a63776..e4f76bb19bd59 100644 --- a/soc/arm/nxp_imx/rt/lpm_rt1064.c +++ b/soc/arm/nxp_imx/rt/lpm_rt1064.c @@ -335,9 +335,8 @@ void clock_lpm_init(void) XTALOSC24M->OSC_CONFIG1 = tmp_reg; } -static int imxrt_lpm_init(const struct device *dev) +static int imxrt_lpm_init(void) { - ARG_UNUSED(dev); struct clock_callbacks callbacks; uint32_t usb1_pll_pfd0_frac; diff --git a/soc/arm/nxp_imx/rt/power_rt10xx.c b/soc/arm/nxp_imx/rt/power_rt10xx.c index 57a7ccfd950d2..3729bb1920644 100644 --- a/soc/arm/nxp_imx/rt/power_rt10xx.c +++ b/soc/arm/nxp_imx/rt/power_rt10xx.c @@ -239,11 +239,10 @@ __weak void pm_state_exit_post_ops(enum pm_state state, uint8_t substate_id) } /* Initialize power system */ -static int rt10xx_power_init(const struct device *dev) +static int rt10xx_power_init(void) { dcdc_internal_regulator_config_t reg_config; - ARG_UNUSED(dev); /* Ensure clocks to ARM core memory will not be gated in low power mode * if interrupt is pending diff --git a/soc/arm/nxp_imx/rt/power_rt11xx.c b/soc/arm/nxp_imx/rt/power_rt11xx.c index 9ce36869ea44d..559e61ce5bccd 100644 --- a/soc/arm/nxp_imx/rt/power_rt11xx.c +++ b/soc/arm/nxp_imx/rt/power_rt11xx.c @@ -320,9 +320,8 @@ __weak void pm_state_exit_post_ops(enum pm_state state, uint8_t substate_id) } /* Initialize RT11xx Power */ -static int rt11xx_power_init(const struct device *dev) +static int rt11xx_power_init(void) { - ARG_UNUSED(dev); /* Drop SOC target voltage to 1.0 V */ DCDC_SetVDD1P0BuckModeTargetVoltage(DCDC, kDCDC_1P0BuckTarget1P0V); /* Initialize general power controller */ diff --git a/soc/arm/nxp_imx/rt/soc_rt10xx.c b/soc/arm/nxp_imx/rt/soc_rt10xx.c index 455c418855b42..130b154c486bc 100644 --- a/soc/arm/nxp_imx/rt/soc_rt10xx.c +++ b/soc/arm/nxp_imx/rt/soc_rt10xx.c @@ -281,9 +281,8 @@ void imxrt_audio_codec_pll_init(uint32_t clock_name, uint32_t clk_src, * @return 0 */ -static int imxrt_init(const struct device *arg) +static int imxrt_init(void) { - ARG_UNUSED(arg); unsigned int oldLevel; /* old interrupt lock level */ diff --git a/soc/arm/nxp_imx/rt/soc_rt11xx.c b/soc/arm/nxp_imx/rt/soc_rt11xx.c index 66e088dfdd832..8b6c41e87f884 100644 --- a/soc/arm/nxp_imx/rt/soc_rt11xx.c +++ b/soc/arm/nxp_imx/rt/soc_rt11xx.c @@ -622,9 +622,8 @@ void imxrt_post_init_display_interface(void) * @return 0 */ -static int imxrt_init(const struct device *arg) +static int imxrt_init(void) { - ARG_UNUSED(arg); unsigned int oldLevel; /* old interrupt lock level */ @@ -712,7 +711,7 @@ SYS_INIT(imxrt_init, PRE_KERNEL_1, 0); * * @return 0 */ -static int second_core_boot(const struct device *arg) +static int second_core_boot(void) { /* Kick CM4 core out of reset */ SRC->CTRL_M4CORE = SRC_CTRL_M4CORE_SW_RESET_MASK; diff --git a/soc/arm/nxp_imx/rt5xx/power.c b/soc/arm/nxp_imx/rt5xx/power.c index 2126de1f7543d..9c95fc3a424ff 100644 --- a/soc/arm/nxp_imx/rt5xx/power.c +++ b/soc/arm/nxp_imx/rt5xx/power.c @@ -92,7 +92,7 @@ __weak void pm_state_exit_post_ops(enum pm_state state, uint8_t substate_id) } /* Initialize power system */ -static int rt5xx_power_init(const struct device *dev) +static int rt5xx_power_init(void) { int ret = 0; diff --git a/soc/arm/nxp_imx/rt5xx/soc.c b/soc/arm/nxp_imx/rt5xx/soc.c index 712a3b07bd735..959362a7034b2 100644 --- a/soc/arm/nxp_imx/rt5xx/soc.c +++ b/soc/arm/nxp_imx/rt5xx/soc.c @@ -442,9 +442,8 @@ void imxrt_post_init_display_interface(void) * * @return 0 */ -static int nxp_rt500_init(const struct device *arg) +static int nxp_rt500_init(void) { - ARG_UNUSED(arg); /* old interrupt lock level */ unsigned int oldLevel; diff --git a/soc/arm/nxp_imx/rt6xx/soc.c b/soc/arm/nxp_imx/rt6xx/soc.c index 229fe09f917ce..e2af6f808c34b 100644 --- a/soc/arm/nxp_imx/rt6xx/soc.c +++ b/soc/arm/nxp_imx/rt6xx/soc.c @@ -342,9 +342,8 @@ void imxrt_usdhc_dat3_pull(bool pullup) * @return 0 */ -static int nxp_rt600_init(const struct device *arg) +static int nxp_rt600_init(void) { - ARG_UNUSED(arg); /* old interrupt lock level */ unsigned int oldLevel; diff --git a/soc/arm/nxp_kinetis/k2x/soc.c b/soc/arm/nxp_kinetis/k2x/soc.c index 0e7997f2e51f1..657d58a273432 100644 --- a/soc/arm/nxp_kinetis/k2x/soc.c +++ b/soc/arm/nxp_kinetis/k2x/soc.c @@ -116,9 +116,8 @@ static ALWAYS_INLINE void clock_init(void) * @return 0 */ -static int fsl_frdm_k22f_init(const struct device *arg) +static int fsl_frdm_k22f_init(void) { - ARG_UNUSED(arg); unsigned int oldLevel; /* old interrupt lock level */ diff --git a/soc/arm/nxp_kinetis/k6x/soc.c b/soc/arm/nxp_kinetis/k6x/soc.c index 6edcd54f49734..75a179477cebd 100644 --- a/soc/arm/nxp_kinetis/k6x/soc.c +++ b/soc/arm/nxp_kinetis/k6x/soc.c @@ -127,9 +127,8 @@ static ALWAYS_INLINE void clock_init(void) * @return 0 */ -static int k6x_init(const struct device *arg) +static int k6x_init(void) { - ARG_UNUSED(arg); unsigned int oldLevel; /* old interrupt lock level */ #if !defined(CONFIG_ARM_MPU) diff --git a/soc/arm/nxp_kinetis/k8x/soc.c b/soc/arm/nxp_kinetis/k8x/soc.c index 7650edede3e95..4f5c7c8f5254c 100644 --- a/soc/arm/nxp_kinetis/k8x/soc.c +++ b/soc/arm/nxp_kinetis/k8x/soc.c @@ -92,9 +92,8 @@ static ALWAYS_INLINE void clk_init(void) #endif } -static int k8x_init(const struct device *arg) +static int k8x_init(void) { - ARG_UNUSED(arg); unsigned int old_level; /* old interrupt lock level */ #if !defined(CONFIG_ARM_MPU) diff --git a/soc/arm/nxp_kinetis/ke1xf/soc.c b/soc/arm/nxp_kinetis/ke1xf/soc.c index 3b68c7cc0f745..40967fb555151 100644 --- a/soc/arm/nxp_kinetis/ke1xf/soc.c +++ b/soc/arm/nxp_kinetis/ke1xf/soc.c @@ -237,10 +237,9 @@ static ALWAYS_INLINE void clk_init(void) #endif } -static int ke1xf_init(const struct device *arg) +static int ke1xf_init(void) { - ARG_UNUSED(arg); unsigned int old_level; /* old interrupt lock level */ #if !defined(CONFIG_ARM_MPU) diff --git a/soc/arm/nxp_kinetis/kl2x/soc.c b/soc/arm/nxp_kinetis/kl2x/soc.c index b850b6b123ee7..3622425378183 100644 --- a/soc/arm/nxp_kinetis/kl2x/soc.c +++ b/soc/arm/nxp_kinetis/kl2x/soc.c @@ -79,9 +79,8 @@ static ALWAYS_INLINE void clock_init(void) #endif } -static int kl2x_init(const struct device *arg) +static int kl2x_init(void) { - ARG_UNUSED(arg); unsigned int oldLevel; /* old interrupt lock level */ diff --git a/soc/arm/nxp_kinetis/kv5x/soc.c b/soc/arm/nxp_kinetis/kv5x/soc.c index a1e68ea3586ab..b8339344ad823 100644 --- a/soc/arm/nxp_kinetis/kv5x/soc.c +++ b/soc/arm/nxp_kinetis/kv5x/soc.c @@ -77,9 +77,8 @@ static ALWAYS_INLINE void clk_init(void) CLOCK_SetSimConfig(&sim_config); } -static int kv5x_init(const struct device *arg) +static int kv5x_init(void) { - ARG_UNUSED(arg); unsigned int old_level; /* old interrupt lock level */ diff --git a/soc/arm/nxp_kinetis/kwx/soc_kw2xd.c b/soc/arm/nxp_kinetis/kwx/soc_kw2xd.c index 804290399e113..c872e95e7fb44 100644 --- a/soc/arm/nxp_kinetis/kwx/soc_kw2xd.c +++ b/soc/arm/nxp_kinetis/kwx/soc_kw2xd.c @@ -147,9 +147,8 @@ static ALWAYS_INLINE void clock_init(void) * * @return 0 */ -static int kw2xd_init(const struct device *arg) +static int kw2xd_init(void) { - ARG_UNUSED(arg); unsigned int oldLevel; /* old interrupt lock level */ diff --git a/soc/arm/nxp_kinetis/kwx/soc_kw4xz.c b/soc/arm/nxp_kinetis/kwx/soc_kw4xz.c index 69746941a5bfc..b178a30004b99 100644 --- a/soc/arm/nxp_kinetis/kwx/soc_kw4xz.c +++ b/soc/arm/nxp_kinetis/kwx/soc_kw4xz.c @@ -80,9 +80,8 @@ static ALWAYS_INLINE void clock_init(void) #endif } -static int kwx_init(const struct device *arg) +static int kwx_init(void) { - ARG_UNUSED(arg); unsigned int oldLevel; /* old interrupt lock level */ diff --git a/soc/arm/nxp_lpc/lpc11u6x/soc.c b/soc/arm/nxp_lpc/lpc11u6x/soc.c index daa0396e8fdcc..8e2b8d3984bd4 100644 --- a/soc/arm/nxp_lpc/lpc11u6x/soc.c +++ b/soc/arm/nxp_lpc/lpc11u6x/soc.c @@ -30,9 +30,8 @@ * @return 0 */ -static int nxp_lpc11u6x_init(const struct device *arg) +static int nxp_lpc11u6x_init(void) { - ARG_UNUSED(arg); /* old interrupt lock level */ unsigned int old_level; diff --git a/soc/arm/nxp_lpc/lpc51u68/soc.c b/soc/arm/nxp_lpc/lpc51u68/soc.c index c53b96f75b9d6..e09800ce872f4 100644 --- a/soc/arm/nxp_lpc/lpc51u68/soc.c +++ b/soc/arm/nxp_lpc/lpc51u68/soc.c @@ -11,7 +11,7 @@ #include #include -int soc_init(const struct device *arg) +int soc_init(void) { POWER_DisablePD(kPDRUNCFG_PD_FRO_EN); CLOCK_SetupFROClocking(12000000U); diff --git a/soc/arm/nxp_lpc/lpc54xxx/soc.c b/soc/arm/nxp_lpc/lpc54xxx/soc.c index 09de42fb237f9..3625f580d4be4 100644 --- a/soc/arm/nxp_lpc/lpc54xxx/soc.c +++ b/soc/arm/nxp_lpc/lpc54xxx/soc.c @@ -107,9 +107,8 @@ static ALWAYS_INLINE void clock_init(void) * @return 0 */ -static int nxp_lpc54114_init(const struct device *arg) +static int nxp_lpc54114_init(void) { - ARG_UNUSED(arg); /* old interrupt lock level */ unsigned int oldLevel; @@ -166,11 +165,10 @@ void z_arm_platform_init(void) * */ /* This function is also called at deep sleep resume. */ -int _slave_init(const struct device *arg) +int _slave_init(void) { int32_t temp; - ARG_UNUSED(arg); /* Enable SRAM2, used by other core */ SYSCON->AHBCLKCTRLSET[0] = SYSCON_AHBCLKCTRL_SRAM2_MASK; diff --git a/soc/arm/nxp_lpc/lpc55xxx/soc.c b/soc/arm/nxp_lpc/lpc55xxx/soc.c index f4358a4bd17db..ed9590fe5d374 100644 --- a/soc/arm/nxp_lpc/lpc55xxx/soc.c +++ b/soc/arm/nxp_lpc/lpc55xxx/soc.c @@ -232,9 +232,8 @@ DT_FOREACH_STATUS_OKAY(nxp_lpc_ctimer, CTIMER_CLOCK_SETUP) * @return 0 */ -static int nxp_lpc55xxx_init(const struct device *arg) +static int nxp_lpc55xxx_init(void) { - ARG_UNUSED(arg); /* old interrupt lock level */ unsigned int oldLevel; @@ -295,11 +294,10 @@ SYS_INIT(nxp_lpc55xxx_init, PRE_KERNEL_1, 0); * */ /* This function is also called at deep sleep resume. */ -int _second_core_init(const struct device *arg) +int _second_core_init(void) { int32_t temp; - ARG_UNUSED(arg); /* Setup the reset handler pointer (PC) and stack pointer value. * This is used once the second core runs its startup code. diff --git a/soc/arm/nxp_s32/s32ze/soc.c b/soc/arm/nxp_s32/s32ze/soc.c index 8186e3290d630..f247983882dfd 100644 --- a/soc/arm/nxp_s32/s32ze/soc.c +++ b/soc/arm/nxp_s32/s32ze/soc.c @@ -42,9 +42,8 @@ void z_arm_platform_init(void) } } -static int soc_init(const struct device *arg) +static int soc_init(void) { - ARG_UNUSED(arg); /* Install default handler that simply resets the CPU if configured in the * kernel, NOP otherwise diff --git a/soc/arm/quicklogic_eos_s3/soc.c b/soc/arm/quicklogic_eos_s3/soc.c index ddf99ac54f8fb..56f7323db9946 100644 --- a/soc/arm/quicklogic_eos_s3/soc.c +++ b/soc/arm/quicklogic_eos_s3/soc.c @@ -64,11 +64,10 @@ static void eos_s3_cru_init(void) -static int eos_s3_init(const struct device *arg) +static int eos_s3_init(void) { uint32_t key; - ARG_UNUSED(arg); /* Clocks setup */ eos_s3_lock_enable(); diff --git a/soc/arm/renesas_rcar/gen3/soc.c b/soc/arm/renesas_rcar/gen3/soc.c index ab81900bf3211..d00f2c4722126 100644 --- a/soc/arm/renesas_rcar/gen3/soc.c +++ b/soc/arm/renesas_rcar/gen3/soc.c @@ -16,9 +16,8 @@ * @return 0 */ -static int soc_init(const struct device *arg) +static int soc_init(void) { - ARG_UNUSED(arg); /* Install default handler that simply resets the CPU * if configured in the kernel, NOP otherwise diff --git a/soc/arm/renesas_smartbond/da1469x/soc.c b/soc/arm/renesas_smartbond/da1469x/soc.c index 047b317281e34..b3d5bbc273cb0 100644 --- a/soc/arm/renesas_smartbond/da1469x/soc.c +++ b/soc/arm/renesas_smartbond/da1469x/soc.c @@ -15,9 +15,8 @@ void sys_arch_reboot(int type) NVIC_SystemReset(); } -static int renesas_da14699_init(const struct device *dev) +static int renesas_da14699_init(void) { - ARG_UNUSED(dev); NMI_INIT(); diff --git a/soc/arm/rpi_pico/rp2/soc.c b/soc/arm/rpi_pico/rp2/soc.c index 8fd9c53a94603..8af2f884a5236 100644 --- a/soc/arm/rpi_pico/rp2/soc.c +++ b/soc/arm/rpi_pico/rp2/soc.c @@ -27,7 +27,7 @@ LOG_MODULE_REGISTER(soc, CONFIG_SOC_LOG_LEVEL); -static int rp2040_init(const struct device *arg) +static int rp2040_init(void) { uint32_t key; @@ -44,7 +44,6 @@ static int rp2040_init(const struct device *arg) unreset_block_wait(RESETS_RESET_BITS); - ARG_UNUSED(arg); key = irq_lock(); diff --git a/soc/arm/silabs_exx32/common/soc.c b/soc/arm/silabs_exx32/common/soc.c index 3537ac9b3c43f..6775b9960f57d 100644 --- a/soc/arm/silabs_exx32/common/soc.c +++ b/soc/arm/silabs_exx32/common/soc.c @@ -193,9 +193,8 @@ static void swo_init(void) * * @return 0 */ -static int silabs_exx32_init(const struct device *arg) +static int silabs_exx32_init(void) { - ARG_UNUSED(arg); unsigned int oldLevel; /* old interrupt lock level */ diff --git a/soc/arm/st_stm32/common/soc_config.c b/soc/arm/st_stm32/common/soc_config.c index cf7d9f2323e80..0e6167b34441b 100644 --- a/soc/arm/st_stm32/common/soc_config.c +++ b/soc/arm/st_stm32/common/soc_config.c @@ -23,7 +23,7 @@ * * @return 0 */ -static int st_stm32_common_config(const struct device *dev) +static int st_stm32_common_config(void) { #ifdef CONFIG_LOG_BACKEND_SWO /* Enable SWO trace asynchronous mode */ diff --git a/soc/arm/st_stm32/stm32c0/soc.c b/soc/arm/st_stm32/stm32c0/soc.c index 4ef3783abe82b..4bff4d055e3a6 100644 --- a/soc/arm/st_stm32/stm32c0/soc.c +++ b/soc/arm/st_stm32/stm32c0/soc.c @@ -26,11 +26,10 @@ * * @return 0 */ -static int stm32c0_init(const struct device *arg) +static int stm32c0_init(void) { uint32_t key; - ARG_UNUSED(arg); key = irq_lock(); diff --git a/soc/arm/st_stm32/stm32f0/soc.c b/soc/arm/st_stm32/stm32f0/soc.c index 1c809f04b9d6e..c5bb64ece3024 100644 --- a/soc/arm/st_stm32/stm32f0/soc.c +++ b/soc/arm/st_stm32/stm32f0/soc.c @@ -67,11 +67,10 @@ void relocate_vector_table(void) * * @return 0 */ -static int stm32f0_init(const struct device *arg) +static int stm32f0_init(void) { uint32_t key; - ARG_UNUSED(arg); key = irq_lock(); diff --git a/soc/arm/st_stm32/stm32f1/soc.c b/soc/arm/st_stm32/stm32f1/soc.c index 7c379de391b25..e5f77d472340f 100644 --- a/soc/arm/st_stm32/stm32f1/soc.c +++ b/soc/arm/st_stm32/stm32f1/soc.c @@ -24,11 +24,10 @@ * * @return 0 */ -static int stm32f1_init(const struct device *arg) +static int stm32f1_init(void) { uint32_t key; - ARG_UNUSED(arg); key = irq_lock(); diff --git a/soc/arm/st_stm32/stm32f2/soc.c b/soc/arm/st_stm32/stm32f2/soc.c index 6462c9d06cf74..4f6b1a397350b 100644 --- a/soc/arm/st_stm32/stm32f2/soc.c +++ b/soc/arm/st_stm32/stm32f2/soc.c @@ -29,11 +29,10 @@ * * @return 0 */ -static int stm32f2_init(const struct device *arg) +static int stm32f2_init(void) { uint32_t key; - ARG_UNUSED(arg); /* Enable ART Flash cache accelerator for both Instruction and Data */ LL_FLASH_EnableInstCache(); diff --git a/soc/arm/st_stm32/stm32f3/soc.c b/soc/arm/st_stm32/stm32f3/soc.c index 88f8865042ce7..dd357e6c18210 100644 --- a/soc/arm/st_stm32/stm32f3/soc.c +++ b/soc/arm/st_stm32/stm32f3/soc.c @@ -25,11 +25,10 @@ * * @return 0 */ -static int stm32f3_init(const struct device *arg) +static int stm32f3_init(void) { uint32_t key; - ARG_UNUSED(arg); key = irq_lock(); diff --git a/soc/arm/st_stm32/stm32f4/soc.c b/soc/arm/st_stm32/stm32f4/soc.c index b08305d4c06c1..616a513caee2d 100644 --- a/soc/arm/st_stm32/stm32f4/soc.c +++ b/soc/arm/st_stm32/stm32f4/soc.c @@ -27,11 +27,10 @@ * * @return 0 */ -static int st_stm32f4_init(const struct device *arg) +static int st_stm32f4_init(void) { uint32_t key; - ARG_UNUSED(arg); /* Enable ART Flash cache accelerator for both instruction and data */ LL_FLASH_EnableInstCache(); diff --git a/soc/arm/st_stm32/stm32f7/soc.c b/soc/arm/st_stm32/stm32f7/soc.c index d6d062993421e..c1768a884be7d 100644 --- a/soc/arm/st_stm32/stm32f7/soc.c +++ b/soc/arm/st_stm32/stm32f7/soc.c @@ -27,11 +27,10 @@ * * @return 0 */ -static int st_stm32f7_init(const struct device *arg) +static int st_stm32f7_init(void) { uint32_t key; - ARG_UNUSED(arg); /* Enable ART Flash cache accelerator */ LL_FLASH_EnableART(); diff --git a/soc/arm/st_stm32/stm32g0/power.c b/soc/arm/st_stm32/stm32g0/power.c index 43b54686f153d..bc9ca8f2a3127 100644 --- a/soc/arm/st_stm32/stm32g0/power.c +++ b/soc/arm/st_stm32/stm32g0/power.c @@ -81,9 +81,8 @@ __weak void pm_state_exit_post_ops(enum pm_state state, uint8_t substate_id) } /* Initialize STM32 Power */ -static int stm32_power_init(const struct device *dev) +static int stm32_power_init(void) { - ARG_UNUSED(dev); /* enable Power clock */ LL_APB1_GRP1_EnableClock(LL_APB1_GRP1_PERIPH_PWR); diff --git a/soc/arm/st_stm32/stm32g0/soc.c b/soc/arm/st_stm32/stm32g0/soc.c index f4861c91f8677..854737cb2d973 100644 --- a/soc/arm/st_stm32/stm32g0/soc.c +++ b/soc/arm/st_stm32/stm32g0/soc.c @@ -81,11 +81,10 @@ static void stm32g0_disable_dead_battery(void) * * @return 0 */ -static int stm32g0_init(const struct device *arg) +static int stm32g0_init(void) { uint32_t key; - ARG_UNUSED(arg); key = irq_lock(); diff --git a/soc/arm/st_stm32/stm32g4/power.c b/soc/arm/st_stm32/stm32g4/power.c index 0e4ea8d386686..7d55a3c420947 100644 --- a/soc/arm/st_stm32/stm32g4/power.c +++ b/soc/arm/st_stm32/stm32g4/power.c @@ -79,9 +79,8 @@ __weak void pm_state_exit_post_ops(enum pm_state state, uint8_t substate_id) } /* Initialize STM32 Power */ -static int stm32_power_init(const struct device *dev) +static int stm32_power_init(void) { - ARG_UNUSED(dev); /* enable Power clock */ LL_APB1_GRP1_EnableClock(LL_APB1_GRP1_PERIPH_PWR); diff --git a/soc/arm/st_stm32/stm32g4/soc.c b/soc/arm/st_stm32/stm32g4/soc.c index 1e35951399830..1ab0e8de3838c 100644 --- a/soc/arm/st_stm32/stm32g4/soc.c +++ b/soc/arm/st_stm32/stm32g4/soc.c @@ -30,11 +30,10 @@ * * @return 0 */ -static int stm32g4_init(const struct device *arg) +static int stm32g4_init(void) { uint32_t key; - ARG_UNUSED(arg); key = irq_lock(); diff --git a/soc/arm/st_stm32/stm32h5/soc.c b/soc/arm/st_stm32/stm32h5/soc.c index 67483764ad796..6b2b72ac73fd9 100644 --- a/soc/arm/st_stm32/stm32h5/soc.c +++ b/soc/arm/st_stm32/stm32h5/soc.c @@ -31,11 +31,10 @@ LOG_MODULE_REGISTER(soc); * * @return 0 */ -static int stm32h5_init(const struct device *arg) +static int stm32h5_init(void) { uint32_t key; - ARG_UNUSED(arg); key = irq_lock(); diff --git a/soc/arm/st_stm32/stm32h7/soc_m4.c b/soc/arm/st_stm32/stm32h7/soc_m4.c index 4893cc0138568..a7543a1317108 100644 --- a/soc/arm/st_stm32/stm32h7/soc_m4.c +++ b/soc/arm/st_stm32/stm32h7/soc_m4.c @@ -32,7 +32,7 @@ * * @return 0 */ -static int stm32h7_m4_init(const struct device *arg) +static int stm32h7_m4_init(void) { uint32_t key; diff --git a/soc/arm/st_stm32/stm32h7/soc_m7.c b/soc/arm/st_stm32/stm32h7/soc_m7.c index 09eb37337effa..d9fdab8d56488 100644 --- a/soc/arm/st_stm32/stm32h7/soc_m7.c +++ b/soc/arm/st_stm32/stm32h7/soc_m7.c @@ -24,7 +24,7 @@ #include "stm32_hsem.h" #if defined(CONFIG_STM32H7_DUAL_CORE) -static int stm32h7_m4_wakeup(const struct device *arg) +static int stm32h7_m4_wakeup(void) { /* HW semaphore and SysCfg Clock enable */ @@ -54,11 +54,10 @@ static int stm32h7_m4_wakeup(const struct device *arg) * * @return 0 */ -static int stm32h7_init(const struct device *arg) +static int stm32h7_init(void) { uint32_t key; - ARG_UNUSED(arg); key = irq_lock(); diff --git a/soc/arm/st_stm32/stm32l0/power.c b/soc/arm/st_stm32/stm32l0/power.c index a1fa8ae4e41ea..585aaf69293f9 100644 --- a/soc/arm/st_stm32/stm32l0/power.c +++ b/soc/arm/st_stm32/stm32l0/power.c @@ -83,9 +83,8 @@ __weak void pm_state_exit_post_ops(enum pm_state state, uint8_t substate_id) } /* Initialize STM32 Power */ -static int stm32_power_init(const struct device *dev) +static int stm32_power_init(void) { - ARG_UNUSED(dev); /* Enable Power clock */ LL_APB1_GRP1_EnableClock(LL_APB1_GRP1_PERIPH_PWR); diff --git a/soc/arm/st_stm32/stm32l0/soc.c b/soc/arm/st_stm32/stm32l0/soc.c index 7e424aca72c30..e8f2bc81a1e82 100644 --- a/soc/arm/st_stm32/stm32l0/soc.c +++ b/soc/arm/st_stm32/stm32l0/soc.c @@ -29,11 +29,10 @@ * * @return 0 */ -static int stm32l0_init(const struct device *arg) +static int stm32l0_init(void) { uint32_t key; - ARG_UNUSED(arg); key = irq_lock(); diff --git a/soc/arm/st_stm32/stm32l1/soc.c b/soc/arm/st_stm32/stm32l1/soc.c index c7f671fed4174..00d9f662ff420 100644 --- a/soc/arm/st_stm32/stm32l1/soc.c +++ b/soc/arm/st_stm32/stm32l1/soc.c @@ -28,11 +28,10 @@ * * @return 0 */ -static int stm32l1_init(const struct device *arg) +static int stm32l1_init(void) { uint32_t key; - ARG_UNUSED(arg); key = irq_lock(); diff --git a/soc/arm/st_stm32/stm32l4/power.c b/soc/arm/st_stm32/stm32l4/power.c index 10d423a38334c..b8445a7165cd6 100644 --- a/soc/arm/st_stm32/stm32l4/power.c +++ b/soc/arm/st_stm32/stm32l4/power.c @@ -146,9 +146,8 @@ __weak void pm_state_exit_post_ops(enum pm_state state, uint8_t substate_id) } /* Initialize STM32 Power */ -static int stm32_power_init(const struct device *dev) +static int stm32_power_init(void) { - ARG_UNUSED(dev); /* enable Power clock */ LL_APB1_GRP1_EnableClock(LL_APB1_GRP1_PERIPH_PWR); diff --git a/soc/arm/st_stm32/stm32l4/soc.c b/soc/arm/st_stm32/stm32l4/soc.c index 60c635783a165..7bb37722384f3 100644 --- a/soc/arm/st_stm32/stm32l4/soc.c +++ b/soc/arm/st_stm32/stm32l4/soc.c @@ -30,11 +30,10 @@ LOG_MODULE_REGISTER(soc); * * @return 0 */ -static int stm32l4_init(const struct device *arg) +static int stm32l4_init(void) { uint32_t key; - ARG_UNUSED(arg); key = irq_lock(); diff --git a/soc/arm/st_stm32/stm32l5/power.c b/soc/arm/st_stm32/stm32l5/power.c index 770cffb67f10b..e799b88c86ef0 100644 --- a/soc/arm/st_stm32/stm32l5/power.c +++ b/soc/arm/st_stm32/stm32l5/power.c @@ -98,9 +98,8 @@ __weak void pm_state_exit_post_ops(enum pm_state state, uint8_t substate_id) } /* Initialize STM32 Power */ -static int stm32_power_init(const struct device *dev) +static int stm32_power_init(void) { - ARG_UNUSED(dev); /* enable Power clock */ LL_APB1_GRP1_EnableClock(LL_APB1_GRP1_PERIPH_PWR); diff --git a/soc/arm/st_stm32/stm32l5/soc.c b/soc/arm/st_stm32/stm32l5/soc.c index 046b9e7c214d8..1db1bf0411a5f 100644 --- a/soc/arm/st_stm32/stm32l5/soc.c +++ b/soc/arm/st_stm32/stm32l5/soc.c @@ -31,11 +31,10 @@ LOG_MODULE_REGISTER(soc); * * @return 0 */ -static int stm32l5_init(const struct device *arg) +static int stm32l5_init(void) { uint32_t key; - ARG_UNUSED(arg); /* Enable ICACHE */ while (LL_ICACHE_IsActiveFlag_BUSY()) { diff --git a/soc/arm/st_stm32/stm32mp1/soc.c b/soc/arm/st_stm32/stm32mp1/soc.c index 42a50105bd9d8..35d8155ab8870 100644 --- a/soc/arm/st_stm32/stm32mp1/soc.c +++ b/soc/arm/st_stm32/stm32mp1/soc.c @@ -27,11 +27,10 @@ * * @return 0 */ -static int stm32m4_init(const struct device *arg) +static int stm32m4_init(void) { uint32_t key; - ARG_UNUSED(arg); key = irq_lock(); diff --git a/soc/arm/st_stm32/stm32u5/power.c b/soc/arm/st_stm32/stm32u5/power.c index b050caa55a5b9..32e8e7334e29b 100644 --- a/soc/arm/st_stm32/stm32u5/power.c +++ b/soc/arm/st_stm32/stm32u5/power.c @@ -127,9 +127,8 @@ __weak void pm_state_exit_post_ops(enum pm_state state, uint8_t substate_id) } /* Initialize STM32 Power */ -static int stm32_power_init(const struct device *dev) +static int stm32_power_init(void) { - ARG_UNUSED(dev); /* enable Power clock */ LL_AHB3_GRP1_EnableClock(LL_AHB3_GRP1_PERIPH_PWR); diff --git a/soc/arm/st_stm32/stm32u5/soc.c b/soc/arm/st_stm32/stm32u5/soc.c index ff1931396aae8..ddd1f304a8fd7 100644 --- a/soc/arm/st_stm32/stm32u5/soc.c +++ b/soc/arm/st_stm32/stm32u5/soc.c @@ -31,11 +31,10 @@ LOG_MODULE_REGISTER(soc); * * @return 0 */ -static int stm32u5_init(const struct device *arg) +static int stm32u5_init(void) { uint32_t key; - ARG_UNUSED(arg); key = irq_lock(); diff --git a/soc/arm/st_stm32/stm32wb/power.c b/soc/arm/st_stm32/stm32wb/power.c index 291bec1094cf9..fba9c06aad2d3 100644 --- a/soc/arm/st_stm32/stm32wb/power.c +++ b/soc/arm/st_stm32/stm32wb/power.c @@ -148,9 +148,8 @@ __weak void pm_state_exit_post_ops(enum pm_state state, uint8_t substate_id) } /* Initialize STM32 Power */ -static int stm32_power_init(const struct device *dev) +static int stm32_power_init(void) { - ARG_UNUSED(dev); #ifdef CONFIG_DEBUG /* Enable the Debug Module during STOP mode */ diff --git a/soc/arm/st_stm32/stm32wb/soc.c b/soc/arm/st_stm32/stm32wb/soc.c index 7459b47bc2ed9..af45930da2999 100644 --- a/soc/arm/st_stm32/stm32wb/soc.c +++ b/soc/arm/st_stm32/stm32wb/soc.c @@ -28,11 +28,10 @@ LOG_MODULE_REGISTER(soc); * * @return 0 */ -static int stm32wb_init(const struct device *arg) +static int stm32wb_init(void) { uint32_t key; - ARG_UNUSED(arg); key = irq_lock(); diff --git a/soc/arm/st_stm32/stm32wl/power.c b/soc/arm/st_stm32/stm32wl/power.c index b0b4755ddc1ee..e85f55ea39a3d 100644 --- a/soc/arm/st_stm32/stm32wl/power.c +++ b/soc/arm/st_stm32/stm32wl/power.c @@ -102,9 +102,8 @@ __weak void pm_state_exit_post_ops(enum pm_state state, uint8_t substate_id) } /* Initialize STM32 Power */ -static int stm32_power_init(const struct device *dev) +static int stm32_power_init(void) { - ARG_UNUSED(dev); #ifdef CONFIG_DEBUG /* Enable the Debug Module during STOP mode */ diff --git a/soc/arm/st_stm32/stm32wl/soc.c b/soc/arm/st_stm32/stm32wl/soc.c index 2c68418deae47..ab47e82fe5056 100644 --- a/soc/arm/st_stm32/stm32wl/soc.c +++ b/soc/arm/st_stm32/stm32wl/soc.c @@ -26,11 +26,10 @@ * * @return 0 */ -static int stm32wl_init(const struct device *arg) +static int stm32wl_init(void) { uint32_t key; - ARG_UNUSED(arg); /* Enable CPU data and instruction cache */ LL_FLASH_EnableInstCache(); diff --git a/soc/arm/ti_lm3s6965/soc.c b/soc/arm/ti_lm3s6965/soc.c index 19887aafcb147..596dd9d75691c 100644 --- a/soc/arm/ti_lm3s6965/soc.c +++ b/soc/arm/ti_lm3s6965/soc.c @@ -30,9 +30,8 @@ * @return 0 */ -static int ti_lm3s6965_init(const struct device *arg) +static int ti_lm3s6965_init(void) { - ARG_UNUSED(arg); /* Install default handler that simply resets the CPU * if configured in the kernel, NOP otherwise diff --git a/soc/arm/ti_lm3s6965/soc_config.c b/soc/arm/ti_lm3s6965/soc_config.c index d8ddc9330c1ac..669e2d88bddf2 100644 --- a/soc/arm/ti_lm3s6965/soc_config.c +++ b/soc/arm/ti_lm3s6965/soc_config.c @@ -24,7 +24,7 @@ #define RCGC1_UART1_EN 0x00000002 #define RCGC1_UART2_EN 0x00000004 -static int uart_stellaris_init(const struct device *dev) +static int uart_stellaris_init(void) { #ifdef CONFIG_UART_STELLARIS_PORT_0 RCGC1 |= RCGC1_UART0_EN; @@ -52,7 +52,7 @@ SYS_INIT(uart_stellaris_init, PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEVICE); #define RCGC2_PHY_EN 0x40000000 #define RCGC2_EMAC_EN 0x10000000 -static int eth_stellaris_init(const struct device *dev) +static int eth_stellaris_init(void) { RCGC2 |= (RCGC2_PHY_EN | RCGC2_EMAC_EN); return 0; diff --git a/soc/arm/ti_simplelink/cc13x2_cc26x2/power.c b/soc/arm/ti_simplelink/cc13x2_cc26x2/power.c index dd5ae3e8f26d6..a22ecee538f36 100644 --- a/soc/arm/ti_simplelink/cc13x2_cc26x2/power.c +++ b/soc/arm/ti_simplelink/cc13x2_cc26x2/power.c @@ -136,11 +136,10 @@ __weak void pm_state_exit_post_ops(enum pm_state state, uint8_t substate_id) #endif /* CONFIG_PM */ /* Initialize TI Power module */ -static int power_initialize(const struct device *dev) +static int power_initialize(void) { unsigned int ret; - ARG_UNUSED(dev); ret = irq_lock(); Power_init(); @@ -154,7 +153,7 @@ static int power_initialize(const struct device *dev) * This needs to be called during POST_KERNEL in order for "Booting Zephyr" * message to show up */ -static int unlatch_pins(const struct device *dev) +static int unlatch_pins(void) { /* Get the reason for reset. */ uint32_t rSrc = SysCtrlResetSourceGet(); diff --git a/soc/arm/ti_simplelink/cc13x2_cc26x2/soc.c b/soc/arm/ti_simplelink/cc13x2_cc26x2/soc.c index a19398ee03d7f..452c73254e72e 100644 --- a/soc/arm/ti_simplelink/cc13x2_cc26x2/soc.c +++ b/soc/arm/ti_simplelink/cc13x2_cc26x2/soc.c @@ -8,9 +8,8 @@ #include -static int ti_cc13x2_cc26x2_init(const struct device *dev) +static int ti_cc13x2_cc26x2_init(void) { - ARG_UNUSED(dev); /* Performs necessary trim of the device. */ SetupTrimDevice(); diff --git a/soc/arm/ti_simplelink/cc13x2x7_cc26x2x7/power.c b/soc/arm/ti_simplelink/cc13x2x7_cc26x2x7/power.c index cdb54233dcb18..07057129e2586 100644 --- a/soc/arm/ti_simplelink/cc13x2x7_cc26x2x7/power.c +++ b/soc/arm/ti_simplelink/cc13x2x7_cc26x2x7/power.c @@ -136,11 +136,10 @@ __weak void pm_state_exit_post_ops(enum pm_state state, uint8_t substate_id) #endif /* CONFIG_PM */ /* Initialize TI Power module */ -static int power_initialize(const struct device *dev) +static int power_initialize(void) { unsigned int ret; - ARG_UNUSED(dev); ret = irq_lock(); Power_init(); @@ -154,7 +153,7 @@ static int power_initialize(const struct device *dev) * This needs to be called during POST_KERNEL in order for "Booting Zephyr" * message to show up */ -static int unlatch_pins(const struct device *dev) +static int unlatch_pins(void) { /* Get the reason for reset. */ uint32_t rSrc = SysCtrlResetSourceGet(); diff --git a/soc/arm/ti_simplelink/cc13x2x7_cc26x2x7/soc.c b/soc/arm/ti_simplelink/cc13x2x7_cc26x2x7/soc.c index ac126bdab2925..9db48d9a354c1 100644 --- a/soc/arm/ti_simplelink/cc13x2x7_cc26x2x7/soc.c +++ b/soc/arm/ti_simplelink/cc13x2x7_cc26x2x7/soc.c @@ -8,9 +8,8 @@ #include -static int ti_cc13x2_cc26x2_init(const struct device *dev) +static int ti_cc13x2_cc26x2_init(void) { - ARG_UNUSED(dev); /* Performs necessary trim of the device. */ SetupTrimDevice(); diff --git a/soc/arm/ti_simplelink/cc32xx/soc.c b/soc/arm/ti_simplelink/cc32xx/soc.c index 49bbde5074e8e..f95141f5ddda4 100644 --- a/soc/arm/ti_simplelink/cc32xx/soc.c +++ b/soc/arm/ti_simplelink/cc32xx/soc.c @@ -18,9 +18,8 @@ void sys_arch_reboot(int type) MAP_PRCMMCUReset(!!type); } -static int ti_cc32xx_init(const struct device *arg) +static int ti_cc32xx_init(void) { - ARG_UNUSED(arg); /* Note: This function also performs CC3220 Initialization */ MAP_PRCMCC3200MCUInit(); diff --git a/soc/arm/ti_simplelink/msp432p4xx/soc.c b/soc/arm/ti_simplelink/msp432p4xx/soc.c index 73d1a8dc13e6c..8faf547fdb113 100644 --- a/soc/arm/ti_simplelink/msp432p4xx/soc.c +++ b/soc/arm/ti_simplelink/msp432p4xx/soc.c @@ -9,9 +9,8 @@ #include #include -static int ti_msp432p4xx_init(const struct device *arg) +static int ti_msp432p4xx_init(void) { - ARG_UNUSED(arg); SystemInit(); diff --git a/soc/arm/xilinx_zynq7000/xc7zxxx/soc.c b/soc/arm/xilinx_zynq7000/xc7zxxx/soc.c index 90760266a9351..ef00fda9c09f5 100644 --- a/soc/arm/xilinx_zynq7000/xc7zxxx/soc.c +++ b/soc/arm/xilinx_zynq7000/xc7zxxx/soc.c @@ -78,9 +78,8 @@ const struct arm_mmu_config mmu_config = { * * @return 0 */ -static int soc_xlnx_zynq7000_init(const struct device *arg) +static int soc_xlnx_zynq7000_init(void) { - ARG_UNUSED(arg); NMI_INIT(); return 0; diff --git a/soc/arm/xilinx_zynq7000/xc7zxxxs/soc.c b/soc/arm/xilinx_zynq7000/xc7zxxxs/soc.c index e393b6e6ee526..1d3c24d1e730a 100644 --- a/soc/arm/xilinx_zynq7000/xc7zxxxs/soc.c +++ b/soc/arm/xilinx_zynq7000/xc7zxxxs/soc.c @@ -78,9 +78,8 @@ const struct arm_mmu_config mmu_config = { * * @return 0 */ -static int soc_xlnx_zynq7000s_init(const struct device *arg) +static int soc_xlnx_zynq7000s_init(void) { - ARG_UNUSED(arg); NMI_INIT(); return 0; diff --git a/soc/arm/xilinx_zynqmp/soc.c b/soc/arm/xilinx_zynqmp/soc.c index c5d6b7ce56779..3073869e084ba 100644 --- a/soc/arm/xilinx_zynqmp/soc.c +++ b/soc/arm/xilinx_zynqmp/soc.c @@ -17,9 +17,8 @@ * @return 0 */ -static int soc_init(const struct device *arg) +static int soc_init(void) { - ARG_UNUSED(arg); /* Install default handler that simply resets the CPU * if configured in the kernel, NOP otherwise diff --git a/soc/arm64/bcm_vk/viper/soc.c b/soc/arm64/bcm_vk/viper/soc.c index d0f20936b0c88..9bc05f01425bf 100644 --- a/soc/arm64/bcm_vk/viper/soc.c +++ b/soc/arm64/bcm_vk/viper/soc.c @@ -17,12 +17,11 @@ * * @return 0 */ -static int viper_init(const struct device *arg) +static int viper_init(void) { uint32_t key; uint32_t data; - ARG_UNUSED(arg); key = irq_lock(); diff --git a/soc/riscv/openisa_rv32m1/soc.c b/soc/riscv/openisa_rv32m1/soc.c index 8c4badcab2fd8..2d99535bd9c8f 100644 --- a/soc/riscv/openisa_rv32m1/soc.c +++ b/soc/riscv/openisa_rv32m1/soc.c @@ -216,11 +216,10 @@ static void rv32m1_setup_peripheral_clocks(void) * * @return 0 */ -static int soc_rv32m1_init(const struct device *arg) +static int soc_rv32m1_init(void) { unsigned int key; - ARG_UNUSED(arg); key = irq_lock(); diff --git a/soc/riscv/riscv-ite/it8xxx2/soc.c b/soc/riscv/riscv-ite/it8xxx2/soc.c index 42a03b4f27bb4..329e8ba26301f 100644 --- a/soc/riscv/riscv-ite/it8xxx2/soc.c +++ b/soc/riscv/riscv-ite/it8xxx2/soc.c @@ -156,9 +156,8 @@ static void chip_configure_pll(const struct pll_config_t *pll) } } -static int chip_change_pll(const struct device *dev) +static int chip_change_pll(void) { - ARG_UNUSED(dev); if (IS_ENABLED(CONFIG_ITE_IT8XXX2_INTC)) { ite_intc_save_and_disable_interrupts(); @@ -273,9 +272,8 @@ void soc_interrupt_init(void) ite_intc_init(); } -static int ite_it8xxx2_init(const struct device *arg) +static int ite_it8xxx2_init(void) { - ARG_UNUSED(arg); struct gpio_it8xxx2_regs *const gpio_regs = GPIO_IT8XXX2_REG_BASE; struct gctrl_it8xxx2_regs *const gctrl_regs = GCTRL_IT8XXX2_REGS_BASE; diff --git a/soc/riscv/riscv-privilege/andes_v5/l2_cache.c b/soc/riscv/riscv-privilege/andes_v5/l2_cache.c index 406b68afaa2c9..47bceadea8151 100644 --- a/soc/riscv/riscv-privilege/andes_v5/l2_cache.c +++ b/soc/riscv/riscv-privilege/andes_v5/l2_cache.c @@ -88,13 +88,12 @@ static void andes_v5_l2c_enable(void) } } -static int andes_v5_l2c_init(const struct device *dev) +static int andes_v5_l2c_init(void) { #if DT_NODE_HAS_STATUS(DT_INST(0, syscon), okay) uint32_t system_cfg; const struct device *const syscon_dev = DEVICE_DT_GET(DT_NODELABEL(syscon)); - ARG_UNUSED(dev); if (device_is_ready(syscon_dev)) { syscon_read_reg(syscon_dev, SMU_SYSTEMCFG, &system_cfg); diff --git a/soc/riscv/riscv-privilege/andes_v5/pma.c b/soc/riscv/riscv-privilege/andes_v5/pma.c index 483797d8a6803..8737bdca01a63 100644 --- a/soc/riscv/riscv-privilege/andes_v5/pma.c +++ b/soc/riscv/riscv-privilege/andes_v5/pma.c @@ -238,7 +238,7 @@ void pma_init_per_core(void) #endif /* CONFIG_NOCACHE_MEMORY */ } -static int pma_init(const struct device *arg) +static int pma_init(void) { unsigned long mmsc_cfg; diff --git a/soc/riscv/riscv-privilege/gd32vf103/soc.c b/soc/riscv/riscv-privilege/gd32vf103/soc.c index 53241673095c4..f16597ab379e5 100644 --- a/soc/riscv/riscv-privilege/gd32vf103/soc.c +++ b/soc/riscv/riscv-privilege/gd32vf103/soc.c @@ -9,11 +9,10 @@ #include -static int gigadevice_gd32v_soc_init(const struct device *dev) +static int gigadevice_gd32v_soc_init(void) { uint32_t key; - ARG_UNUSED(dev); key = irq_lock(); diff --git a/soc/riscv/riscv-privilege/opentitan/soc.c b/soc/riscv/riscv-privilege/opentitan/soc.c index ffa250f4b32a4..eb7b67106c208 100644 --- a/soc/riscv/riscv-privilege/opentitan/soc.c +++ b/soc/riscv/riscv-privilege/opentitan/soc.c @@ -10,9 +10,8 @@ #define RV_TIMER_BASE (DT_REG_ADDR(DT_NODELABEL(mtimer))) -static int soc_opentitan_init(const struct device *arg) +static int soc_opentitan_init(void) { - ARG_UNUSED(arg); /* Initialize the Machine Timer, so it behaves as a regular one. */ sys_write32(1u, RV_TIMER_BASE + RV_TIMER_CTRL_REG_OFFSET); diff --git a/soc/riscv/riscv-privilege/sifive-freedom/fe310_clock.c b/soc/riscv/riscv-privilege/sifive-freedom/fe310_clock.c index e917e3de0a6b5..0b642f3e8b220 100644 --- a/soc/riscv/riscv-privilege/sifive-freedom/fe310_clock.c +++ b/soc/riscv/riscv-privilege/sifive-freedom/fe310_clock.c @@ -13,9 +13,8 @@ BUILD_ASSERT(DT_PROP(DT_NODELABEL(tlclk), clock_div) == 1, "Unsupported TLCLK divider"); -static int fe310_clock_init(const struct device *dev) +static int fe310_clock_init(void) { - ARG_UNUSED(dev); /* * HFXOSC (16 MHz) is used to produce coreclk (and therefore tlclk / diff --git a/soc/riscv/riscv-privilege/sifive-freedom/fu540_clock.c b/soc/riscv/riscv-privilege/sifive-freedom/fu540_clock.c index 9300780eb4669..bc68a502f5989 100644 --- a/soc/riscv/riscv-privilege/sifive-freedom/fu540_clock.c +++ b/soc/riscv/riscv-privilege/sifive-freedom/fu540_clock.c @@ -18,9 +18,8 @@ BUILD_ASSERT(DT_PROP(DT_NODELABEL(tlclk), clock_div) == 2, * Switch the clock source to 1GHz PLL from 33.333MHz oscillator on the HiFive * Unleashed board. */ -static int fu540_clock_init(const struct device *dev) +static int fu540_clock_init(void) { - ARG_UNUSED(dev); PRCI_REG(PRCI_COREPLLCFG0) = PLL_R(0) | /* input divider: Fin / (0 + 1) = 33.33MHz */ diff --git a/soc/riscv/riscv-privilege/sifive-freedom/fu740_clock.c b/soc/riscv/riscv-privilege/sifive-freedom/fu740_clock.c index d5d7f60374a3b..e6bbee93689f7 100644 --- a/soc/riscv/riscv-privilege/sifive-freedom/fu740_clock.c +++ b/soc/riscv/riscv-privilege/sifive-freedom/fu740_clock.c @@ -30,9 +30,8 @@ static inline void wait_controller_cycle(void) * * Note: Valid PLL VCO range is 2400MHz to 4800MHz */ -static int fu740_clock_init(const struct device *dev) +static int fu740_clock_init(void) { - ARG_UNUSED(dev); PRCI_REG(PRCI_COREPLLCFG) = PLL_R(0) | /* input divider: Fin / (0 + 1) = 26MHz */ diff --git a/soc/riscv/riscv-privilege/telink_b91/soc.c b/soc/riscv/riscv-privilege/telink_b91/soc.c index 333de412e4c9c..ec92912c3b3dd 100644 --- a/soc/riscv/riscv-privilege/telink_b91/soc.c +++ b/soc/riscv/riscv-privilege/telink_b91/soc.c @@ -70,11 +70,10 @@ * * @return 0 */ -static int soc_b91_init(const struct device *arg) +static int soc_b91_init(void) { unsigned int cclk = DT_PROP(DT_PATH(cpus, cpu_0), clock_frequency); - ARG_UNUSED(arg); /* system init */ sys_init(POWER_MODE, VBAT_TYPE); diff --git a/soc/xtensa/intel_adsp/ace/multiprocessing.c b/soc/xtensa/intel_adsp/ace/multiprocessing.c index 67a119764dc44..1919bbc929efd 100644 --- a/soc/xtensa/intel_adsp/ace/multiprocessing.c +++ b/soc/xtensa/intel_adsp/ace/multiprocessing.c @@ -47,7 +47,7 @@ static void ipc_isr(void *arg) unsigned int soc_num_cpus; -static __imr int soc_num_cpus_init(const struct device *dev) +static __imr int soc_num_cpus_init(void) { /* Need to set soc_num_cpus early to arch_num_cpus() works properly */ soc_num_cpus = ((sys_read32(DFIDCCP) >> CAP_INST_SHIFT) & CAP_INST_MASK) + 1; diff --git a/soc/xtensa/intel_adsp/common/boot_complete.c b/soc/xtensa/intel_adsp/common/boot_complete.c index aca44c611130d..241e51951c6de 100644 --- a/soc/xtensa/intel_adsp/common/boot_complete.c +++ b/soc/xtensa/intel_adsp/common/boot_complete.c @@ -10,9 +10,8 @@ #include -int boot_complete(const struct device *d) +int boot_complete(void) { - ARG_UNUSED(d); uint32_t *win; const struct mem_win_config *config; const struct device *dev = DEVICE_DT_GET(DT_NODELABEL(mem_window0)); diff --git a/soc/xtensa/intel_adsp/common/soc.c b/soc/xtensa/intel_adsp/common/soc.c index 2994f59af9bbd..202217d6035e7 100644 --- a/soc/xtensa/intel_adsp/common/soc.c +++ b/soc/xtensa/intel_adsp/common/soc.c @@ -12,7 +12,7 @@ extern void adsp_clock_init(void); extern void soc_mp_init(void); #endif -static __imr int soc_init(const struct device *dev) +static __imr int soc_init(void) { power_init(); diff --git a/subsys/bluetooth/audio/bap_broadcast_sink.c b/subsys/bluetooth/audio/bap_broadcast_sink.c index a231b441d1e23..6c9fb4c815d46 100644 --- a/subsys/bluetooth/audio/bap_broadcast_sink.c +++ b/subsys/bluetooth/audio/bap_broadcast_sink.c @@ -1756,7 +1756,7 @@ int bt_bap_broadcast_sink_delete(struct bt_bap_broadcast_sink *sink) return 0; } -static int broadcast_sink_init(const struct device *dev) +static int broadcast_sink_init(void) { static struct bt_le_per_adv_sync_cb cb = { .synced = pa_synced, diff --git a/subsys/bluetooth/controller/hci/hci_driver.c b/subsys/bluetooth/controller/hci/hci_driver.c index d7481b0dd57fb..316a6b9e234ac 100644 --- a/subsys/bluetooth/controller/hci/hci_driver.c +++ b/subsys/bluetooth/controller/hci/hci_driver.c @@ -826,9 +826,8 @@ static const struct bt_hci_driver drv = { .send = hci_driver_send, }; -static int hci_driver_init(const struct device *unused) +static int hci_driver_init(void) { - ARG_UNUSED(unused); bt_hci_driver_register(&drv); diff --git a/subsys/bluetooth/host/long_wq.c b/subsys/bluetooth/host/long_wq.c index f857b3d75ca9a..61f86d0c909ad 100644 --- a/subsys/bluetooth/host/long_wq.c +++ b/subsys/bluetooth/host/long_wq.c @@ -26,9 +26,8 @@ int bt_long_wq_submit(struct k_work *work) return k_work_submit_to_queue(&bt_long_wq, work); } -static int long_wq_init(const struct device *d) +static int long_wq_init(void) { - ARG_UNUSED(d); const struct k_work_queue_config cfg = {.name = "BT_LW_WQ"}; diff --git a/subsys/bluetooth/host/monitor.c b/subsys/bluetooth/host/monitor.c index 19b15b0298cb1..d1c9b58d4c773 100644 --- a/subsys/bluetooth/host/monitor.c +++ b/subsys/bluetooth/host/monitor.c @@ -366,9 +366,8 @@ static const struct log_backend_api monitor_log_api = { LOG_BACKEND_DEFINE(bt_monitor, monitor_log_api, true); #endif /* CONFIG_LOG_MODE_MINIMAL */ -static int bt_monitor_init(const struct device *d) +static int bt_monitor_init(void) { - ARG_UNUSED(d); #if defined(CONFIG_BT_DEBUG_MONITOR_RTT) static uint8_t rtt_up_buf[RTT_BUF_SIZE]; diff --git a/subsys/bluetooth/services/bas.c b/subsys/bluetooth/services/bas.c index e6af782f877c0..cc96815b384c7 100644 --- a/subsys/bluetooth/services/bas.c +++ b/subsys/bluetooth/services/bas.c @@ -57,9 +57,8 @@ BT_GATT_SERVICE_DEFINE(bas, BT_GATT_PERM_READ | BT_GATT_PERM_WRITE), ); -static int bas_init(const struct device *dev) +static int bas_init(void) { - ARG_UNUSED(dev); return 0; } diff --git a/subsys/bluetooth/services/hrs.c b/subsys/bluetooth/services/hrs.c index ce596f525a4f9..013591516a1de 100644 --- a/subsys/bluetooth/services/hrs.c +++ b/subsys/bluetooth/services/hrs.c @@ -83,9 +83,8 @@ BT_GATT_SERVICE_DEFINE(hrs_svc, NULL, NULL, NULL), ); -static int hrs_init(const struct device *dev) +static int hrs_init(void) { - ARG_UNUSED(dev); hrs_blsc = 0x01; diff --git a/subsys/bluetooth/services/ots/ots.c b/subsys/bluetooth/services/ots/ots.c index d4c00044528ea..744a2c224e367 100644 --- a/subsys/bluetooth/services/ots/ots.c +++ b/subsys/bluetooth/services/ots/ots.c @@ -641,7 +641,7 @@ struct bt_ots *bt_ots_free_instance_get(void) return &BT_GATT_OTS_INSTANCE_LIST_START[instance_cnt++]; } -static int bt_gatt_ots_instances_prepare(const struct device *dev) +static int bt_gatt_ots_instances_prepare(void) { uint32_t index; struct bt_ots *instance; diff --git a/subsys/bluetooth/services/ots/ots_l2cap.c b/subsys/bluetooth/services/ots/ots_l2cap.c index 78392ec01d4d8..31e530adc7b8b 100644 --- a/subsys/bluetooth/services/ots/ots_l2cap.c +++ b/subsys/bluetooth/services/ots/ots_l2cap.c @@ -208,7 +208,7 @@ static struct bt_l2cap_server l2cap_server = { .accept = l2cap_accept, }; -static int bt_gatt_ots_l2cap_init(const struct device *arg) +static int bt_gatt_ots_l2cap_init(void) { int err; diff --git a/subsys/debug/gdbstub.c b/subsys/debug/gdbstub.c index 2cd5e3102e6ca..abc910975fd88 100644 --- a/subsys/debug/gdbstub.c +++ b/subsys/debug/gdbstub.c @@ -821,9 +821,8 @@ int z_gdb_main_loop(struct gdb_ctx *ctx) return 0; } -int gdb_init(const struct device *arg) +int gdb_init(void) { - ARG_UNUSED(arg); if (z_gdb_backend_init() == -1) { LOG_ERR("Could not initialize gdbstub backend."); diff --git a/subsys/fs/fat_fs.c b/subsys/fs/fat_fs.c index c7fef4276b635..d8636f5306788 100644 --- a/subsys/fs/fat_fs.c +++ b/subsys/fs/fat_fs.c @@ -521,9 +521,8 @@ static const struct fs_file_system_t fatfs_fs = { #endif }; -static int fatfs_init(const struct device *dev) +static int fatfs_init(void) { - ARG_UNUSED(dev); return fs_register(FS_FATFS, &fatfs_fs); } diff --git a/subsys/fs/fs.c b/subsys/fs/fs.c index 94b7c918c31e3..60bb3e36453e7 100644 --- a/subsys/fs/fs.c +++ b/subsys/fs/fs.c @@ -876,7 +876,7 @@ int fs_unregister(int type, const struct fs_file_system_t *fs) return rc; } -static int fs_init(const struct device *dev) +static int fs_init(void) { k_mutex_init(&mutex); sys_dlist_init(&fs_mnt_list); diff --git a/subsys/fs/littlefs_fs.c b/subsys/fs/littlefs_fs.c index 0b41aae004b2d..2a4915b4d1cb8 100644 --- a/subsys/fs/littlefs_fs.c +++ b/subsys/fs/littlefs_fs.c @@ -1034,9 +1034,8 @@ static void mount_init(struct fs_mount_t *mp) } } -static int littlefs_init(const struct device *dev) +static int littlefs_init(void) { - ARG_UNUSED(dev); static struct fs_mount_t *partitions[] = { DT_INST_FOREACH_STATUS_OKAY(REFERENCE_MOUNT) }; diff --git a/subsys/ipc/ipc_service/backends/ipc_icmsg_me_follower.c b/subsys/ipc/ipc_service/backends/ipc_icmsg_me_follower.c index 6f3f6ae3841d7..972ef4fc633fa 100644 --- a/subsys/ipc/ipc_service/backends/ipc_icmsg_me_follower.c +++ b/subsys/ipc/ipc_service/backends/ipc_icmsg_me_follower.c @@ -365,7 +365,7 @@ DT_INST_FOREACH_STATUS_OKAY(DEFINE_BACKEND_DEVICE) #if defined(CONFIG_IPC_SERVICE_BACKEND_ICMSG_ME_SHMEM_RESET) #define BACKEND_CONFIG_DEFINE(i) BACKEND_CONFIG_POPULATE(i), -static int shared_memory_prepare(const struct device *arg) +static int shared_memory_prepare(void) { const struct icmsg_config_t *backend_config; const struct icmsg_config_t backend_configs[] = { diff --git a/subsys/ipc/ipc_service/backends/ipc_icmsg_me_initiator.c b/subsys/ipc/ipc_service/backends/ipc_icmsg_me_initiator.c index f5d652b6d158f..e22bc3915c718 100644 --- a/subsys/ipc/ipc_service/backends/ipc_icmsg_me_initiator.c +++ b/subsys/ipc/ipc_service/backends/ipc_icmsg_me_initiator.c @@ -267,7 +267,7 @@ DT_INST_FOREACH_STATUS_OKAY(DEFINE_BACKEND_DEVICE) #if defined(CONFIG_IPC_SERVICE_BACKEND_ICMSG_ME_SHMEM_RESET) #define BACKEND_CONFIG_DEFINE(i) BACKEND_CONFIG_POPULATE(i), -static int shared_memory_prepare(const struct device *arg) +static int shared_memory_prepare(void) { const struct icmsg_config_t *backend_config; const struct icmsg_config_t backend_configs[] = { diff --git a/subsys/ipc/ipc_service/backends/ipc_rpmsg_static_vrings.c b/subsys/ipc/ipc_service/backends/ipc_rpmsg_static_vrings.c index 460d80a25a1b8..35f989fcd598f 100644 --- a/subsys/ipc/ipc_service/backends/ipc_rpmsg_static_vrings.c +++ b/subsys/ipc/ipc_service/backends/ipc_rpmsg_static_vrings.c @@ -776,7 +776,7 @@ DT_INST_FOREACH_STATUS_OKAY(DEFINE_BACKEND_DEVICE) #define BACKEND_CONFIG_INIT(n) &backend_config_##n, #if defined(CONFIG_IPC_SERVICE_BACKEND_RPMSG_SHMEM_RESET) -static int shared_memory_prepare(const struct device *arg) +static int shared_memory_prepare(void) { static const struct backend_config_t *config[] = { DT_INST_FOREACH_STATUS_OKAY(BACKEND_CONFIG_INIT) diff --git a/subsys/ipc/rpmsg_service/rpmsg_backend.c b/subsys/ipc/rpmsg_service/rpmsg_backend.c index 431fd093be10a..5ac16ebe50cfe 100644 --- a/subsys/ipc/rpmsg_service/rpmsg_backend.c +++ b/subsys/ipc/rpmsg_service/rpmsg_backend.c @@ -283,7 +283,7 @@ int rpmsg_backend_init(struct metal_io_region **io, struct virtio_device *vdev) /* Make sure we clear out the status flag very early (before we bringup the * secondary core) so the secondary core see's the proper status */ -int init_status_flag(const struct device *arg) +int init_status_flag(void) { virtio_set_status(NULL, 0); diff --git a/subsys/ipc/rpmsg_service/rpmsg_service.c b/subsys/ipc/rpmsg_service/rpmsg_service.c index e82c7a6be7a83..8abafd5c3361c 100644 --- a/subsys/ipc/rpmsg_service/rpmsg_service.c +++ b/subsys/ipc/rpmsg_service/rpmsg_service.c @@ -75,12 +75,10 @@ static void ns_bind_cb(struct rpmsg_device *rdev, #endif -static int rpmsg_service_init(const struct device *dev) +static int rpmsg_service_init(void) { int32_t err; - (void)dev; - LOG_DBG("RPMsg service initialization start"); err = rpmsg_backend_init(&io, &vdev); diff --git a/subsys/logging/backends/log_backend_adsp_hda.c b/subsys/logging/backends/log_backend_adsp_hda.c index 75578151644b6..051a3e7794070 100644 --- a/subsys/logging/backends/log_backend_adsp_hda.c +++ b/subsys/logging/backends/log_backend_adsp_hda.c @@ -358,9 +358,8 @@ void adsp_hda_log_cavstool_hook(uint32_t written) } -int adsp_hda_log_cavstool_init(const struct device *dev) +int adsp_hda_log_cavstool_init(void) { - ARG_UNUSED(dev); hda_ipc_msg(INTEL_ADSP_IPC_HOST_DEV, IPCCMD_HDA_RESET, CHANNEL, IPC_TIMEOUT); hda_ipc_msg(INTEL_ADSP_IPC_HOST_DEV, IPCCMD_HDA_CONFIG, diff --git a/subsys/logging/log_core.c b/subsys/logging/log_core.c index a72f011e84e0f..eb0839826bb7f 100644 --- a/subsys/logging/log_core.c +++ b/subsys/logging/log_core.c @@ -885,10 +885,8 @@ static void log_process_thread_func(void *dummy1, void *dummy2, void *dummy3) K_KERNEL_STACK_DEFINE(logging_stack, CONFIG_LOG_PROCESS_THREAD_STACK_SIZE); struct k_thread logging_thread; -static int enable_logger(const struct device *arg) +static int enable_logger(void) { - ARG_UNUSED(arg); - if (IS_ENABLED(CONFIG_LOG_PROCESS_THREAD)) { k_timer_init(&log_process_thread_timer, log_process_thread_timer_expiry_fn, NULL); diff --git a/subsys/logging/log_frontend_dict_uart.c b/subsys/logging/log_frontend_dict_uart.c index 0203c46790253..4aed4e8fb3ad9 100644 --- a/subsys/logging/log_frontend_dict_uart.c +++ b/subsys/logging/log_frontend_dict_uart.c @@ -341,9 +341,8 @@ void log_frontend_init(void) } /* Cannot be started in log_frontend_init because it is called before kernel is ready. */ -static int log_frontend_uart_start_timer(const struct device *unused) +static int log_frontend_uart_start_timer(void) { - ARG_UNUSED(unused); k_timeout_t t = K_MSEC(CONFIG_LOG_FRONTEND_DICT_UART_DROPPED_NOTIFY_PERIOD); k_timer_start(&dropped_timer, t, t); diff --git a/subsys/logging/log_output_syst.c b/subsys/logging/log_output_syst.c index 4fa22625b12a3..d5b06cd599f51 100644 --- a/subsys/logging/log_output_syst.c +++ b/subsys/logging/log_output_syst.c @@ -874,9 +874,8 @@ void log_output_msg_syst_process(const struct log_output *output, } } -static int syst_init(const struct device *arg) +static int syst_init(void) { - ARG_UNUSED(arg); MIPI_SYST_INIT_STATE(&log_syst_header, mipi_syst_platform_init, (void *)0); diff --git a/subsys/lorawan/lorawan.c b/subsys/lorawan/lorawan.c index d9af509ae65da..d32b393a1a8a2 100644 --- a/subsys/lorawan/lorawan.c +++ b/subsys/lorawan/lorawan.c @@ -685,9 +685,8 @@ int lorawan_start(void) return 0; } -static int lorawan_init(const struct device *dev) +static int lorawan_init(void) { - ARG_UNUSED(dev); sys_slist_init(&dl_callbacks); diff --git a/subsys/lorawan/services/lorawan_services.c b/subsys/lorawan/services/lorawan_services.c index 0ffa5ff8b37dc..74028b91ba67e 100644 --- a/subsys/lorawan/services/lorawan_services.c +++ b/subsys/lorawan/services/lorawan_services.c @@ -159,9 +159,8 @@ int lorawan_services_reschedule_work(struct k_work_delayable *dwork, k_timeout_t return k_work_reschedule_for_queue(&services_workq, dwork, delay); } -static int lorawan_services_init(const struct device *dev) +static int lorawan_services_init(void) { - ARG_UNUSED(dev); sys_slist_init(&msg_list); k_sem_init(&msg_sem, 1, 1); diff --git a/subsys/mgmt/ec_host_cmd/backends/ec_host_cmd_backend_espi.c b/subsys/mgmt/ec_host_cmd/backends/ec_host_cmd_backend_espi.c index a7ca10caccecf..e0175b9adbf7e 100644 --- a/subsys/mgmt/ec_host_cmd/backends/ec_host_cmd_backend_espi.c +++ b/subsys/mgmt/ec_host_cmd/backends/ec_host_cmd_backend_espi.c @@ -148,9 +148,8 @@ struct ec_host_cmd_backend *ec_host_cmd_backend_get_espi(const struct device *de } #if DT_NODE_EXISTS(DT_CHOSEN(zephyr_host_cmd_backend)) -static int host_cmd_init(const struct device *arg) +static int host_cmd_init(void) { - ARG_UNUSED(arg); const struct device *const dev = DEVICE_DT_GET(DT_CHOSEN(zephyr_host_cmd_backend)); ec_host_cmd_init(ec_host_cmd_backend_get_espi(dev)); diff --git a/subsys/mgmt/ec_host_cmd/backends/ec_host_cmd_backend_shi_ite.c b/subsys/mgmt/ec_host_cmd/backends/ec_host_cmd_backend_shi_ite.c index c1f2f72e47d2c..7ffccd7b2fab1 100644 --- a/subsys/mgmt/ec_host_cmd/backends/ec_host_cmd_backend_shi_ite.c +++ b/subsys/mgmt/ec_host_cmd/backends/ec_host_cmd_backend_shi_ite.c @@ -513,9 +513,8 @@ struct ec_host_cmd_backend *ec_host_cmd_backend_get_shi_ite(void) } #if DT_NODE_EXISTS(DT_CHOSEN(zephyr_host_cmd_backend)) -static int host_cmd_init(const struct device *arg) +static int host_cmd_init(void) { - ARG_UNUSED(arg); ec_host_cmd_init(ec_host_cmd_backend_get_shi_ite()); return 0; diff --git a/subsys/mgmt/ec_host_cmd/backends/ec_host_cmd_backend_shi_npcx.c b/subsys/mgmt/ec_host_cmd/backends/ec_host_cmd_backend_shi_npcx.c index 2a8901d886c65..3343701b260be 100644 --- a/subsys/mgmt/ec_host_cmd/backends/ec_host_cmd_backend_shi_npcx.c +++ b/subsys/mgmt/ec_host_cmd/backends/ec_host_cmd_backend_shi_npcx.c @@ -984,9 +984,8 @@ struct ec_host_cmd_backend *ec_host_cmd_backend_get_shi_npcx(void) } #if DT_NODE_EXISTS(DT_CHOSEN(zephyr_host_cmd_backend)) -static int host_cmd_init(const struct device *arg) +static int host_cmd_init(void) { - ARG_UNUSED(arg); ec_host_cmd_init(ec_host_cmd_backend_get_shi_npcx()); return 0; diff --git a/subsys/mgmt/ec_host_cmd/backends/ec_host_cmd_backend_simulator.c b/subsys/mgmt/ec_host_cmd/backends/ec_host_cmd_backend_simulator.c index b18022d29cb5a..5cde38a6a817f 100644 --- a/subsys/mgmt/ec_host_cmd/backends/ec_host_cmd_backend_simulator.c +++ b/subsys/mgmt/ec_host_cmd/backends/ec_host_cmd_backend_simulator.c @@ -76,9 +76,8 @@ int ec_host_cmd_backend_sim_data_received(const uint8_t *buffer, size_t len) return 0; } -static int host_cmd_init(const struct device *arg) +static int host_cmd_init(void) { - ARG_UNUSED(arg); ec_host_cmd_init(&ec_host_cmd_sim); return 0; diff --git a/subsys/mgmt/ec_host_cmd/backends/ec_host_cmd_backend_uart.c b/subsys/mgmt/ec_host_cmd/backends/ec_host_cmd_backend_uart.c index 8f676eaa7acc1..ee40218f91f71 100644 --- a/subsys/mgmt/ec_host_cmd/backends/ec_host_cmd_backend_uart.c +++ b/subsys/mgmt/ec_host_cmd/backends/ec_host_cmd_backend_uart.c @@ -303,9 +303,8 @@ struct ec_host_cmd_backend *ec_host_cmd_backend_get_uart(const struct device *de } #if DT_NODE_EXISTS(DT_CHOSEN(zephyr_host_cmd_backend)) -static int host_cmd_init(const struct device *arg) +static int host_cmd_init(void) { - ARG_UNUSED(arg); const struct device *const dev = DEVICE_DT_GET(DT_CHOSEN(zephyr_host_cmd_backend)); ec_host_cmd_init(ec_host_cmd_backend_get_uart(dev)); diff --git a/subsys/mgmt/mcumgr/mgmt/src/mgmt.c b/subsys/mgmt/mcumgr/mgmt/src/mgmt.c index 97113a06adb2a..1900f2e44fbe8 100644 --- a/subsys/mgmt/mcumgr/mgmt/src/mgmt.c +++ b/subsys/mgmt/mcumgr/mgmt/src/mgmt.c @@ -129,9 +129,8 @@ int32_t mgmt_callback_notify(uint32_t event, void *data, size_t data_size) #endif /* Processes all registered MCUmgr handlers at start up and registers them */ -static int mcumgr_handlers_init(const struct device *dev) +static int mcumgr_handlers_init(void) { - ARG_UNUSED(dev); STRUCT_SECTION_FOREACH(mcumgr_handler, handler) { if (handler->init) { diff --git a/subsys/mgmt/mcumgr/transport/src/smp.c b/subsys/mgmt/mcumgr/transport/src/smp.c index b69f6da52d775..45755a0b78808 100644 --- a/subsys/mgmt/mcumgr/transport/src/smp.c +++ b/subsys/mgmt/mcumgr/transport/src/smp.c @@ -229,7 +229,7 @@ void smp_rx_clear(struct smp_transport *zst) } } -static int smp_init(const struct device *dev) +static int smp_init(void) { k_work_queue_init(&smp_work_queue); diff --git a/subsys/mgmt/mcumgr/transport/src/smp_dummy.c b/subsys/mgmt/mcumgr/transport/src/smp_dummy.c index 1444473179d60..238c99a3ff05f 100644 --- a/subsys/mgmt/mcumgr/transport/src/smp_dummy.c +++ b/subsys/mgmt/mcumgr/transport/src/smp_dummy.c @@ -185,9 +185,8 @@ static int smp_dummy_tx_pkt_int(struct net_buf *nb) return rc; } -static int smp_dummy_init(const struct device *dev) +static int smp_dummy_init(void) { - ARG_UNUSED(dev); k_sem_init(&smp_data_ready_sem, 0, 1); diff --git a/subsys/mgmt/mcumgr/transport/src/smp_uart.c b/subsys/mgmt/mcumgr/transport/src/smp_uart.c index 118a7ea11a35e..21e4b6a9a0a74 100644 --- a/subsys/mgmt/mcumgr/transport/src/smp_uart.c +++ b/subsys/mgmt/mcumgr/transport/src/smp_uart.c @@ -90,9 +90,8 @@ static int smp_uart_tx_pkt(struct net_buf *nb) return rc; } -static int smp_uart_init(const struct device *dev) +static int smp_uart_init(void) { - ARG_UNUSED(dev); smp_transport_init(&smp_uart_transport, smp_uart_tx_pkt, smp_uart_get_mtu, NULL, NULL, NULL); diff --git a/subsys/mgmt/mcumgr/transport/src/smp_udp.c b/subsys/mgmt/mcumgr/transport/src/smp_udp.c index fec5ca53addaf..aab40d4e21194 100644 --- a/subsys/mgmt/mcumgr/transport/src/smp_udp.c +++ b/subsys/mgmt/mcumgr/transport/src/smp_udp.c @@ -172,9 +172,8 @@ static void smp_udp_receive_thread(void *p1, void *p2, void *p3) } } -static int smp_udp_init(const struct device *dev) +static int smp_udp_init(void) { - ARG_UNUSED(dev); #ifdef CONFIG_MCUMGR_TRANSPORT_UDP_IPV4 smp_transport_init(&configs.ipv4.smp_transport, diff --git a/subsys/mgmt/osdp/src/osdp.c b/subsys/mgmt/osdp/src/osdp.c index 32fa49198fe54..f38d644417672 100644 --- a/subsys/mgmt/osdp/src/osdp.c +++ b/subsys/mgmt/osdp/src/osdp.c @@ -177,9 +177,8 @@ void osdp_refresh(void *arg1, void *arg2, void *arg3) } } -static int osdp_init(const struct device *arg) +static int osdp_init(void) { - ARG_UNUSED(arg); int len; uint8_t c, *key = NULL, key_buf[16]; struct osdp *ctx; diff --git a/subsys/net/ip/net_core.c b/subsys/net/ip/net_core.c index b1ad74bdb4ee4..00829dfcf9003 100644 --- a/subsys/net/ip/net_core.c +++ b/subsys/net/ip/net_core.c @@ -485,7 +485,7 @@ static inline int services_init(void) return status; } -static int net_init(const struct device *unused) +static int net_init(void) { net_hostname_init(); diff --git a/subsys/net/l2/wifi/wifi_shell.c b/subsys/net/l2/wifi/wifi_shell.c index 6758a1e0bc896..7ccf57b8fc2a2 100644 --- a/subsys/net/l2/wifi/wifi_shell.c +++ b/subsys/net/l2/wifi/wifi_shell.c @@ -908,9 +908,8 @@ SHELL_STATIC_SUBCMD_SET_CREATE(wifi_commands, SHELL_CMD_REGISTER(wifi, &wifi_commands, "Wi-Fi commands", NULL); -static int wifi_shell_init(const struct device *unused) +static int wifi_shell_init(void) { - ARG_UNUSED(unused); context.sh = NULL; context.all = 0U; diff --git a/subsys/net/lib/config/init.c b/subsys/net/lib/config/init.c index 219852df81eb8..f8a4b847c4c73 100644 --- a/subsys/net/lib/config/init.c +++ b/subsys/net/lib/config/init.c @@ -495,9 +495,8 @@ int net_config_init_app(const struct device *dev, const char *app_info) } #if defined(CONFIG_NET_CONFIG_AUTO_INIT) -static int init_app(const struct device *dev) +static int init_app(void) { - ARG_UNUSED(dev); (void)net_config_init_app(NULL, "Initializing network"); diff --git a/subsys/net/lib/conn_mgr/conn_mgr.c b/subsys/net/lib/conn_mgr/conn_mgr.c index 6cf46e7737f6f..345e5a5736e2e 100644 --- a/subsys/net/lib/conn_mgr/conn_mgr.c +++ b/subsys/net/lib/conn_mgr/conn_mgr.c @@ -200,11 +200,10 @@ void net_conn_mgr_resend_status(void) } } -static int conn_mgr_init(const struct device *dev) +static int conn_mgr_init(void) { int i; - ARG_UNUSED(dev); for (i = 0; i < ARRAY_SIZE(iface_states); i++) { iface_states[i] = 0; diff --git a/subsys/net/lib/dns/llmnr_responder.c b/subsys/net/lib/dns/llmnr_responder.c index 816cf6e066567..e52e986d1455c 100644 --- a/subsys/net/lib/dns/llmnr_responder.c +++ b/subsys/net/lib/dns/llmnr_responder.c @@ -668,9 +668,8 @@ static int init_listener(void) return !ok; } -static int llmnr_responder_init(const struct device *dev) +static int llmnr_responder_init(void) { - ARG_UNUSED(dev); net_mgmt_init_event_callback(&mgmt_cb, llmnr_iface_event_handler, NET_EVENT_IF_UP); diff --git a/subsys/net/lib/dns/mdns_responder.c b/subsys/net/lib/dns/mdns_responder.c index 5db58f11428ba..326805040795b 100644 --- a/subsys/net/lib/dns/mdns_responder.c +++ b/subsys/net/lib/dns/mdns_responder.c @@ -679,9 +679,8 @@ static int init_listener(void) return !ok; } -static int mdns_responder_init(const struct device *dev) +static int mdns_responder_init(void) { - ARG_UNUSED(dev); net_mgmt_init_event_callback(&mgmt_cb, mdns_iface_event_handler, NET_EVENT_IF_UP); diff --git a/subsys/net/lib/lwm2m/ipso_accelerometer.c b/subsys/net/lib/lwm2m/ipso_accelerometer.c index 9ce0d94b3635f..2458bf753218c 100644 --- a/subsys/net/lib/lwm2m/ipso_accelerometer.c +++ b/subsys/net/lib/lwm2m/ipso_accelerometer.c @@ -142,7 +142,7 @@ static struct lwm2m_engine_obj_inst *accel_create(uint16_t obj_inst_id) return &inst[avail]; } -static int ipso_accel_init(const struct device *dev) +static int ipso_accel_init(void) { accel.obj_id = IPSO_OBJECT_ACCELEROMETER_ID; accel.version_major = ACCEL_VERSION_MAJOR; diff --git a/subsys/net/lib/lwm2m/ipso_buzzer.c b/subsys/net/lib/lwm2m/ipso_buzzer.c index 0754960350e3b..7f719e419063f 100644 --- a/subsys/net/lib/lwm2m/ipso_buzzer.c +++ b/subsys/net/lib/lwm2m/ipso_buzzer.c @@ -243,7 +243,7 @@ static struct lwm2m_engine_obj_inst *buzzer_create(uint16_t obj_inst_id) return &inst[avail]; } -static int ipso_buzzer_init(const struct device *dev) +static int ipso_buzzer_init(void) { buzzer.obj_id = IPSO_OBJECT_BUZZER_ID; buzzer.version_major = BUZZER_VERSION_MAJOR; diff --git a/subsys/net/lib/lwm2m/ipso_current_sensor.c b/subsys/net/lib/lwm2m/ipso_current_sensor.c index 644c64ad858aa..99b12ea667b10 100644 --- a/subsys/net/lib/lwm2m/ipso_current_sensor.c +++ b/subsys/net/lib/lwm2m/ipso_current_sensor.c @@ -213,7 +213,7 @@ static struct lwm2m_engine_obj_inst *current_sensor_create(uint16_t obj_inst_id) return &inst[index]; } -static int ipso_current_sensor_init(const struct device *dev) +static int ipso_current_sensor_init(void) { sensor.obj_id = IPSO_OBJECT_ID; sensor.version_major = CURRENT_VERSION_MAJOR; diff --git a/subsys/net/lib/lwm2m/ipso_filling_sensor.c b/subsys/net/lib/lwm2m/ipso_filling_sensor.c index d85e0d22209d1..072d6d35bbb69 100644 --- a/subsys/net/lib/lwm2m/ipso_filling_sensor.c +++ b/subsys/net/lib/lwm2m/ipso_filling_sensor.c @@ -228,7 +228,7 @@ static struct lwm2m_engine_obj_inst *filling_sensor_create(uint16_t obj_inst_id) return &inst[index]; } -static int init(const struct device *dev) +static int init(void) { fill_sensor.obj_id = IPSO_OBJECT_ID; fill_sensor.version_major = FILLING_VERSION_MAJOR; diff --git a/subsys/net/lib/lwm2m/ipso_generic_sensor.c b/subsys/net/lib/lwm2m/ipso_generic_sensor.c index c9a9224a3c604..5f1d9801a7f3b 100644 --- a/subsys/net/lib/lwm2m/ipso_generic_sensor.c +++ b/subsys/net/lib/lwm2m/ipso_generic_sensor.c @@ -222,7 +222,7 @@ static struct lwm2m_engine_obj_inst *generic_sensor_create(uint16_t obj_inst_id) return &inst[index]; } -static int ipso_generic_sensor_init(const struct device *dev) +static int ipso_generic_sensor_init(void) { sensor.obj_id = IPSO_OBJECT_ID; sensor.version_major = GENERIC_VERSION_MAJOR; diff --git a/subsys/net/lib/lwm2m/ipso_humidity_sensor.c b/subsys/net/lib/lwm2m/ipso_humidity_sensor.c index fa3cc9939d6e9..fe338d1436a6c 100644 --- a/subsys/net/lib/lwm2m/ipso_humidity_sensor.c +++ b/subsys/net/lib/lwm2m/ipso_humidity_sensor.c @@ -203,7 +203,7 @@ humidity_sensor_create(uint16_t obj_inst_id) return &inst[index]; } -static int ipso_humidity_sensor_init(const struct device *dev) +static int ipso_humidity_sensor_init(void) { sensor.obj_id = IPSO_OBJECT_ID; sensor.version_major = HUMIDITY_VERSION_MAJOR; diff --git a/subsys/net/lib/lwm2m/ipso_light_control.c b/subsys/net/lib/lwm2m/ipso_light_control.c index ae94530127668..beeb5f0f54360 100644 --- a/subsys/net/lib/lwm2m/ipso_light_control.c +++ b/subsys/net/lib/lwm2m/ipso_light_control.c @@ -186,7 +186,7 @@ static struct lwm2m_engine_obj_inst *light_control_create(uint16_t obj_inst_id) return &inst[avail]; } -static int ipso_light_control_init(const struct device *dev) +static int ipso_light_control_init(void) { light_control.obj_id = IPSO_OBJECT_LIGHT_CONTROL_ID; light_control.version_major = LIGHT_VERSION_MAJOR; diff --git a/subsys/net/lib/lwm2m/ipso_onoff_switch.c b/subsys/net/lib/lwm2m/ipso_onoff_switch.c index cfa9ae86b47b3..3bf8ba65c4eb5 100644 --- a/subsys/net/lib/lwm2m/ipso_onoff_switch.c +++ b/subsys/net/lib/lwm2m/ipso_onoff_switch.c @@ -234,7 +234,7 @@ static struct lwm2m_engine_obj_inst *switch_create(uint16_t obj_inst_id) return &inst[avail]; } -static int ipso_switch_init(const struct device *dev) +static int ipso_switch_init(void) { onoff_switch.obj_id = IPSO_OBJECT_ONOFF_SWITCH_ID; onoff_switch.version_major = SWITCH_VERSION_MAJOR; diff --git a/subsys/net/lib/lwm2m/ipso_pressure_sensor.c b/subsys/net/lib/lwm2m/ipso_pressure_sensor.c index 5f4c7a36feec7..f58c718aed6c4 100644 --- a/subsys/net/lib/lwm2m/ipso_pressure_sensor.c +++ b/subsys/net/lib/lwm2m/ipso_pressure_sensor.c @@ -206,7 +206,7 @@ pressure_sensor_create(uint16_t obj_inst_id) return &inst[index]; } -static int ipso_pressure_sensor_init(const struct device *dev) +static int ipso_pressure_sensor_init(void) { sensor.obj_id = IPSO_OBJECT_ID; sensor.version_major = PRESSURE_VERSION_MAJOR; diff --git a/subsys/net/lib/lwm2m/ipso_push_button.c b/subsys/net/lib/lwm2m/ipso_push_button.c index 73704e33985e4..2cccd276aa9ca 100644 --- a/subsys/net/lib/lwm2m/ipso_push_button.c +++ b/subsys/net/lib/lwm2m/ipso_push_button.c @@ -171,7 +171,7 @@ static struct lwm2m_engine_obj_inst *button_create(uint16_t obj_inst_id) return &inst[avail]; } -static int ipso_button_init(const struct device *dev) +static int ipso_button_init(void) { onoff_switch.obj_id = IPSO_OBJECT_PUSH_BUTTON_ID; onoff_switch.version_major = BUTTON_VERSION_MAJOR; diff --git a/subsys/net/lib/lwm2m/ipso_temp_sensor.c b/subsys/net/lib/lwm2m/ipso_temp_sensor.c index 2f58936b9ad18..ff5a3bf767df2 100644 --- a/subsys/net/lib/lwm2m/ipso_temp_sensor.c +++ b/subsys/net/lib/lwm2m/ipso_temp_sensor.c @@ -206,7 +206,7 @@ static struct lwm2m_engine_obj_inst *temp_sensor_create(uint16_t obj_inst_id) return &inst[index]; } -static int ipso_temp_sensor_init(const struct device *dev) +static int ipso_temp_sensor_init(void) { temp_sensor.obj_id = IPSO_OBJECT_TEMP_SENSOR_ID; temp_sensor.version_major = TEMP_VERSION_MAJOR; diff --git a/subsys/net/lib/lwm2m/ipso_timer.c b/subsys/net/lib/lwm2m/ipso_timer.c index 68bf74d403ccf..8310d1f3f8453 100644 --- a/subsys/net/lib/lwm2m/ipso_timer.c +++ b/subsys/net/lib/lwm2m/ipso_timer.c @@ -351,7 +351,7 @@ static struct lwm2m_engine_obj_inst *timer_inst_create(uint16_t obj_inst_id) return &inst[avail]; } -static int ipso_timer_init(const struct device *dev) +static int ipso_timer_init(void) { timer.obj_id = IPSO_OBJECT_TIMER_ID; timer.version_major = TIMER_VERSION_MAJOR; diff --git a/subsys/net/lib/lwm2m/ipso_voltage_sensor.c b/subsys/net/lib/lwm2m/ipso_voltage_sensor.c index a7e5de93ec364..1e4eff60b1bd8 100644 --- a/subsys/net/lib/lwm2m/ipso_voltage_sensor.c +++ b/subsys/net/lib/lwm2m/ipso_voltage_sensor.c @@ -214,7 +214,7 @@ static struct lwm2m_engine_obj_inst *voltage_sensor_create(uint16_t obj_inst_id) return &inst[index]; } -static int ipso_voltage_sensor_init(const struct device *dev) +static int ipso_voltage_sensor_init(void) { sensor.obj_id = IPSO_OBJECT_ID; sensor.version_major = VOLTAGE_VERSION_MAJOR; diff --git a/subsys/net/lib/lwm2m/lwm2m_engine.c b/subsys/net/lib/lwm2m/lwm2m_engine.c index 2fd414f2895b8..5af10c8fe205e 100644 --- a/subsys/net/lib/lwm2m/lwm2m_engine.c +++ b/subsys/net/lib/lwm2m/lwm2m_engine.c @@ -1021,7 +1021,7 @@ int lwm2m_engine_resume(void) return 0; } -static int lwm2m_engine_init(const struct device *dev) +static int lwm2m_engine_init(void) { int i; diff --git a/subsys/net/lib/lwm2m/lwm2m_obj_access_control.c b/subsys/net/lib/lwm2m/lwm2m_obj_access_control.c index b6b259159d56b..1a83ef5ad2974 100644 --- a/subsys/net/lib/lwm2m/lwm2m_obj_access_control.c +++ b/subsys/net/lib/lwm2m/lwm2m_obj_access_control.c @@ -420,7 +420,7 @@ static struct lwm2m_engine_obj_inst *ac_create(uint16_t obj_inst_id) return &inst[avail]; } -static int ac_control_init(const struct device *dev) +static int ac_control_init(void) { ac_obj.obj_id = LWM2M_OBJECT_ACCESS_CONTROL_ID; ac_obj.version_major = ACCESS_CONTROL_VERSION_MAJOR; diff --git a/subsys/net/lib/lwm2m/lwm2m_obj_binaryappdata.c b/subsys/net/lib/lwm2m/lwm2m_obj_binaryappdata.c index f45d1ebf366ac..e9166f9e678c8 100644 --- a/subsys/net/lib/lwm2m/lwm2m_obj_binaryappdata.c +++ b/subsys/net/lib/lwm2m/lwm2m_obj_binaryappdata.c @@ -104,7 +104,7 @@ static struct lwm2m_engine_obj_inst *lwm2m_binaryappdata_create(uint16_t obj_ins return &inst[avail]; } -static int lwm2m_binaryappdata_init(const struct device *dev) +static int lwm2m_binaryappdata_init(void) { int ret = 0; diff --git a/subsys/net/lib/lwm2m/lwm2m_obj_connmon.c b/subsys/net/lib/lwm2m/lwm2m_obj_connmon.c index 10e499fb5722f..c0e14429c8577 100644 --- a/subsys/net/lib/lwm2m/lwm2m_obj_connmon.c +++ b/subsys/net/lib/lwm2m/lwm2m_obj_connmon.c @@ -164,7 +164,7 @@ static struct lwm2m_engine_obj_inst *connmon_create(uint16_t obj_inst_id) return &inst; } -static int lwm2m_connmon_init(const struct device *dev) +static int lwm2m_connmon_init(void) { struct lwm2m_engine_obj_inst *obj_inst = NULL; int ret = 0; diff --git a/subsys/net/lib/lwm2m/lwm2m_obj_device.c b/subsys/net/lib/lwm2m/lwm2m_obj_device.c index fdad85a7e711c..84db2f8c14142 100644 --- a/subsys/net/lib/lwm2m/lwm2m_obj_device.c +++ b/subsys/net/lib/lwm2m/lwm2m_obj_device.c @@ -268,7 +268,7 @@ static struct lwm2m_engine_obj_inst *device_create(uint16_t obj_inst_id) return &inst; } -static int lwm2m_device_init(const struct device *dev) +static int lwm2m_device_init(void) { struct lwm2m_engine_obj_inst *obj_inst = NULL; int ret = 0; diff --git a/subsys/net/lib/lwm2m/lwm2m_obj_event_log.c b/subsys/net/lib/lwm2m/lwm2m_obj_event_log.c index 0ed96ca9cc6b0..907dd596611a9 100644 --- a/subsys/net/lib/lwm2m/lwm2m_obj_event_log.c +++ b/subsys/net/lib/lwm2m/lwm2m_obj_event_log.c @@ -78,7 +78,7 @@ static struct lwm2m_engine_obj_inst *lwm2m_event_log_create(uint16_t obj_inst_id return &inst; } -static int lwm2m_event_log_init(const struct device *dev) +static int lwm2m_event_log_init(void) { struct lwm2m_engine_obj_inst *obj_inst = NULL; int ret = 0; diff --git a/subsys/net/lib/lwm2m/lwm2m_obj_firmware.c b/subsys/net/lib/lwm2m/lwm2m_obj_firmware.c index 593192204983a..4ef47580943a9 100644 --- a/subsys/net/lib/lwm2m/lwm2m_obj_firmware.c +++ b/subsys/net/lib/lwm2m/lwm2m_obj_firmware.c @@ -441,7 +441,7 @@ static struct lwm2m_engine_obj_inst *firmware_create(uint16_t obj_inst_id) return &inst[obj_inst_id]; } -static int lwm2m_firmware_init(const struct device *dev) +static int lwm2m_firmware_init(void) { struct lwm2m_engine_obj_inst *obj_inst = NULL; int ret = 0; diff --git a/subsys/net/lib/lwm2m/lwm2m_obj_gateway.c b/subsys/net/lib/lwm2m/lwm2m_obj_gateway.c index 1a7569fa6f1f3..23b92fb19e51b 100644 --- a/subsys/net/lib/lwm2m/lwm2m_obj_gateway.c +++ b/subsys/net/lib/lwm2m/lwm2m_obj_gateway.c @@ -143,7 +143,7 @@ static struct lwm2m_engine_obj_inst *lwm2m_gw_create(uint16_t obj_inst_id) return &inst[index]; } -static int lwm2m_gw_init(const struct device *dev) +static int lwm2m_gw_init(void) { int ret = 0; diff --git a/subsys/net/lib/lwm2m/lwm2m_obj_location.c b/subsys/net/lib/lwm2m/lwm2m_obj_location.c index a7b06ba77b5ff..73c43ff78eba7 100644 --- a/subsys/net/lib/lwm2m/lwm2m_obj_location.c +++ b/subsys/net/lib/lwm2m/lwm2m_obj_location.c @@ -93,7 +93,7 @@ static struct lwm2m_engine_obj_inst *location_create(uint16_t obj_inst_id) return &inst; } -static int ipso_location_init(const struct device *dev) +static int ipso_location_init(void) { int ret; struct lwm2m_engine_obj_inst *obj_inst = NULL; diff --git a/subsys/net/lib/lwm2m/lwm2m_obj_portfolio.c b/subsys/net/lib/lwm2m/lwm2m_obj_portfolio.c index 69c841cd0b15f..c06132c25146f 100644 --- a/subsys/net/lib/lwm2m/lwm2m_obj_portfolio.c +++ b/subsys/net/lib/lwm2m/lwm2m_obj_portfolio.c @@ -110,7 +110,7 @@ static struct lwm2m_engine_obj_inst *portfolio_create(uint16_t obj_inst_id) return &inst[avail]; } -static int lwm2m_portfolio_init(const struct device *dev) +static int lwm2m_portfolio_init(void) { portfolio.obj_id = LWM2M_OBJECT_PORTFOLIO_ID; portfolio.version_major = PORTFOLIO_VERSION_MAJOR; diff --git a/subsys/net/lib/lwm2m/lwm2m_obj_security.c b/subsys/net/lib/lwm2m/lwm2m_obj_security.c index b6efdad307a49..c590350e61d1f 100644 --- a/subsys/net/lib/lwm2m/lwm2m_obj_security.c +++ b/subsys/net/lib/lwm2m/lwm2m_obj_security.c @@ -212,7 +212,7 @@ int lwm2m_security_index_to_inst_id(int index) return inst[index].obj_inst_id; } -static int lwm2m_security_init(const struct device *dev) +static int lwm2m_security_init(void) { struct lwm2m_engine_obj_inst *obj_inst = NULL; int ret = 0; diff --git a/subsys/net/lib/lwm2m/lwm2m_obj_server.c b/subsys/net/lib/lwm2m/lwm2m_obj_server.c index eaec6fde0844a..a73206df25096 100644 --- a/subsys/net/lib/lwm2m/lwm2m_obj_server.c +++ b/subsys/net/lib/lwm2m/lwm2m_obj_server.c @@ -340,7 +340,7 @@ static struct lwm2m_engine_obj_inst *server_create(uint16_t obj_inst_id) return &inst[index]; } -static int lwm2m_server_init(const struct device *dev) +static int lwm2m_server_init(void) { int ret = 0; diff --git a/subsys/net/lib/lwm2m/lwm2m_obj_swmgmt.c b/subsys/net/lib/lwm2m/lwm2m_obj_swmgmt.c index 9c817c69cf2e3..a8376ea8621be 100644 --- a/subsys/net/lib/lwm2m/lwm2m_obj_swmgmt.c +++ b/subsys/net/lib/lwm2m/lwm2m_obj_swmgmt.c @@ -780,7 +780,7 @@ static struct lwm2m_engine_obj_inst *swmgmt_create(uint16_t obj_inst_id) return &inst[index]; } -static int lwm2m_swmgmt_init(const struct device *dev) +static int lwm2m_swmgmt_init(void) { swmgmt.obj_id = LWM2M_OBJECT_SOFTWARE_MANAGEMENT_ID; swmgmt.version_major = SWMGMT_VERSION_MAJOR; diff --git a/subsys/net/lib/lwm2m/lwm2m_rd_client.c b/subsys/net/lib/lwm2m/lwm2m_rd_client.c index 4967a222e053f..b82316f9d5e8a 100644 --- a/subsys/net/lib/lwm2m/lwm2m_rd_client.c +++ b/subsys/net/lib/lwm2m/lwm2m_rd_client.c @@ -1556,10 +1556,8 @@ int lwm2m_rd_client_init(void) } -static int sys_lwm2m_rd_client_init(const struct device *dev) +static int sys_lwm2m_rd_client_init(void) { - ARG_UNUSED(dev); - return lwm2m_rd_client_init(); } diff --git a/subsys/net/lib/lwm2m/ucifi_battery.c b/subsys/net/lib/lwm2m/ucifi_battery.c index bcc6827a24202..11da09809675a 100644 --- a/subsys/net/lib/lwm2m/ucifi_battery.c +++ b/subsys/net/lib/lwm2m/ucifi_battery.c @@ -135,7 +135,7 @@ static struct lwm2m_engine_obj_inst *battery_create(uint16_t obj_inst_id) return &inst[index]; } -static int ucifi_battery_init(const struct device *dev) +static int ucifi_battery_init(void) { battery.obj_id = UCIFI_OBJECT_BATTERY_ID; battery.version_major = BATTERY_VERSION_MAJOR; diff --git a/subsys/net/lib/lwm2m/ucifi_lpwan.c b/subsys/net/lib/lwm2m/ucifi_lpwan.c index 77019022b96b1..4210387a20189 100644 --- a/subsys/net/lib/lwm2m/ucifi_lpwan.c +++ b/subsys/net/lib/lwm2m/ucifi_lpwan.c @@ -163,7 +163,7 @@ static struct lwm2m_engine_obj_inst *lpwan_create(uint16_t obj_inst_id) return &inst[index]; } -static int ucifi_lpwan_init(const struct device *dev) +static int ucifi_lpwan_init(void) { lpwan.obj_id = LWM2M_UCIFI_LPWAN_ID; lpwan.version_major = LPWAN_VERSION_MAJOR; diff --git a/subsys/net/lib/sockets/sockets_tls.c b/subsys/net/lib/sockets/sockets_tls.c index d827ed06d9124..2b3b541d901df 100644 --- a/subsys/net/lib/sockets/sockets_tls.c +++ b/subsys/net/lib/sockets/sockets_tls.c @@ -335,9 +335,8 @@ static int dtls_get_remaining_timeout(struct tls_context *ctx) #endif /* CONFIG_NET_SOCKETS_ENABLE_DTLS */ /* Initialize TLS internals. */ -static int tls_init(const struct device *unused) +static int tls_init(void) { - ARG_UNUSED(unused); #if !defined(CONFIG_ENTROPY_HAS_DRIVER) NET_WARN("No entropy device on the system, " diff --git a/subsys/net/lib/tls_credentials/tls_credentials.c b/subsys/net/lib/tls_credentials/tls_credentials.c index 89be0a9e0fb04..6f31cf70787bf 100644 --- a/subsys/net/lib/tls_credentials/tls_credentials.c +++ b/subsys/net/lib/tls_credentials/tls_credentials.c @@ -16,7 +16,7 @@ static struct tls_credential credentials[CONFIG_TLS_MAX_CREDENTIALS_NUMBER]; /* A mutex for protecting access to the credentials array. */ static struct k_mutex credential_lock; -static int credentials_init(const struct device *unused) +static int credentials_init(void) { (void)memset(credentials, 0, sizeof(credentials)); diff --git a/subsys/net/lib/tls_credentials/tls_credentials_trusted.c b/subsys/net/lib/tls_credentials/tls_credentials_trusted.c index 031a281e886a0..9d3464c3c7139 100644 --- a/subsys/net/lib/tls_credentials/tls_credentials_trusted.c +++ b/subsys/net/lib/tls_credentials/tls_credentials_trusted.c @@ -122,7 +122,7 @@ static unsigned int tls_credential_toc_find_slot(psa_storage_uid_t uid) return CRED_MAX_SLOTS; } -static int credentials_init(const struct device *unused) +static int credentials_init(void) { struct psa_storage_info_t info; unsigned int sync = 0; diff --git a/subsys/net/lib/zperf/zperf_common.c b/subsys/net/lib/zperf/zperf_common.c index 1c82c09ec70db..e1efcafe3b2c0 100644 --- a/subsys/net/lib/zperf/zperf_common.c +++ b/subsys/net/lib/zperf/zperf_common.c @@ -210,9 +210,8 @@ void zperf_async_work_submit(struct k_work *work) k_work_submit_to_queue(&zperf_work_q, work); } -static int zperf_init(const struct device *unused) +static int zperf_init(void) { - ARG_UNUSED(unused); k_work_queue_init(&zperf_work_q); k_work_queue_start(&zperf_work_q, zperf_work_q_stack, diff --git a/subsys/pm/pm_stats.c b/subsys/pm/pm_stats.c index 3399ef9c055aa..4c1c00f339569 100644 --- a/subsys/pm/pm_stats.c +++ b/subsys/pm/pm_stats.c @@ -31,9 +31,8 @@ static char names[CONFIG_MP_MAX_NUM_CPUS][PM_STATE_COUNT][PM_STAT_NAME_LEN]; static uint32_t time_start[CONFIG_MP_MAX_NUM_CPUS]; static uint32_t time_stop[CONFIG_MP_MAX_NUM_CPUS]; -static int pm_stats_init(const struct device *dev) +static int pm_stats_init(void) { - ARG_UNUSED(dev); unsigned int num_cpus = arch_num_cpus(); diff --git a/subsys/random/rand32_xoshiro128.c b/subsys/random/rand32_xoshiro128.c index 4556280e48dc7..2a68f5515a834 100644 --- a/subsys/random/rand32_xoshiro128.c +++ b/subsys/random/rand32_xoshiro128.c @@ -42,7 +42,7 @@ static inline uint32_t rotl(const uint32_t x, int k) return (x << k) | (x >> (32 - k)); } -static int xoshiro128_initialize(const struct device *dev) +static int xoshiro128_initialize(void) { if (!device_is_ready(entropy_driver)) { return -ENODEV; diff --git a/subsys/shell/backends/shell_dummy.c b/subsys/shell/backends/shell_dummy.c index 3e3784ce87218..b8245e2260234 100644 --- a/subsys/shell/backends/shell_dummy.c +++ b/subsys/shell/backends/shell_dummy.c @@ -98,9 +98,8 @@ const struct shell_transport_api shell_dummy_transport_api = { .read = read }; -static int enable_shell_dummy(const struct device *arg) +static int enable_shell_dummy(void) { - ARG_UNUSED(arg); bool log_backend = CONFIG_SHELL_DUMMY_INIT_LOG_LEVEL > 0; uint32_t level = (CONFIG_SHELL_DUMMY_INIT_LOG_LEVEL > LOG_LEVEL_DBG) ? CONFIG_LOG_MAX_LEVEL : CONFIG_SHELL_DUMMY_INIT_LOG_LEVEL; diff --git a/subsys/shell/backends/shell_mqtt.c b/subsys/shell/backends/shell_mqtt.c index c606032c35056..8b535a9601531 100644 --- a/subsys/shell/backends/shell_mqtt.c +++ b/subsys/shell/backends/shell_mqtt.c @@ -812,9 +812,8 @@ const struct shell_transport_api shell_mqtt_transport_api = { .init = init, .write = write, .read = read }; -static int enable_shell_mqtt(const struct device *arg) +static int enable_shell_mqtt(void) { - ARG_UNUSED(arg); bool log_backend = CONFIG_SHELL_MQTT_INIT_LOG_LEVEL > 0; uint32_t level = (CONFIG_SHELL_MQTT_INIT_LOG_LEVEL > LOG_LEVEL_DBG) ? diff --git a/subsys/shell/backends/shell_rtt.c b/subsys/shell/backends/shell_rtt.c index ad7cf80fd3e02..d0e9e16bb9256 100644 --- a/subsys/shell/backends/shell_rtt.c +++ b/subsys/shell/backends/shell_rtt.c @@ -107,9 +107,8 @@ const struct shell_transport_api shell_rtt_transport_api = { .read = read }; -static int enable_shell_rtt(const struct device *arg) +static int enable_shell_rtt(void) { - ARG_UNUSED(arg); bool log_backend = CONFIG_SHELL_RTT_INIT_LOG_LEVEL > 0; uint32_t level = (CONFIG_SHELL_RTT_INIT_LOG_LEVEL > LOG_LEVEL_DBG) ? CONFIG_LOG_MAX_LEVEL : CONFIG_SHELL_RTT_INIT_LOG_LEVEL; diff --git a/subsys/shell/backends/shell_telnet.c b/subsys/shell/backends/shell_telnet.c index f6b8e9a79b316..312c1dcb4e140 100644 --- a/subsys/shell/backends/shell_telnet.c +++ b/subsys/shell/backends/shell_telnet.c @@ -526,9 +526,8 @@ const struct shell_transport_api shell_telnet_transport_api = { .read = read }; -static int enable_shell_telnet(const struct device *arg) +static int enable_shell_telnet(void) { - ARG_UNUSED(arg); bool log_backend = CONFIG_SHELL_TELNET_INIT_LOG_LEVEL > 0; uint32_t level = (CONFIG_SHELL_TELNET_INIT_LOG_LEVEL > LOG_LEVEL_DBG) ? diff --git a/subsys/shell/backends/shell_uart.c b/subsys/shell/backends/shell_uart.c index 4db1fb8954694..ce52eb15d8c31 100644 --- a/subsys/shell/backends/shell_uart.c +++ b/subsys/shell/backends/shell_uart.c @@ -338,9 +338,8 @@ const struct shell_transport_api shell_uart_transport_api = { #endif /* CONFIG_MCUMGR_TRANSPORT_SHELL */ }; -static int enable_shell_uart(const struct device *arg) +static int enable_shell_uart(void) { - ARG_UNUSED(arg); const struct device *const dev = DEVICE_DT_GET(DT_CHOSEN(zephyr_shell_uart)); bool log_backend = CONFIG_SHELL_BACKEND_SERIAL_LOG_LEVEL > 0; uint32_t level = diff --git a/subsys/testsuite/ztest/src/ztress.c b/subsys/testsuite/ztest/src/ztress.c index 2f608f82ca981..5c25e31b07285 100644 --- a/subsys/testsuite/ztest/src/ztress.c +++ b/subsys/testsuite/ztest/src/ztress.c @@ -451,7 +451,7 @@ uint32_t ztress_optimized_ticks(uint32_t id) * cpu load (e.g. busy simulator) running that would influence the result. * */ -static int ztress_cpu_clock_to_sys_clock_check(const struct device *unused) +static int ztress_cpu_clock_to_sys_clock_check(void) { static volatile int cnt = 2000; uint32_t t = sys_clock_tick_get_32(); diff --git a/subsys/tracing/sysview/sysview.c b/subsys/tracing/sysview/sysview.c index 34edb7ce59fb9..59d426fa7620d 100644 --- a/subsys/tracing/sysview/sysview.c +++ b/subsys/tracing/sysview/sysview.c @@ -65,9 +65,8 @@ void sys_trace_idle(void) SEGGER_SYSVIEW_OnIdle(); } -static int sysview_init(const struct device *arg) +static int sysview_init(void) { - ARG_UNUSED(arg); SEGGER_SYSVIEW_Conf(); if (IS_ENABLED(CONFIG_SEGGER_SYSTEMVIEW_BOOT_ENABLE)) { diff --git a/subsys/tracing/tracing_core.c b/subsys/tracing/tracing_core.c index 62112ab714506..aa41068b402a0 100644 --- a/subsys/tracing/tracing_core.c +++ b/subsys/tracing/tracing_core.c @@ -87,9 +87,8 @@ static void tracing_set_state(enum tracing_state state) atomic_set(&tracing_state, state); } -static int tracing_init(const struct device *arg) +static int tracing_init(void) { - ARG_UNUSED(arg); tracing_buffer_init(); diff --git a/subsys/tracing/tracing_tracking.c b/subsys/tracing/tracing_tracking.c index 89ab7ae20ac09..08948a6ff4faa 100644 --- a/subsys/tracing/tracing_tracking.c +++ b/subsys/tracing/tracing_tracking.c @@ -124,9 +124,8 @@ void sys_track_k_event_init(struct k_event *event) } #endif -static int sys_track_static_init(const struct device *arg) +static int sys_track_static_init(void) { - ARG_UNUSED(arg); SYS_PORT_TRACING_TYPE_MASK(k_timer, SYS_TRACK_STATIC_INIT(k_timer)); diff --git a/subsys/usb/device/class/bluetooth.c b/subsys/usb/device/class/bluetooth.c index 9096151b14839..776c787120fe8 100644 --- a/subsys/usb/device/class/bluetooth.c +++ b/subsys/usb/device/class/bluetooth.c @@ -449,7 +449,7 @@ USBD_DEFINE_CFG_DATA(bluetooth_config) = { .endpoint = bluetooth_ep_data, }; -static int bluetooth_init(const struct device *dev) +static int bluetooth_init(void) { int ret; diff --git a/subsys/usb/device/class/bt_h4.c b/subsys/usb/device/class/bt_h4.c index 89c08a9aa78df..7ef72b2759e62 100644 --- a/subsys/usb/device/class/bt_h4.c +++ b/subsys/usb/device/class/bt_h4.c @@ -221,7 +221,7 @@ USBD_DEFINE_CFG_DATA(bt_h4_config) = { .endpoint = bt_h4_ep_data, }; -static int bt_h4_init(const struct device *dev) +static int bt_h4_init(void) { int ret; diff --git a/subsys/usb/device/class/dfu/usb_dfu.c b/subsys/usb/device/class/dfu/usb_dfu.c index 07c73194d0b58..8f207bf92eabb 100644 --- a/subsys/usb/device/class/dfu/usb_dfu.c +++ b/subsys/usb/device/class/dfu/usb_dfu.c @@ -898,11 +898,10 @@ static void dfu_work_handler(struct k_work *item) } } -static int usb_dfu_init(const struct device *dev) +static int usb_dfu_init(void) { const struct flash_area *fa; - ARG_UNUSED(dev); k_work_init(&dfu_work, dfu_work_handler); k_poll_signal_init(&dfu_signal); diff --git a/subsys/usb/device/class/msc.c b/subsys/usb/device/class/msc.c index d884ee07b4cad..037381cbafc08 100644 --- a/subsys/usb/device/class/msc.c +++ b/subsys/usb/device/class/msc.c @@ -953,11 +953,10 @@ static void mass_thread_main(int arg1, int unused) * * @return negative errno code on fatal failure, 0 otherwise */ -static int mass_storage_init(const struct device *dev) +static int mass_storage_init(void) { uint32_t block_size = 0U; - ARG_UNUSED(dev); if (disk_access_init(disk_pdrv) != 0) { LOG_ERR("Storage init ERROR !!!! - Aborting USB init"); diff --git a/subsys/usb/device/class/netusb/function_rndis.c b/subsys/usb/device/class/netusb/function_rndis.c index 2ea6d0ff2dad3..57feabafca0b4 100644 --- a/subsys/usb/device/class/netusb/function_rndis.c +++ b/subsys/usb/device/class/netusb/function_rndis.c @@ -1030,9 +1030,8 @@ static struct usb_os_descriptor os_desc = { }; #endif /* CONFIG_USB_DEVICE_OS_DESC */ -static int rndis_init(const struct device *arg) +static int rndis_init(void) { - ARG_UNUSED(arg); LOG_DBG("RNDIS initialization"); diff --git a/subsys/usb/device/usb_device.c b/subsys/usb/device/usb_device.c index 291abb2e70c81..dfed9ebac3d09 100644 --- a/subsys/usb/device/usb_device.c +++ b/subsys/usb/device/usb_device.c @@ -1686,7 +1686,7 @@ int usb_enable(usb_dc_status_callback status_cb) * This function configures the USB device stack based on USB descriptor and * usb_cfg_data. */ -static int usb_device_init(const struct device *dev) +static int usb_device_init(void) { uint8_t *device_descriptor; diff --git a/subsys/usb/device/usb_work_q.c b/subsys/usb/device/usb_work_q.c index 81234e80aad9f..503a6b88faf6e 100644 --- a/subsys/usb/device/usb_work_q.c +++ b/subsys/usb/device/usb_work_q.c @@ -14,9 +14,8 @@ K_KERNEL_STACK_DEFINE(z_usb_work_q_stack, CONFIG_USB_WORKQUEUE_STACK_SIZE); struct k_work_q z_usb_work_q; -static int z_usb_work_q_init(const struct device *dev) +static int z_usb_work_q_init(void) { - ARG_UNUSED(dev); k_work_queue_start(&z_usb_work_q, z_usb_work_q_stack, diff --git a/subsys/usb/device_next/class/bt_hci.c b/subsys/usb/device_next/class/bt_hci.c index 03f8f4e6343c2..8772ffeaf03c6 100644 --- a/subsys/usb/device_next/class/bt_hci.c +++ b/subsys/usb/device_next/class/bt_hci.c @@ -588,7 +588,7 @@ static struct usbd_bt_hci_desc bt_hci_desc_##n = { \ BT_HCI_DESCRIPTOR_DEFINE(0) BT_HCI_CLASS_DATA_DEFINE(0) -static int bt_hci_preinit(const struct device *dev) +static int bt_hci_preinit(void) { int ret; diff --git a/subsys/usb/device_next/class/usbd_cdc_acm.c b/subsys/usb/device_next/class/usbd_cdc_acm.c index 33cdc518a9b37..bb115c4941b01 100644 --- a/subsys/usb/device_next/class/usbd_cdc_acm.c +++ b/subsys/usb/device_next/class/usbd_cdc_acm.c @@ -931,7 +931,7 @@ static int cdc_acm_config_get(const struct device *dev, } #endif /* CONFIG_UART_USE_RUNTIME_CONFIGURE */ -static int usbd_cdc_acm_init_wq(const struct device *dev) +static int usbd_cdc_acm_init_wq(void) { k_work_queue_init(&cdc_acm_work_q); k_work_queue_start(&cdc_acm_work_q, cdc_acm_stack, diff --git a/subsys/usb/device_next/usbd_core.c b/subsys/usb/device_next/usbd_core.c index 37d766ac654dd..542a1d300336b 100644 --- a/subsys/usb/device_next/usbd_core.c +++ b/subsys/usb/device_next/usbd_core.c @@ -202,7 +202,7 @@ int usbd_device_shutdown_core(struct usbd_contex *const uds_ctx) return udc_shutdown(uds_ctx->dev); } -static int usbd_pre_init(const struct device *unused) +static int usbd_pre_init(void) { k_thread_create(&usbd_thread_data, usbd_stack, K_KERNEL_STACK_SIZEOF(usbd_stack), diff --git a/subsys/usb/host/usbh_core.c b/subsys/usb/host/usbh_core.c index b3f2359e713d4..00950ac51add7 100644 --- a/subsys/usb/host/usbh_core.c +++ b/subsys/usb/host/usbh_core.c @@ -144,7 +144,7 @@ int usbh_init_device_intl(struct usbh_contex *const uhs_ctx) return 0; } -static int uhs_pre_init(const struct device *unused) +static int uhs_pre_init(void) { k_thread_create(&usbh_thread_data, usbh_stack, K_KERNEL_STACK_SIZEOF(usbh_stack), diff --git a/tests/drivers/clock_control/nrf_lf_clock_start/src/main.c b/tests/drivers/clock_control/nrf_lf_clock_start/src/main.c index 4ce121faf564d..025b18cba02ae 100644 --- a/tests/drivers/clock_control/nrf_lf_clock_start/src/main.c +++ b/tests/drivers/clock_control/nrf_lf_clock_start/src/main.c @@ -113,9 +113,8 @@ ZTEST_SUITE(nrf_lf_clock_start, NULL, test_init, NULL, NULL, NULL); * started in PRE_KERNEL_2). Reading of the clock state in the ZTEST setup * function turns out to be too late. */ -static int get_lfclk_state(const struct device *dev) +static int get_lfclk_state(void) { - ARG_UNUSED(dev); /* Do clock state read as early as possible. When RC is already running * and XTAL has been started then LFSRCSTAT register content might be diff --git a/tests/kernel/device/src/main.c b/tests/kernel/device/src/main.c index 85aaf518131f6..1408ab2d521fa 100644 --- a/tests/kernel/device/src/main.c +++ b/tests/kernel/device/src/main.c @@ -148,23 +148,23 @@ static int add_init_record(bool pre_kernel) } __pinned_func -static int pre1_fn(const struct device *dev) +static int pre1_fn(void) { return add_init_record(true); } __pinned_func -static int pre2_fn(const struct device *dev) +static int pre2_fn(void) { return add_init_record(true); } -static int post_fn(const struct device *dev) +static int post_fn(void) { return add_init_record(false); } -static int app_fn(const struct device *dev) +static int app_fn(void) { return add_init_record(false); } @@ -175,9 +175,8 @@ SYS_INIT(post_fn, POST_KERNEL, 0); SYS_INIT(app_fn, APPLICATION, 0); /* This is an error case which driver initializes failed in SYS_INIT .*/ -static int null_driver_init(const struct device *dev) +static int null_driver_init(void) { - ARG_UNUSED(dev); return -EINVAL; } @@ -238,7 +237,7 @@ ZTEST(device, test_device_list) static int sys_init_counter; -static int init_fn(const struct device *dev) +static int init_fn(void) { sys_init_counter++; return 0; diff --git a/tests/kernel/early_sleep/src/main.c b/tests/kernel/early_sleep/src/main.c index 729ee335e9206..6c4614e4ba850 100644 --- a/tests/kernel/early_sleep/src/main.c +++ b/tests/kernel/early_sleep/src/main.c @@ -65,9 +65,8 @@ static int ticks_to_sleep(int ticks) } -static int test_early_sleep_post_kernel(const struct device *unused) +static int test_early_sleep_post_kernel(void) { - ARG_UNUSED(unused); actual_post_kernel_sleep_ticks = ticks_to_sleep(TEST_TICKS_TO_SLEEP); return 0; } @@ -75,9 +74,8 @@ static int test_early_sleep_post_kernel(const struct device *unused) SYS_INIT(test_early_sleep_post_kernel, POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEVICE); -static int test_early_sleep_app(const struct device *unused) +static int test_early_sleep_app(void) { - ARG_UNUSED(unused); actual_app_sleep_ticks = ticks_to_sleep(TEST_TICKS_TO_SLEEP); return 0; } diff --git a/tests/kernel/threads/no-multithreading/src/main.c b/tests/kernel/threads/no-multithreading/src/main.c index c4a9a84efaf00..c4e54b064bc00 100644 --- a/tests/kernel/threads/no-multithreading/src/main.c +++ b/tests/kernel/threads/no-multithreading/src/main.c @@ -80,9 +80,8 @@ ZTEST(no_multithreading, test_cpu_idle) #define IDX_POST_KERNEL 2 #define SYS_INIT_CREATE(level) \ - static int pre_kernel_##level##_init_func(const struct device *dev) \ + static int pre_kernel_##level##_init_func(void) \ { \ - ARG_UNUSED(dev); \ if (init_order != IDX_##level && sys_init_result == 0) { \ sys_init_result = -1; \ return -EIO; \ diff --git a/tests/lib/cpp/cxx/src/main.cpp b/tests/lib/cpp/cxx/src/main.cpp index b8bb787388e89..6428fe59e3d57 100644 --- a/tests/lib/cpp/cxx/src/main.cpp +++ b/tests/lib/cpp/cxx/src/main.cpp @@ -100,7 +100,7 @@ static struct foo foos[5]; BUILD_ASSERT(ARRAY_SIZE(foos) == 5, "expected 5 elements"); /* Check that SYS_INIT() compiles. */ -static int test_init(const struct device *dev) +static int test_init(void) { return 0; } diff --git a/tests/lib/devicetree/devices/src/main.c b/tests/lib/devicetree/devices/src/main.c index a8702538882be..55eade26fa8e1 100644 --- a/tests/lib/devicetree/devices/src/main.c +++ b/tests/lib/devicetree/devices/src/main.c @@ -87,16 +87,16 @@ ZTEST(devicetree_devices, test_init_get) DEVICE_DT_GET(TEST_NOLABEL), NULL); /* Check init functions */ - zassert_equal(DEVICE_INIT_DT_GET(TEST_GPIO)->init, dev_init); - zassert_equal(DEVICE_INIT_DT_GET(TEST_I2C)->init, dev_init); - zassert_equal(DEVICE_INIT_DT_GET(TEST_DEVA)->init, dev_init); - zassert_equal(DEVICE_INIT_DT_GET(TEST_DEVB)->init, dev_init); - zassert_equal(DEVICE_INIT_DT_GET(TEST_GPIOX)->init, dev_init); - zassert_equal(DEVICE_INIT_DT_GET(TEST_DEVC)->init, dev_init); - zassert_equal(DEVICE_INIT_DT_GET(TEST_PARTITION)->init, dev_init); - zassert_equal(DEVICE_INIT_DT_GET(TEST_GPIO_INJECTED)->init, dev_init); - zassert_equal(DEVICE_INIT_GET(manual_dev)->init, dev_init); - zassert_equal(DEVICE_INIT_DT_GET(TEST_NOLABEL)->init, dev_init); + zassert_equal(DEVICE_INIT_DT_GET(TEST_GPIO)->init_fn.dev, dev_init); + zassert_equal(DEVICE_INIT_DT_GET(TEST_I2C)->init_fn.dev, dev_init); + zassert_equal(DEVICE_INIT_DT_GET(TEST_DEVA)->init_fn.dev, dev_init); + zassert_equal(DEVICE_INIT_DT_GET(TEST_DEVB)->init_fn.dev, dev_init); + zassert_equal(DEVICE_INIT_DT_GET(TEST_GPIOX)->init_fn.dev, dev_init); + zassert_equal(DEVICE_INIT_DT_GET(TEST_DEVC)->init_fn.dev, dev_init); + zassert_equal(DEVICE_INIT_DT_GET(TEST_PARTITION)->init_fn.dev, dev_init); + zassert_equal(DEVICE_INIT_DT_GET(TEST_GPIO_INJECTED)->init_fn.dev, dev_init); + zassert_equal(DEVICE_INIT_GET(manual_dev)->init_fn.dev, dev_init); + zassert_equal(DEVICE_INIT_DT_GET(TEST_NOLABEL)->init_fn.dev, dev_init); } ZTEST(devicetree_devices, test_init_order) diff --git a/tests/subsys/fs/fat_fs_dual_drive/src/disk_access_test_drv.c b/tests/subsys/fs/fat_fs_dual_drive/src/disk_access_test_drv.c index e0e593279605b..8af0f07a3edfa 100644 --- a/tests/subsys/fs/fat_fs_dual_drive/src/disk_access_test_drv.c +++ b/tests/subsys/fs/fat_fs_dual_drive/src/disk_access_test_drv.c @@ -88,9 +88,8 @@ static struct disk_info ram_disk = { .ops = &ram_disk_ops, }; -static int disk_ram_test_init(const struct device *dev) +static int disk_ram_test_init(void) { - ARG_UNUSED(dev); return disk_access_register(&ram_disk); } diff --git a/west.yml b/west.yml index 19bb6a3b37d6b..6527a785a1bbd 100644 --- a/west.yml +++ b/west.yml @@ -139,7 +139,7 @@ manifest: groups: - hal - name: hal_ti - revision: 4e0e053f5ea413ef0cb20000729038d921ac2746 + revision: ae1db23f32dde779cdfc4afaa9a60ea219310a64 path: modules/hal/ti groups: - hal @@ -170,7 +170,7 @@ manifest: revision: ce57712f3e426bbbb13acaec97b45369f716f43a path: modules/lib/loramac-node - name: lvgl - revision: 5ab83099854719ed326b6ecb9b09b07b1eee4818 + revision: 1557cb3e4d5c8dc7bb2e8610b686b5acb157903c path: modules/lib/gui/lvgl - name: lz4 revision: 8e303c264fc21c2116dc612658003a22e933124d @@ -214,7 +214,7 @@ manifest: groups: - debug - name: sof - revision: 7fcde7cfe8187834ae17643a873bb794298658c5 + revision: ac71254757478f79aa88807c168e88aee70a330b path: modules/audio/sof - name: tflite-micro revision: 9156d050927012da87079064db59d07f03b8baf6 @@ -226,7 +226,7 @@ manifest: groups: - crypto - name: TraceRecorderSource - revision: d92607521335eaaaedb01b241cdd26fda48a5ca6 + revision: bc839bf94904bcdb91b33760e918afbef82e3ab4 path: modules/debug/TraceRecorder groups: - debug