diff --git a/arch/common/isr_tables.c b/arch/common/isr_tables.c index b3bdd136e0c..183f80738fe 100644 --- a/arch/common/isr_tables.c +++ b/arch/common/isr_tables.c @@ -15,11 +15,11 @@ struct int_list_header { uint32_t table_size; uint32_t offset; -#if IS_ENABLED(CONFIG_ISR_TABLES_LOCAL_DECLARATION) +#if defined(CONFIG_ISR_TABLES_LOCAL_DECLARATION) uint32_t swi_table_entry_size; uint32_t shared_isr_table_entry_size; uint32_t shared_isr_client_num_offset; -#endif /* IS_ENABLED(CONFIG_ISR_TABLES_LOCAL_DECLARATION) */ +#endif /* defined(CONFIG_ISR_TABLES_LOCAL_DECLARATION) */ }; /* These values are not included in the resulting binary, but instead form the @@ -29,13 +29,13 @@ struct int_list_header { Z_GENERIC_SECTION(.irq_info) __used struct int_list_header _iheader = { .table_size = IRQ_TABLE_SIZE, .offset = CONFIG_GEN_IRQ_START_VECTOR, -#if IS_ENABLED(CONFIG_ISR_TABLES_LOCAL_DECLARATION) +#if defined(CONFIG_ISR_TABLES_LOCAL_DECLARATION) .swi_table_entry_size = sizeof(struct _isr_table_entry), -#if IS_ENABLED(CONFIG_SHARED_INTERRUPTS) +#if defined(CONFIG_SHARED_INTERRUPTS) .shared_isr_table_entry_size = sizeof(struct z_shared_isr_table_entry), .shared_isr_client_num_offset = offsetof(struct z_shared_isr_table_entry, client_num), -#endif /* IS_ENABLED(CONFIG_SHARED_INTERRUPTS) */ -#endif /* IS_ENABLED(CONFIG_ISR_TABLES_LOCAL_DECLARATION) */ +#endif /* defined(CONFIG_SHARED_INTERRUPTS) */ +#endif /* defined(CONFIG_ISR_TABLES_LOCAL_DECLARATION) */ }; /* These are placeholder tables. They will be replaced by the real tables diff --git a/drivers/cache/cache_andes.c b/drivers/cache/cache_andes.c index e9907cfaa46..8008013a86d 100644 --- a/drivers/cache/cache_andes.c +++ b/drivers/cache/cache_andes.c @@ -467,19 +467,19 @@ int cache_instr_flush_and_invd_range(void *addr, size_t size) return -ENOTSUP; } -#if IS_ENABLED(CONFIG_DCACHE_LINE_SIZE_DETECT) +#if defined(CONFIG_DCACHE_LINE_SIZE_DETECT) size_t cache_data_line_size_get(void) { return cache_cfg.data_line_size; } -#endif /* IS_ENABLED(CONFIG_DCACHE_LINE_SIZE_DETECT) */ +#endif /* defined(CONFIG_DCACHE_LINE_SIZE_DETECT) */ -#if IS_ENABLED(CONFIG_ICACHE_LINE_SIZE_DETECT) +#if defined(CONFIG_ICACHE_LINE_SIZE_DETECT) size_t cache_instr_line_size_get(void) { return cache_cfg.instr_line_size; } -#endif /* IS_ENABLED(CONFIG_ICACHE_LINE_SIZE_DETECT) */ +#endif /* defined(CONFIG_ICACHE_LINE_SIZE_DETECT) */ static int andes_cache_init(void) { @@ -492,7 +492,7 @@ static int andes_cache_init(void) LOG_ERR("Platform doesn't support I-cache, " "please disable CONFIG_ICACHE"); } -#if IS_ENABLED(CONFIG_ICACHE_LINE_SIZE_DETECT) +#if defined(CONFIG_ICACHE_LINE_SIZE_DETECT) /* Icache line size */ if (line_size <= 5) { cache_cfg.instr_line_size = 1 << (line_size + 2); @@ -507,7 +507,7 @@ static int andes_cache_init(void) #else LOG_ERR("Please specific the i-cache-line-size " "CPU0 property of the DT"); -#endif /* IS_ENABLED(CONFIG_ICACHE_LINE_SIZE_DETECT) */ +#endif /* defined(CONFIG_ICACHE_LINE_SIZE_DETECT) */ } if (IS_ENABLED(CONFIG_DCACHE)) { @@ -516,7 +516,7 @@ static int andes_cache_init(void) LOG_ERR("Platform doesn't support D-cache, " "please disable CONFIG_DCACHE"); } -#if IS_ENABLED(CONFIG_DCACHE_LINE_SIZE_DETECT) +#if defined(CONFIG_DCACHE_LINE_SIZE_DETECT) /* Dcache line size */ if (line_size <= 5) { cache_cfg.data_line_size = 1 << (line_size + 2); @@ -531,7 +531,7 @@ static int andes_cache_init(void) #else LOG_ERR("Please specific the d-cache-line-size " "CPU0 property of the DT"); -#endif /* IS_ENABLED(CONFIG_DCACHE_LINE_SIZE_DETECT) */ +#endif /* defined(CONFIG_DCACHE_LINE_SIZE_DETECT) */ } if (!(csr_read(NDS_MMSC_CFG) & MMSC_CFG_CCTLCSR)) { diff --git a/drivers/cache/cache_andes_l2.h b/drivers/cache/cache_andes_l2.h index d6de7551821..962bf837fd8 100644 --- a/drivers/cache/cache_andes_l2.h +++ b/drivers/cache/cache_andes_l2.h @@ -208,7 +208,7 @@ static ALWAYS_INLINE int nds_l2_cache_init(void) { unsigned long line_size; -#if IS_ENABLED(CONFIG_SYSCON) +#if defined(CONFIG_SYSCON) #if DT_NODE_HAS_COMPAT_STATUS(DT_NODELABEL(syscon), andestech_atcsmu100, okay) uint32_t system_cfg; const struct device *syscon_dev = DEVICE_DT_GET(DT_NODELABEL(syscon)); @@ -228,7 +228,7 @@ static ALWAYS_INLINE int nds_l2_cache_init(void) return 0; } #endif /* andestech_atcsmu100 dts node status okay */ -#endif /* IS_ENABLED(CONFIG_SYSCON) */ +#endif /* defined(CONFIG_SYSCON) */ uint32_t l2c_ctrl; diff --git a/drivers/flash/flash_simulator.c b/drivers/flash/flash_simulator.c index 3a7d578a250..204da43c22f 100644 --- a/drivers/flash/flash_simulator.c +++ b/drivers/flash/flash_simulator.c @@ -274,7 +274,7 @@ static int flash_sim_write(const struct device *dev, const off_t offset, #endif /* CONFIG_FLASH_SIMULATOR_STATS */ /* only pull bits to zero */ -#if IS_ENABLED(CONFIG_FLASH_SIMULATOR_EXPLICIT_ERASE) +#if defined(CONFIG_FLASH_SIMULATOR_EXPLICIT_ERASE) #if FLASH_SIMULATOR_ERASE_VALUE == 0xFF *(MOCK_FLASH(offset + i)) &= *((uint8_t *)data + i); #else diff --git a/drivers/flash/flash_util.c b/drivers/flash/flash_util.c index 26acfdf65cc..fcd6509b802 100644 --- a/drivers/flash/flash_util.c +++ b/drivers/flash/flash_util.c @@ -67,14 +67,14 @@ int z_impl_flash_flatten(const struct device *dev, off_t offset, size_t size) (const struct flash_driver_api *)dev->api; __maybe_unused const struct flash_parameters *params = api->get_parameters(dev); -#if IS_ENABLED(CONFIG_FLASH_HAS_EXPLICIT_ERASE) +#if defined(CONFIG_FLASH_HAS_EXPLICIT_ERASE) if ((flash_params_get_erase_cap(params) & FLASH_ERASE_C_EXPLICIT) && api->erase != NULL) { return api->erase(dev, offset, size); } #endif -#if IS_ENABLED(CONFIG_FLASH_HAS_NO_EXPLICIT_ERASE) +#if defined(CONFIG_FLASH_HAS_NO_EXPLICIT_ERASE) return flash_fill(dev, params->erase_value, offset, size); #else return -ENOSYS; diff --git a/drivers/flash/soc_flash_nrf.c b/drivers/flash/soc_flash_nrf.c index de9cfd42345..c15722082a3 100644 --- a/drivers/flash/soc_flash_nrf.c +++ b/drivers/flash/soc_flash_nrf.c @@ -184,7 +184,7 @@ static int flash_nrf_write(const struct device *dev, off_t addr, return -EINVAL; } -#if !IS_ENABLED(CONFIG_SOC_FLASH_NRF_EMULATE_ONE_BYTE_WRITE_ACCESS) +#if !defined(CONFIG_SOC_FLASH_NRF_EMULATE_ONE_BYTE_WRITE_ACCESS) if (!is_aligned_32(addr) || (len % sizeof(uint32_t))) { LOG_ERR("not word-aligned: 0x%08lx:%zu", (unsigned long)addr, len); diff --git a/drivers/flash/spi_flash_at45.c b/drivers/flash/spi_flash_at45.c index a223fb0863d..ebdf522480e 100644 --- a/drivers/flash/spi_flash_at45.c +++ b/drivers/flash/spi_flash_at45.c @@ -525,7 +525,7 @@ static void spi_flash_at45_pages_layout(const struct device *dev, *layout = &cfg->pages_layout; *layout_size = 1; } -#endif /* IS_ENABLED(CONFIG_FLASH_PAGE_LAYOUT) */ +#endif /* defined(CONFIG_FLASH_PAGE_LAYOUT) */ static int power_down_op(const struct device *dev, uint8_t opcode, uint32_t delay) @@ -636,7 +636,7 @@ static int spi_flash_at45_pm_action(const struct device *dev, return 0; } -#endif /* IS_ENABLED(CONFIG_PM_DEVICE) */ +#endif /* defined(CONFIG_PM_DEVICE) */ static const struct flash_parameters * flash_at45_get_parameters(const struct device *dev) diff --git a/drivers/ieee802154/ieee802154_nrf5.c b/drivers/ieee802154/ieee802154_nrf5.c index 13f4132a01d..613c913868b 100644 --- a/drivers/ieee802154/ieee802154_nrf5.c +++ b/drivers/ieee802154/ieee802154_nrf5.c @@ -739,7 +739,7 @@ static int nrf5_continuous_carrier(const struct device *dev) } #endif -#if !IS_ENABLED(CONFIG_IEEE802154_NRF5_EXT_IRQ_MGMT) +#if !defined(CONFIG_IEEE802154_NRF5_EXT_IRQ_MGMT) static void nrf5_radio_irq(const void *arg) { ARG_UNUSED(arg); @@ -752,7 +752,7 @@ static void nrf5_irq_config(const struct device *dev) { ARG_UNUSED(dev); -#if !IS_ENABLED(CONFIG_IEEE802154_NRF5_EXT_IRQ_MGMT) +#if !defined(CONFIG_IEEE802154_NRF5_EXT_IRQ_MGMT) IRQ_CONNECT(DT_IRQN(DT_NODELABEL(radio)), NRF_802154_IRQ_PRIORITY, nrf5_radio_irq, NULL, 0); irq_enable(DT_IRQN(DT_NODELABEL(radio))); #endif diff --git a/drivers/interrupt_controller/intc_plic.c b/drivers/interrupt_controller/intc_plic.c index 144e448a04d..efebfc07f9d 100644 --- a/drivers/interrupt_controller/intc_plic.c +++ b/drivers/interrupt_controller/intc_plic.c @@ -357,7 +357,7 @@ static void plic_irq_handler(const struct device *dev) z_irq_spurious(NULL); } -#if IS_ENABLED(PLIC_DRV_HAS_COMPAT(andestech_nceplic100)) +#if PLIC_DRV_HAS_COMPAT(andestech_nceplic100) trig_val = riscv_plic_irq_trig_val(dev, local_irq); /* * Edge-triggered interrupts on Andes NCEPLIC100 have to be acknowledged first before @@ -377,7 +377,7 @@ static void plic_irq_handler(const struct device *dev) * PLIC controller that the IRQ has been handled * for level triggered interrupts. */ -#if IS_ENABLED(PLIC_DRV_HAS_COMPAT(andestech_nceplic100)) +#if PLIC_DRV_HAS_COMPAT(andestech_nceplic100) /* For NCEPLIC100, handle only if level-triggered */ if (trig_val == PLIC_TRIG_LEVEL) { sys_write32(local_irq, claim_complete_addr); diff --git a/drivers/ipm/ipm_imx.c b/drivers/ipm/ipm_imx.c index 7a4b3b1e210..b8e716af7b0 100644 --- a/drivers/ipm/ipm_imx.c +++ b/drivers/ipm/ipm_imx.c @@ -167,7 +167,7 @@ static int imx_mu_ipm_send(const struct device *dev, int wait, uint32_t id, const struct imx_mu_config *config = dev->config; MU_Type *base = MU(config); uint32_t data32[IMX_IPM_DATA_REGS] = {0}; -#if !IS_ENABLED(CONFIG_HAS_MCUX) +#if !defined(CONFIG_HAS_MCUX) mu_status_t status; #endif int i; diff --git a/drivers/regulator/regulator_da1469x.c b/drivers/regulator/regulator_da1469x.c index fe6d6a8ccc1..2273fe363bd 100644 --- a/drivers/regulator/regulator_da1469x.c +++ b/drivers/regulator/regulator_da1469x.c @@ -408,7 +408,7 @@ static int regulator_da1469x_init(const struct device *dev) return regulator_common_init(dev, 0); } -#if IS_ENABLED(CONFIG_PM_DEVICE) +#if defined(CONFIG_PM_DEVICE) static int regulator_da1469x_pm_action(const struct device *dev, enum pm_device_action action) { diff --git a/drivers/serial/uart_pl011.c b/drivers/serial/uart_pl011.c index 160d6887f9d..54bebac9dd8 100644 --- a/drivers/serial/uart_pl011.c +++ b/drivers/serial/uart_pl011.c @@ -21,10 +21,10 @@ #if defined(CONFIG_PINCTRL) #include #endif -#if IS_ENABLED(CONFIG_RESET) +#if defined(CONFIG_RESET) #include #endif -#if IS_ENABLED(CONFIG_CLOCK_CONTROL) +#if defined(CONFIG_CLOCK_CONTROL) #include #endif @@ -41,10 +41,10 @@ struct pl011_config { #if defined(CONFIG_PINCTRL) const struct pinctrl_dev_config *pincfg; #endif -#if IS_ENABLED(CONFIG_RESET) +#if defined(CONFIG_RESET) const struct reset_dt_spec reset; #endif -#if IS_ENABLED(CONFIG_CLOCK_CONTROL) +#if defined(CONFIG_CLOCK_CONTROL) const struct device *clock_dev; clock_control_subsys_t clock_id; #endif @@ -445,7 +445,7 @@ static int pl011_init(const struct device *dev) DEVICE_MMIO_MAP(dev, K_MEM_CACHE_NONE); -#if IS_ENABLED(CONFIG_RESET) +#if defined(CONFIG_RESET) if (config->reset.dev) { ret = reset_line_toggle_dt(&config->reset); if (ret) { @@ -454,7 +454,7 @@ static int pl011_init(const struct device *dev) } #endif -#if IS_ENABLED(CONFIG_CLOCK_CONTROL) +#if defined(CONFIG_CLOCK_CONTROL) if (config->clock_dev) { clock_control_on(config->clock_dev, config->clock_id); clock_control_get_rate(config->clock_dev, config->clock_id, &data->clk_freq); @@ -560,7 +560,7 @@ static int pl011_init(const struct device *dev) #define PINCTRL_INIT(n) #endif /* CONFIG_PINCTRL */ -#if IS_ENABLED(CONFIG_RESET) +#if defined(CONFIG_RESET) #define RESET_INIT(n) \ IF_ENABLED(DT_INST_NODE_HAS_PROP(0, resets), (.reset = RESET_DT_SPEC_INST_GET(n),)) #else diff --git a/drivers/spi/spi_dw.h b/drivers/spi/spi_dw.h index 6c073b47471..e1df26d1c14 100644 --- a/drivers/spi/spi_dw.h +++ b/drivers/spi/spi_dw.h @@ -179,7 +179,7 @@ static int reg_test_bit(uint8_t bit, mm_reg_t addr, uint32_t off) /* Common registers settings, bits etc... */ /* CTRLR0 settings */ -#if !IS_ENABLED(CONFIG_SPI_DW_HSSI) +#if !defined(CONFIG_SPI_DW_HSSI) #define DW_SPI_CTRLR0_SCPH_BIT (6) #define DW_SPI_CTRLR0_SCPOL_BIT (7) #define DW_SPI_CTRLR0_TMOD_SHIFT (8) diff --git a/drivers/spi/spi_pl022.c b/drivers/spi/spi_pl022.c index ed30dddf1e1..817a826d4da 100644 --- a/drivers/spi/spi_pl022.c +++ b/drivers/spi/spi_pl022.c @@ -275,11 +275,11 @@ struct spi_pl022_cfg { const uint32_t reg; const uint32_t pclk; const bool dma_enabled; -#if IS_ENABLED(CONFIG_CLOCK_CONTROL) +#if defined(CONFIG_CLOCK_CONTROL) const struct device *clk_dev; const clock_control_subsys_t clk_id; #endif -#if IS_ENABLED(CONFIG_RESET) +#if defined(CONFIG_RESET) const struct reset_dt_spec reset; #endif #if defined(CONFIG_PINCTRL) @@ -354,7 +354,7 @@ static int spi_pl022_configure(const struct device *dev, return 0; } -#if IS_ENABLED(CONFIG_CLOCK_CONTROL) +#if defined(CONFIG_CLOCK_CONTROL) ret = clock_control_get_rate(cfg->clk_dev, cfg->clk_id, &pclk); if (ret < 0 || pclk == 0) { return -EINVAL; @@ -906,7 +906,7 @@ static int spi_pl022_init(const struct device *dev) struct spi_pl022_data *data = dev->data; int ret; -#if IS_ENABLED(CONFIG_CLOCK_CONTROL) +#if defined(CONFIG_CLOCK_CONTROL) if (cfg->clk_dev) { ret = clock_control_on(cfg->clk_dev, cfg->clk_id); if (ret < 0) { @@ -916,7 +916,7 @@ static int spi_pl022_init(const struct device *dev) } #endif -#if IS_ENABLED(CONFIG_RESET) +#if defined(CONFIG_RESET) if (cfg->reset.dev) { ret = reset_line_toggle_dt(&cfg->reset); if (ret < 0) { diff --git a/include/zephyr/bindesc.h b/include/zephyr/bindesc.h index a45e69a2b9c..48cb71c401a 100644 --- a/include/zephyr/bindesc.h +++ b/include/zephyr/bindesc.h @@ -128,7 +128,7 @@ extern "C" { * @endcond */ -#if !IS_ENABLED(_LINKER) +#if !defined(_LINKER) #include @@ -264,10 +264,6 @@ extern "C" { */ #define BINDESC_GET_SIZE(name) BINDESC_NAME(name).len -/** - * @} - */ - /* * An entry of the binary descriptor header. Each descriptor is * described by one of these entries. @@ -291,107 +287,111 @@ BUILD_ASSERT(offsetof(struct bindesc_entry, tag) == 0, "Incorrect memory layout" BUILD_ASSERT(offsetof(struct bindesc_entry, len) == 2, "Incorrect memory layout"); BUILD_ASSERT(offsetof(struct bindesc_entry, data) == 4, "Incorrect memory layout"); -#if IS_ENABLED(CONFIG_BINDESC_KERNEL_VERSION_STRING) +#if defined(CONFIG_BINDESC_KERNEL_VERSION_STRING) extern const struct bindesc_entry BINDESC_NAME(kernel_version_string); -#endif /* IS_ENABLED(CONFIG_BINDESC_KERNEL_VERSION_STRING) */ +#endif /* defined(CONFIG_BINDESC_KERNEL_VERSION_STRING) */ -#if IS_ENABLED(CONFIG_BINDESC_KERNEL_VERSION_MAJOR) +#if defined(CONFIG_BINDESC_KERNEL_VERSION_MAJOR) extern const struct bindesc_entry BINDESC_NAME(kernel_version_major); -#endif /* IS_ENABLED(CONFIG_BINDESC_KERNEL_VERSION_MAJOR) */ +#endif /* defined(CONFIG_BINDESC_KERNEL_VERSION_MAJOR) */ -#if IS_ENABLED(CONFIG_BINDESC_KERNEL_VERSION_MINOR) +#if defined(CONFIG_BINDESC_KERNEL_VERSION_MINOR) extern const struct bindesc_entry BINDESC_NAME(kernel_version_minor); -#endif /* IS_ENABLED(CONFIG_BINDESC_KERNEL_VERSION_MINOR) */ +#endif /* defined(CONFIG_BINDESC_KERNEL_VERSION_MINOR) */ -#if IS_ENABLED(CONFIG_BINDESC_KERNEL_VERSION_PATCHLEVEL) +#if defined(CONFIG_BINDESC_KERNEL_VERSION_PATCHLEVEL) extern const struct bindesc_entry BINDESC_NAME(kernel_version_patchlevel); -#endif /* IS_ENABLED(CONFIG_BINDESC_KERNEL_VERSION_PATCHLEVEL) */ +#endif /* defined(CONFIG_BINDESC_KERNEL_VERSION_PATCHLEVEL) */ -#if IS_ENABLED(CONFIG_BINDESC_KERNEL_VERSION_NUMBER) +#if defined(CONFIG_BINDESC_KERNEL_VERSION_NUMBER) extern const struct bindesc_entry BINDESC_NAME(kernel_version_number); -#endif /* IS_ENABLED(CONFIG_BINDESC_KERNEL_VERSION_NUMBER) */ +#endif /* defined(CONFIG_BINDESC_KERNEL_VERSION_NUMBER) */ -#if IS_ENABLED(CONFIG_BINDESC_APP_VERSION_STRING) +#if defined(CONFIG_BINDESC_APP_VERSION_STRING) extern const struct bindesc_entry BINDESC_NAME(app_version_string); -#endif /* IS_ENABLED(CONFIG_BINDESC_APP_VERSION_STRING) */ +#endif /* defined(CONFIG_BINDESC_APP_VERSION_STRING) */ -#if IS_ENABLED(CONFIG_BINDESC_APP_VERSION_MAJOR) +#if defined(CONFIG_BINDESC_APP_VERSION_MAJOR) extern const struct bindesc_entry BINDESC_NAME(app_version_major); -#endif /* IS_ENABLED(CONFIG_BINDESC_APP_VERSION_MAJOR) */ +#endif /* defined(CONFIG_BINDESC_APP_VERSION_MAJOR) */ -#if IS_ENABLED(CONFIG_BINDESC_APP_VERSION_MINOR) +#if defined(CONFIG_BINDESC_APP_VERSION_MINOR) extern const struct bindesc_entry BINDESC_NAME(app_version_minor); -#endif /* IS_ENABLED(CONFIG_BINDESC_APP_VERSION_MINOR) */ +#endif /* defined(CONFIG_BINDESC_APP_VERSION_MINOR) */ -#if IS_ENABLED(CONFIG_BINDESC_APP_VERSION_PATCHLEVEL) +#if defined(CONFIG_BINDESC_APP_VERSION_PATCHLEVEL) extern const struct bindesc_entry BINDESC_NAME(app_version_patchlevel); -#endif /* IS_ENABLED(CONFIG_BINDESC_APP_VERSION_PATCHLEVEL) */ +#endif /* defined(CONFIG_BINDESC_APP_VERSION_PATCHLEVEL) */ -#if IS_ENABLED(CONFIG_BINDESC_APP_VERSION_NUMBER) +#if defined(CONFIG_BINDESC_APP_VERSION_NUMBER) extern const struct bindesc_entry BINDESC_NAME(app_version_number); -#endif /* IS_ENABLED(CONFIG_BINDESC_APP_VERSION_NUMBER) */ +#endif /* defined(CONFIG_BINDESC_APP_VERSION_NUMBER) */ -#if IS_ENABLED(CONFIG_BINDESC_BUILD_TIME_YEAR) +#if defined(CONFIG_BINDESC_BUILD_TIME_YEAR) extern const struct bindesc_entry BINDESC_NAME(build_time_year); -#endif /* IS_ENABLED(CONFIG_BINDESC_BUILD_TIME_YEAR) */ +#endif /* defined(CONFIG_BINDESC_BUILD_TIME_YEAR) */ -#if IS_ENABLED(CONFIG_BINDESC_BUILD_TIME_MONTH) +#if defined(CONFIG_BINDESC_BUILD_TIME_MONTH) extern const struct bindesc_entry BINDESC_NAME(build_time_month); -#endif /* IS_ENABLED(CONFIG_BINDESC_BUILD_TIME_MONTH) */ +#endif /* defined(CONFIG_BINDESC_BUILD_TIME_MONTH) */ -#if IS_ENABLED(CONFIG_BINDESC_BUILD_TIME_DAY) +#if defined(CONFIG_BINDESC_BUILD_TIME_DAY) extern const struct bindesc_entry BINDESC_NAME(build_time_day); -#endif /* IS_ENABLED(CONFIG_BINDESC_BUILD_TIME_DAY) */ +#endif /* defined(CONFIG_BINDESC_BUILD_TIME_DAY) */ -#if IS_ENABLED(CONFIG_BINDESC_BUILD_TIME_HOUR) +#if defined(CONFIG_BINDESC_BUILD_TIME_HOUR) extern const struct bindesc_entry BINDESC_NAME(build_time_hour); -#endif /* IS_ENABLED(CONFIG_BINDESC_BUILD_TIME_HOUR) */ +#endif /* defined(CONFIG_BINDESC_BUILD_TIME_HOUR) */ -#if IS_ENABLED(CONFIG_BINDESC_BUILD_TIME_MINUTE) +#if defined(CONFIG_BINDESC_BUILD_TIME_MINUTE) extern const struct bindesc_entry BINDESC_NAME(build_time_minute); -#endif /* IS_ENABLED(CONFIG_BINDESC_BUILD_TIME_MINUTE) */ +#endif /* defined(CONFIG_BINDESC_BUILD_TIME_MINUTE) */ -#if IS_ENABLED(CONFIG_BINDESC_BUILD_TIME_SECOND) +#if defined(CONFIG_BINDESC_BUILD_TIME_SECOND) extern const struct bindesc_entry BINDESC_NAME(build_time_second); -#endif /* IS_ENABLED(CONFIG_BINDESC_BUILD_TIME_SECOND) */ +#endif /* defined(CONFIG_BINDESC_BUILD_TIME_SECOND) */ -#if IS_ENABLED(CONFIG_BINDESC_BUILD_TIME_UNIX) +#if defined(CONFIG_BINDESC_BUILD_TIME_UNIX) extern const struct bindesc_entry BINDESC_NAME(build_time_unix); -#endif /* IS_ENABLED(CONFIG_BINDESC_BUILD_TIME_UNIX) */ +#endif /* defined(CONFIG_BINDESC_BUILD_TIME_UNIX) */ -#if IS_ENABLED(CONFIG_BINDESC_BUILD_DATE_TIME_STRING) +#if defined(CONFIG_BINDESC_BUILD_DATE_TIME_STRING) extern const struct bindesc_entry BINDESC_NAME(build_date_time_string); -#endif /* IS_ENABLED(CONFIG_BINDESC_BUILD_DATE_TIME_STRING) */ +#endif /* defined(CONFIG_BINDESC_BUILD_DATE_TIME_STRING) */ -#if IS_ENABLED(CONFIG_BINDESC_BUILD_DATE_STRING) +#if defined(CONFIG_BINDESC_BUILD_DATE_STRING) extern const struct bindesc_entry BINDESC_NAME(build_date_string); -#endif /* IS_ENABLED(CONFIG_BINDESC_BUILD_DATE_STRING) */ +#endif /* defined(CONFIG_BINDESC_BUILD_DATE_STRING) */ -#if IS_ENABLED(CONFIG_BINDESC_BUILD_TIME_STRING) +#if defined(CONFIG_BINDESC_BUILD_TIME_STRING) extern const struct bindesc_entry BINDESC_NAME(build_time_string); -#endif /* IS_ENABLED(CONFIG_BINDESC_BUILD_TIME_STRING) */ +#endif /* defined(CONFIG_BINDESC_BUILD_TIME_STRING) */ -#if IS_ENABLED(CONFIG_BINDESC_HOST_NAME) +#if defined(CONFIG_BINDESC_HOST_NAME) extern const struct bindesc_entry BINDESC_NAME(host_name); -#endif /* IS_ENABLED(CONFIG_BINDESC_HOST_NAME) */ +#endif /* defined(CONFIG_BINDESC_HOST_NAME) */ -#if IS_ENABLED(CONFIG_BINDESC_C_COMPILER_NAME) +#if defined(CONFIG_BINDESC_C_COMPILER_NAME) extern const struct bindesc_entry BINDESC_NAME(c_compiler_name); -#endif /* IS_ENABLED(CONFIG_BINDESC_C_COMPILER_NAME) */ +#endif /* defined(CONFIG_BINDESC_C_COMPILER_NAME) */ -#if IS_ENABLED(CONFIG_BINDESC_C_COMPILER_VERSION) +#if defined(CONFIG_BINDESC_C_COMPILER_VERSION) extern const struct bindesc_entry BINDESC_NAME(c_compiler_version); -#endif /* IS_ENABLED(CONFIG_BINDESC_C_COMPILER_VERSION) */ +#endif /* defined(CONFIG_BINDESC_C_COMPILER_VERSION) */ -#if IS_ENABLED(CONFIG_BINDESC_CXX_COMPILER_NAME) +#if defined(CONFIG_BINDESC_CXX_COMPILER_NAME) extern const struct bindesc_entry BINDESC_NAME(cxx_compiler_name); -#endif /* IS_ENABLED(CONFIG_BINDESC_CXX_COMPILER_NAME) */ +#endif /* defined(CONFIG_BINDESC_CXX_COMPILER_NAME) */ -#if IS_ENABLED(CONFIG_BINDESC_CXX_COMPILER_VERSION) +#if defined(CONFIG_BINDESC_CXX_COMPILER_VERSION) extern const struct bindesc_entry BINDESC_NAME(cxx_compiler_version); -#endif /* IS_ENABLED(CONFIG_BINDESC_CXX_COMPILER_VERSION) */ +#endif /* defined(CONFIG_BINDESC_CXX_COMPILER_VERSION) */ -#endif /* !IS_ENABLED(_LINKER) */ +#endif /* !defined(_LINKER) */ + +/** + * @} + */ #ifdef __cplusplus } diff --git a/include/zephyr/mgmt/mcumgr/grp/img_mgmt/img_mgmt.h b/include/zephyr/mgmt/mcumgr/grp/img_mgmt/img_mgmt.h index c11e423e26d..82e642c7375 100644 --- a/include/zephyr/mgmt/mcumgr/grp/img_mgmt/img_mgmt.h +++ b/include/zephyr/mgmt/mcumgr/grp/img_mgmt/img_mgmt.h @@ -345,7 +345,7 @@ int img_mgmt_state_confirm(void); */ int img_mgmt_vercmp(const struct image_version *a, const struct image_version *b); -#if IS_ENABLED(CONFIG_MCUMGR_GRP_IMG_MUTEX) +#if defined(CONFIG_MCUMGR_GRP_IMG_MUTEX) /* * @brief Will reset the image management state back to default (no ongoing upload), * requires that CONFIG_MCUMGR_GRP_IMG_MUTEX be enabled to allow for mutex diff --git a/include/zephyr/mgmt/mcumgr/mgmt/mgmt.h b/include/zephyr/mgmt/mcumgr/mgmt/mgmt.h index 9a139b3a04b..a247a1c283d 100644 --- a/include/zephyr/mgmt/mcumgr/mgmt/mgmt.h +++ b/include/zephyr/mgmt/mcumgr/mgmt/mgmt.h @@ -74,7 +74,7 @@ typedef int (*mgmt_handler_fn)(struct smp_streamer *ctxt); struct mgmt_handler { mgmt_handler_fn mh_read; mgmt_handler_fn mh_write; -#if IS_ENABLED(CONFIG_MCUMGR_MGMT_HANDLER_USER_DATA) +#if defined(CONFIG_MCUMGR_MGMT_HANDLER_USER_DATA) void *user_data; #endif }; @@ -93,7 +93,7 @@ struct mgmt_group { /** The numeric ID of this group. */ uint16_t mg_group_id; -#if IS_ENABLED(CONFIG_MCUMGR_SMP_SUPPORT_ORIGINAL_PROTOCOL) +#if defined(CONFIG_MCUMGR_SMP_SUPPORT_ORIGINAL_PROTOCOL) /** A function handler for translating version 2 SMP error codes to version 1 SMP error * codes (optional) */ @@ -152,7 +152,7 @@ const struct mgmt_group *mgmt_find_group(uint16_t group_id); */ const struct mgmt_handler *mgmt_get_handler(const struct mgmt_group *group, uint16_t command_id); -#if IS_ENABLED(CONFIG_MCUMGR_SMP_SUPPORT_ORIGINAL_PROTOCOL) +#if defined(CONFIG_MCUMGR_SMP_SUPPORT_ORIGINAL_PROTOCOL) /** * @brief Finds a registered error translation function for converting from SMP * version 2 error codes to legacy SMP version 1 error codes. diff --git a/include/zephyr/mgmt/mcumgr/smp/smp.h b/include/zephyr/mgmt/mcumgr/smp/smp.h index fc148e2fad7..c72461a939a 100644 --- a/include/zephyr/mgmt/mcumgr/smp/smp.h +++ b/include/zephyr/mgmt/mcumgr/smp/smp.h @@ -56,7 +56,7 @@ struct cbor_nb_writer { struct net_buf *nb; zcbor_state_t zs[CONFIG_MCUMGR_SMP_CBOR_MAX_ENCODING_LEVELS + 2]; -#if IS_ENABLED(CONFIG_MCUMGR_SMP_SUPPORT_ORIGINAL_PROTOCOL) +#if defined(CONFIG_MCUMGR_SMP_SUPPORT_ORIGINAL_PROTOCOL) uint16_t error_group; uint16_t error_ret; #endif @@ -127,7 +127,7 @@ __deprecated inline bool smp_add_cmd_ret(zcbor_state_t *zse, uint16_t group, uin return smp_add_cmd_err(zse, group, ret); } -#if IS_ENABLED(CONFIG_MCUMGR_SMP_SUPPORT_ORIGINAL_PROTOCOL) +#if defined(CONFIG_MCUMGR_SMP_SUPPORT_ORIGINAL_PROTOCOL) /** @typedef smp_translate_error_fn * @brief Translates a SMP version 2 error response to a legacy SMP version 1 error code. * diff --git a/include/zephyr/retention/blinfo.h b/include/zephyr/retention/blinfo.h index e3a6e6b570d..78cd12459bc 100644 --- a/include/zephyr/retention/blinfo.h +++ b/include/zephyr/retention/blinfo.h @@ -33,7 +33,7 @@ extern "C" { * @{ */ -#if IS_ENABLED(CONFIG_RETENTION_BOOTLOADER_INFO_OUTPUT_FUNCTION) || defined(__DOXYGEN__) +#if defined(CONFIG_RETENTION_BOOTLOADER_INFO_OUTPUT_FUNCTION) || defined(__DOXYGEN__) /** * @brief Returns bootinfo information. * diff --git a/include/zephyr/sw_isr_table.h b/include/zephyr/sw_isr_table.h index ea708cba4f7..3636f49591e 100644 --- a/include/zephyr/sw_isr_table.h +++ b/include/zephyr/sw_isr_table.h @@ -183,7 +183,7 @@ extern struct z_shared_isr_table_entry z_shared_sw_isr_table[]; #define __MK_ISR_NAME(x, y) __isr_ ## x ## _irq_ ## y -#if IS_ENABLED(CONFIG_ISR_TABLES_LOCAL_DECLARATION) +#if defined(CONFIG_ISR_TABLES_LOCAL_DECLARATION) #define _MK_ISR_ELEMENT_NAME(func, id) __MK_ISR_ELEMENT_NAME(func, id) #define __MK_ISR_ELEMENT_NAME(func, id) __isr_table_entry_ ## func ## _irq_ ## id @@ -264,7 +264,7 @@ extern struct z_shared_isr_table_entry z_shared_sw_isr_table[]; Z_ISR_DECLARE_DIRECT_C(irq, flags, func, __COUNTER__) -#else /* IS_ENABLED(CONFIG_ISR_TABLES_LOCAL_DECLARATION) */ +#else /* defined(CONFIG_ISR_TABLES_LOCAL_DECLARATION) */ /* Create an instance of struct _isr_list which gets put in the .intList * section. This gets consumed by gen_isr_tables.py which creates the vector diff --git a/include/zephyr/sys/mpsc_lockfree.h b/include/zephyr/sys/mpsc_lockfree.h index 3e6c89d99a0..ccf9bc4d5a1 100644 --- a/include/zephyr/sys/mpsc_lockfree.h +++ b/include/zephyr/sys/mpsc_lockfree.h @@ -50,7 +50,7 @@ extern "C" { * On SMP atomics *must* be used to ensure the pointers * are updated in the correct order. */ -#if IS_ENABLED(CONFIG_SMP) +#if defined(CONFIG_SMP) typedef atomic_ptr_t mpsc_ptr_t; @@ -58,7 +58,7 @@ typedef atomic_ptr_t mpsc_ptr_t; #define mpsc_ptr_set(ptr, val) atomic_ptr_set(&(ptr), val) #define mpsc_ptr_set_get(ptr, val) atomic_ptr_set(&(ptr), val) -#else /* IS_ENABLED(CONFIG_SMP) */ +#else /* defined(CONFIG_SMP) */ typedef struct mpsc_node *mpsc_ptr_t; @@ -71,7 +71,7 @@ typedef struct mpsc_node *mpsc_ptr_t; tmp; \ }) -#endif /* IS_ENABLED(CONFIG_SMP) */ +#endif /* defined(CONFIG_SMP) */ /** * @brief Queue member diff --git a/samples/drivers/soc_flash_nrf/src/main.c b/samples/drivers/soc_flash_nrf/src/main.c index d55214afcc5..0297a17d1f8 100644 --- a/samples/drivers/soc_flash_nrf/src/main.c +++ b/samples/drivers/soc_flash_nrf/src/main.c @@ -28,10 +28,10 @@ #define FLASH_TEST_OFFSET2 0x41234 #define FLASH_TEST_PAGE_IDX 37 -#if IS_ENABLED(CONFIG_FLASH_HAS_EXPLICIT_ERASE) && \ - IS_ENABLED(CONFIG_FLASH_HAS_NO_EXPLICIT_ERASE) +#if defined(CONFIG_FLASH_HAS_EXPLICIT_ERASE) && \ + defined(CONFIG_FLASH_HAS_NO_EXPLICIT_ERASE) #define FLASH_PE_RUNTIME_CHECK(cond) (cond) -#elif IS_ENABLED(CONFIG_FLASH_HAS_EXPLICIT_ERASE) +#elif defined(CONFIG_FLASH_HAS_EXPLICIT_ERASE) #define FLASH_PE_RUNTIME_CHECK(cond) (true) #else /* Assumed IS_ENABLED(CONFIG_FLASH_HAS_NO_EXPLICIT_ERASE) */ diff --git a/samples/subsys/fs/littlefs/src/main.c b/samples/subsys/fs/littlefs/src/main.c index 7723023013e..b04b998d7d5 100644 --- a/samples/subsys/fs/littlefs/src/main.c +++ b/samples/subsys/fs/littlefs/src/main.c @@ -312,7 +312,7 @@ static int littlefs_mount(struct fs_mount_t *mp) #if defined(CONFIG_DISK_DRIVER_SDMMC) #define DISK_NAME CONFIG_SDMMC_VOLUME_NAME -#elif IS_ENABLED(CONFIG_DISK_DRIVER_MMC) +#elif defined(CONFIG_DISK_DRIVER_MMC) #define DISK_NAME CONFIG_MMC_VOLUME_NAME #else #error "No disk device defined, is your board supported?" diff --git a/samples/subsys/usb/cdc_acm/src/main.c b/samples/subsys/usb/cdc_acm/src/main.c index 4dffe7cee6d..ab1cbdc6a4c 100644 --- a/samples/subsys/usb/cdc_acm/src/main.c +++ b/samples/subsys/usb/cdc_acm/src/main.c @@ -106,7 +106,7 @@ static int enable_usb_device_next(void) return 0; } -#endif /* IS_ENABLED(CONFIG_USB_DEVICE_STACK_NEXT) */ +#endif /* defined(CONFIG_USB_DEVICE_STACK_NEXT) */ static void interrupt_handler(const struct device *dev, void *user_data) { diff --git a/samples/subsys/usb/console/src/main.c b/samples/subsys/usb/console/src/main.c index 538e768614a..bf2230687e1 100644 --- a/samples/subsys/usb/console/src/main.c +++ b/samples/subsys/usb/console/src/main.c @@ -34,7 +34,7 @@ static int enable_usb_device_next(void) return 0; } -#endif /* IS_ENABLED(CONFIG_USB_DEVICE_STACK_NEXT) */ +#endif /* defined(CONFIG_USB_DEVICE_STACK_NEXT) */ int main(void) { diff --git a/samples/subsys/usb/hid-mouse/src/main.c b/samples/subsys/usb/hid-mouse/src/main.c index 28b27877acb..382453bbf8a 100644 --- a/samples/subsys/usb/hid-mouse/src/main.c +++ b/samples/subsys/usb/hid-mouse/src/main.c @@ -118,7 +118,7 @@ static int enable_usb_device_next(void) return 0; } -#endif /* IS_ENABLED(CONFIG_USB_DEVICE_STACK_NEXT) */ +#endif /* defined(CONFIG_USB_DEVICE_STACK_NEXT) */ int main(void) { diff --git a/samples/subsys/usb/mass/src/main.c b/samples/subsys/usb/mass/src/main.c index 733f6f90ea8..d95d91ca74a 100644 --- a/samples/subsys/usb/mass/src/main.c +++ b/samples/subsys/usb/mass/src/main.c @@ -70,7 +70,7 @@ static int enable_usb_device_next(void) return 0; } -#endif /* IS_ENABLED(CONFIG_USB_DEVICE_STACK_NEXT) */ +#endif /* defined(CONFIG_USB_DEVICE_STACK_NEXT) */ static int setup_flash(struct fs_mount_t *mnt) { diff --git a/samples/subsys/usb/uac2_explicit_feedback/src/feedback_nrf53.c b/samples/subsys/usb/uac2_explicit_feedback/src/feedback_nrf53.c index e5f93a846fd..7e949d61211 100644 --- a/samples/subsys/usb/uac2_explicit_feedback/src/feedback_nrf53.c +++ b/samples/subsys/usb/uac2_explicit_feedback/src/feedback_nrf53.c @@ -48,7 +48,7 @@ static const nrfx_timer_t feedback_timer_instance = * the 4 least significant bits (does not use the bits for extra precision). */ #define FEEDBACK_K 10 -#if IS_ENABLED(CONFIG_APP_USE_I2S_LRCLK_EDGES_COUNTER) +#if defined(CONFIG_APP_USE_I2S_LRCLK_EDGES_COUNTER) #define FEEDBACK_P 1 #else #define FEEDBACK_P 5 diff --git a/subsys/bindesc/bindesc_build_time.c b/subsys/bindesc/bindesc_build_time.c index fde98c0f005..e0aeab261d1 100644 --- a/subsys/bindesc/bindesc_build_time.c +++ b/subsys/bindesc/bindesc_build_time.c @@ -10,43 +10,43 @@ /* Include generated header */ #include -#if IS_ENABLED(CONFIG_BINDESC_BUILD_TIME_YEAR) +#if defined(CONFIG_BINDESC_BUILD_TIME_YEAR) BINDESC_UINT_DEFINE(build_time_year, BINDESC_ID_BUILD_TIME_YEAR, BUILD_TIME_YEAR); -#endif /* IS_ENABLED(CONFIG_BINDESC_BUILD_TIME_YEAR) */ +#endif /* defined(CONFIG_BINDESC_BUILD_TIME_YEAR) */ -#if IS_ENABLED(CONFIG_BINDESC_BUILD_TIME_MONTH) +#if defined(CONFIG_BINDESC_BUILD_TIME_MONTH) BINDESC_UINT_DEFINE(build_time_month, BINDESC_ID_BUILD_TIME_MONTH, BUILD_TIME_MONTH); -#endif /* IS_ENABLED(CONFIG_BINDESC_BUILD_TIME_MONTH) */ +#endif /* defined(CONFIG_BINDESC_BUILD_TIME_MONTH) */ -#if IS_ENABLED(CONFIG_BINDESC_BUILD_TIME_DAY) +#if defined(CONFIG_BINDESC_BUILD_TIME_DAY) BINDESC_UINT_DEFINE(build_time_day, BINDESC_ID_BUILD_TIME_DAY, BUILD_TIME_DAY); -#endif /* IS_ENABLED(CONFIG_BINDESC_BUILD_TIME_DAY) */ +#endif /* defined(CONFIG_BINDESC_BUILD_TIME_DAY) */ -#if IS_ENABLED(CONFIG_BINDESC_BUILD_TIME_HOUR) +#if defined(CONFIG_BINDESC_BUILD_TIME_HOUR) BINDESC_UINT_DEFINE(build_time_hour, BINDESC_ID_BUILD_TIME_HOUR, BUILD_TIME_HOUR); -#endif /* IS_ENABLED(CONFIG_BINDESC_BUILD_TIME_HOUR) */ +#endif /* defined(CONFIG_BINDESC_BUILD_TIME_HOUR) */ -#if IS_ENABLED(CONFIG_BINDESC_BUILD_TIME_MINUTE) +#if defined(CONFIG_BINDESC_BUILD_TIME_MINUTE) BINDESC_UINT_DEFINE(build_time_minute, BINDESC_ID_BUILD_TIME_MINUTE, BUILD_TIME_MINUTE); -#endif /* IS_ENABLED(CONFIG_BINDESC_BUILD_TIME_MINUTE) */ +#endif /* defined(CONFIG_BINDESC_BUILD_TIME_MINUTE) */ -#if IS_ENABLED(CONFIG_BINDESC_BUILD_TIME_SECOND) +#if defined(CONFIG_BINDESC_BUILD_TIME_SECOND) BINDESC_UINT_DEFINE(build_time_second, BINDESC_ID_BUILD_TIME_SECOND, BUILD_TIME_SECOND); -#endif /* IS_ENABLED(CONFIG_BINDESC_BUILD_TIME_SECOND) */ +#endif /* defined(CONFIG_BINDESC_BUILD_TIME_SECOND) */ -#if IS_ENABLED(CONFIG_BINDESC_BUILD_TIME_UNIX) +#if defined(CONFIG_BINDESC_BUILD_TIME_UNIX) BINDESC_UINT_DEFINE(build_time_unix, BINDESC_ID_BUILD_TIME_UNIX, BUILD_TIME_UNIX); -#endif /* IS_ENABLED(CONFIG_BINDESC_BUILD_TIME_UNIX) */ +#endif /* defined(CONFIG_BINDESC_BUILD_TIME_UNIX) */ -#if IS_ENABLED(CONFIG_BINDESC_BUILD_DATE_TIME_STRING) +#if defined(CONFIG_BINDESC_BUILD_DATE_TIME_STRING) BINDESC_STR_DEFINE(build_date_time_string, BINDESC_ID_BUILD_DATE_TIME_STRING, BUILD_DATE_TIME_STRING); -#endif /* IS_ENABLED(CONFIG_BINDESC_BUILD_DATE_TIME_STRING) */ +#endif /* defined(CONFIG_BINDESC_BUILD_DATE_TIME_STRING) */ -#if IS_ENABLED(CONFIG_BINDESC_BUILD_DATE_STRING) +#if defined(CONFIG_BINDESC_BUILD_DATE_STRING) BINDESC_STR_DEFINE(build_date_string, BINDESC_ID_BUILD_DATE_STRING, BUILD_DATE_STRING); -#endif /* IS_ENABLED(CONFIG_BINDESC_BUILD_DATE_STRING) */ +#endif /* defined(CONFIG_BINDESC_BUILD_DATE_STRING) */ -#if IS_ENABLED(CONFIG_BINDESC_BUILD_TIME_STRING) +#if defined(CONFIG_BINDESC_BUILD_TIME_STRING) BINDESC_STR_DEFINE(build_time_string, BINDESC_ID_BUILD_TIME_STRING, BUILD_TIME_STRING); -#endif /* IS_ENABLED(CONFIG_BINDESC_BUILD_TIME_STRING) */ +#endif /* defined(CONFIG_BINDESC_BUILD_TIME_STRING) */ diff --git a/subsys/bindesc/bindesc_host_info.c b/subsys/bindesc/bindesc_host_info.c index 6ecc43495d4..56611b94523 100644 --- a/subsys/bindesc/bindesc_host_info.c +++ b/subsys/bindesc/bindesc_host_info.c @@ -7,23 +7,23 @@ #include #include -#if IS_ENABLED(CONFIG_BINDESC_HOST_NAME) +#if defined(CONFIG_BINDESC_HOST_NAME) BINDESC_STR_DEFINE(host_name, BINDESC_ID_HOST_NAME, HOST_NAME); -#endif /* IS_ENABLED(CONFIG_BINDESC_HOST_NAME) */ +#endif /* defined(CONFIG_BINDESC_HOST_NAME) */ -#if IS_ENABLED(CONFIG_BINDESC_C_COMPILER_NAME) +#if defined(CONFIG_BINDESC_C_COMPILER_NAME) BINDESC_STR_DEFINE(c_compiler_name, BINDESC_ID_C_COMPILER_NAME, C_COMPILER_NAME); -#endif /* IS_ENABLED(CONFIG_BINDESC_C_COMPILER_NAME) */ +#endif /* defined(CONFIG_BINDESC_C_COMPILER_NAME) */ -#if IS_ENABLED(CONFIG_BINDESC_C_COMPILER_VERSION) +#if defined(CONFIG_BINDESC_C_COMPILER_VERSION) BINDESC_STR_DEFINE(c_compiler_version, BINDESC_ID_C_COMPILER_VERSION, C_COMPILER_VERSION); -#endif /* IS_ENABLED(CONFIG_BINDESC_C_COMPILER_VERSION) */ +#endif /* defined(CONFIG_BINDESC_C_COMPILER_VERSION) */ -#if IS_ENABLED(CONFIG_BINDESC_CXX_COMPILER_NAME) +#if defined(CONFIG_BINDESC_CXX_COMPILER_NAME) BINDESC_STR_DEFINE(cxx_compiler_name, BINDESC_ID_CXX_COMPILER_NAME, CXX_COMPILER_NAME); -#endif /* IS_ENABLED(CONFIG_BINDESC_CXX_COMPILER_NAME) */ +#endif /* defined(CONFIG_BINDESC_CXX_COMPILER_NAME) */ -#if IS_ENABLED(CONFIG_BINDESC_CXX_COMPILER_VERSION) +#if defined(CONFIG_BINDESC_CXX_COMPILER_VERSION) BINDESC_STR_DEFINE(cxx_compiler_version, BINDESC_ID_CXX_COMPILER_VERSION, CXX_COMPILER_VERSION); -#endif /* IS_ENABLED(CONFIG_BINDESC_CXX_COMPILER_VERSION) */ +#endif /* defined(CONFIG_BINDESC_CXX_COMPILER_VERSION) */ diff --git a/subsys/bindesc/bindesc_version.c b/subsys/bindesc/bindesc_version.c index 76111ca17bb..ff8030585c2 100644 --- a/subsys/bindesc/bindesc_version.c +++ b/subsys/bindesc/bindesc_version.c @@ -8,57 +8,57 @@ #include #include -#if IS_ENABLED(CONFIG_BINDESC_KERNEL_VERSION_STRING) +#if defined(CONFIG_BINDESC_KERNEL_VERSION_STRING) BINDESC_STR_DEFINE(kernel_version_string, BINDESC_ID_KERNEL_VERSION_STRING, KERNEL_VERSION_STRING); -#endif /* IS_ENABLED(CONFIG_BINDESC_KERNEL_VERSION_STRING) */ +#endif /* defined(CONFIG_BINDESC_KERNEL_VERSION_STRING) */ -#if IS_ENABLED(CONFIG_BINDESC_KERNEL_VERSION_MAJOR) +#if defined(CONFIG_BINDESC_KERNEL_VERSION_MAJOR) BINDESC_UINT_DEFINE(kernel_version_major, BINDESC_ID_KERNEL_VERSION_MAJOR, KERNEL_VERSION_MAJOR); -#endif /* IS_ENABLED(CONFIG_BINDESC_KERNEL_VERSION_MAJOR) */ +#endif /* defined(CONFIG_BINDESC_KERNEL_VERSION_MAJOR) */ -#if IS_ENABLED(CONFIG_BINDESC_KERNEL_VERSION_MINOR) +#if defined(CONFIG_BINDESC_KERNEL_VERSION_MINOR) BINDESC_UINT_DEFINE(kernel_version_minor, BINDESC_ID_KERNEL_VERSION_MINOR, KERNEL_VERSION_MINOR); -#endif /* IS_ENABLED(CONFIG_BINDESC_KERNEL_VERSION_MINOR) */ +#endif /* defined(CONFIG_BINDESC_KERNEL_VERSION_MINOR) */ -#if IS_ENABLED(CONFIG_BINDESC_KERNEL_VERSION_PATCHLEVEL) +#if defined(CONFIG_BINDESC_KERNEL_VERSION_PATCHLEVEL) BINDESC_UINT_DEFINE(kernel_version_patchlevel, BINDESC_ID_KERNEL_VERSION_PATCHLEVEL, KERNEL_PATCHLEVEL); -#endif /* IS_ENABLED(CONFIG_BINDESC_KERNEL_VERSION_PATCHLEVEL) */ +#endif /* defined(CONFIG_BINDESC_KERNEL_VERSION_PATCHLEVEL) */ -#if IS_ENABLED(CONFIG_BINDESC_KERNEL_VERSION_NUMBER) +#if defined(CONFIG_BINDESC_KERNEL_VERSION_NUMBER) BINDESC_UINT_DEFINE(kernel_version_number, BINDESC_ID_KERNEL_VERSION_NUMBER, KERNEL_VERSION_NUMBER); -#endif /* IS_ENABLED(CONFIG_BINDESC_KERNEL_VERSION_NUMBER) */ +#endif /* defined(CONFIG_BINDESC_KERNEL_VERSION_NUMBER) */ -#if IS_ENABLED(HAS_APP_VERSION) +#if defined(HAS_APP_VERSION) #include -#if IS_ENABLED(CONFIG_BINDESC_APP_VERSION_STRING) +#if defined(CONFIG_BINDESC_APP_VERSION_STRING) BINDESC_STR_DEFINE(app_version_string, BINDESC_ID_APP_VERSION_STRING, APP_VERSION_STRING); -#endif /* IS_ENABLED(CONFIG_BINDESC_APP_VERSION_STRING) */ +#endif /* defined(CONFIG_BINDESC_APP_VERSION_STRING) */ -#if IS_ENABLED(CONFIG_BINDESC_APP_VERSION_MAJOR) +#if defined(CONFIG_BINDESC_APP_VERSION_MAJOR) BINDESC_UINT_DEFINE(app_version_major, BINDESC_ID_APP_VERSION_MAJOR, APP_VERSION_MAJOR); -#endif /* IS_ENABLED(CONFIG_BINDESC_APP_VERSION_MAJOR) */ +#endif /* defined(CONFIG_BINDESC_APP_VERSION_MAJOR) */ -#if IS_ENABLED(CONFIG_BINDESC_APP_VERSION_MINOR) +#if defined(CONFIG_BINDESC_APP_VERSION_MINOR) BINDESC_UINT_DEFINE(app_version_minor, BINDESC_ID_APP_VERSION_MINOR, APP_VERSION_MINOR); -#endif /* IS_ENABLED(CONFIG_BINDESC_APP_VERSION_MINOR) */ +#endif /* defined(CONFIG_BINDESC_APP_VERSION_MINOR) */ -#if IS_ENABLED(CONFIG_BINDESC_APP_VERSION_PATCHLEVEL) +#if defined(CONFIG_BINDESC_APP_VERSION_PATCHLEVEL) BINDESC_UINT_DEFINE(app_version_patchlevel, BINDESC_ID_APP_VERSION_PATCHLEVEL, APP_PATCHLEVEL); -#endif /* IS_ENABLED(CONFIG_BINDESC_APP_VERSION_PATCHLEVEL) */ +#endif /* defined(CONFIG_BINDESC_APP_VERSION_PATCHLEVEL) */ -#if IS_ENABLED(CONFIG_BINDESC_APP_VERSION_NUMBER) +#if defined(CONFIG_BINDESC_APP_VERSION_NUMBER) BINDESC_UINT_DEFINE(app_version_number, BINDESC_ID_APP_VERSION_NUMBER, APP_VERSION_NUMBER); -#endif /* IS_ENABLED(CONFIG_BINDESC_APP_VERSION_NUMBER) */ +#endif /* defined(CONFIG_BINDESC_APP_VERSION_NUMBER) */ -#endif /* IS_ENABLED(HAS_APP_VERSION) */ +#endif /* defined(HAS_APP_VERSION) */ diff --git a/subsys/bluetooth/audio/tbs.c b/subsys/bluetooth/audio/tbs.c index aa5be134f2d..1a33985cf2b 100644 --- a/subsys/bluetooth/audio/tbs.c +++ b/subsys/bluetooth/audio/tbs.c @@ -84,7 +84,7 @@ struct gtbs_service_inst { #else #define READ_BUF_SIZE (CONFIG_BT_TBS_MAX_CALLS * \ sizeof(struct bt_tbs_current_call_item)) -#endif /* IS_ENABLED(CONFIG_BT_GTBS) */ +#endif /* defined(CONFIG_BT_GTBS) */ NET_BUF_SIMPLE_DEFINE_STATIC(read_buf, READ_BUF_SIZE); static struct tbs_service_inst svc_insts[CONFIG_BT_TBS_BEARER_COUNT]; diff --git a/subsys/bluetooth/audio/tbs_client.c b/subsys/bluetooth/audio/tbs_client.c index 2a291813288..71c34f781fc 100644 --- a/subsys/bluetooth/audio/tbs_client.c +++ b/subsys/bluetooth/audio/tbs_client.c @@ -63,7 +63,7 @@ struct bt_tbs_server_inst { #endif /* CONFIG_BT_TBS_CLIENT_TBS */ #if defined(CONFIG_BT_TBS_CLIENT_GTBS) struct bt_tbs_instance gtbs_inst; -#endif /* IS_ENABLED(CONFIG_BT_TBS_CLIENT_GTBS) */ +#endif /* defined(CONFIG_BT_TBS_CLIENT_GTBS) */ struct bt_gatt_discover_params discover_params; struct bt_tbs_instance *current_inst; }; @@ -1748,7 +1748,7 @@ static int primary_discover_gtbs(struct bt_conn *conn) return bt_gatt_discover(conn, params); } -#endif /* IS_ENABLED(CONFIG_BT_TBS_CLIENT_GTBS) */ +#endif /* defined(CONFIG_BT_TBS_CLIENT_GTBS) */ /****************************** PUBLIC API ******************************/ diff --git a/subsys/bluetooth/mesh/access.c b/subsys/bluetooth/mesh/access.c index 6358f1656fb..e095d9babdb 100644 --- a/subsys/bluetooth/mesh/access.c +++ b/subsys/bluetooth/mesh/access.c @@ -111,10 +111,10 @@ static const struct { uint8_t page; } comp_data_pages[] = { { "bt/mesh/cmp/0", 0, }, -#if IS_ENABLED(CONFIG_BT_MESH_COMP_PAGE_1) +#if defined(CONFIG_BT_MESH_COMP_PAGE_1) { "bt/mesh/cmp/1", 1, }, #endif -#if IS_ENABLED(CONFIG_BT_MESH_COMP_PAGE_2) +#if defined(CONFIG_BT_MESH_COMP_PAGE_2) { "bt/mesh/cmp/2", 2, }, #endif }; @@ -2617,7 +2617,7 @@ void bt_mesh_comp_data_clear(void) int bt_mesh_models_metadata_change_prepare(void) { -#if IS_ENABLED(CONFIG_BT_MESH_LARGE_COMP_DATA_SRV) +#if defined(CONFIG_BT_MESH_LARGE_COMP_DATA_SRV) return bt_mesh_models_metadata_store(); #else return -ENOTSUP; diff --git a/subsys/bluetooth/mesh/cfg.c b/subsys/bluetooth/mesh/cfg.c index 4fef60d5c8d..155c2e616d5 100644 --- a/subsys/bluetooth/mesh/cfg.c +++ b/subsys/bluetooth/mesh/cfg.c @@ -137,7 +137,7 @@ uint8_t bt_mesh_priv_beacon_update_interval_get(void) int bt_mesh_od_priv_proxy_get(void) { -#if IS_ENABLED(CONFIG_BT_MESH_OD_PRIV_PROXY_SRV) +#if defined(CONFIG_BT_MESH_OD_PRIV_PROXY_SRV) return bt_mesh.on_demand_state; #else return -ENOTSUP; @@ -146,7 +146,7 @@ int bt_mesh_od_priv_proxy_get(void) int bt_mesh_od_priv_proxy_set(uint8_t on_demand_proxy) { -#if !IS_ENABLED(CONFIG_BT_MESH_OD_PRIV_PROXY_SRV) +#if !defined(CONFIG_BT_MESH_OD_PRIV_PROXY_SRV) return -ENOTSUP; #else diff --git a/subsys/bluetooth/mesh/prov.h b/subsys/bluetooth/mesh/prov.h index a88710639db..00bd85952e0 100644 --- a/subsys/bluetooth/mesh/prov.h +++ b/subsys/bluetooth/mesh/prov.h @@ -78,7 +78,7 @@ NET_BUF_SIMPLE_DEFINE(name, PROV_BEARER_BUF_HEADROOM + PDU_OP_LEN + len + \ PROV_BEARER_BUF_TAILROOM) -#if IS_ENABLED(CONFIG_BT_MESH_ECDH_P256_HMAC_SHA256_AES_CCM) +#if defined(CONFIG_BT_MESH_ECDH_P256_HMAC_SHA256_AES_CCM) #define PROV_AUTH_MAX_LEN 32 #else #define PROV_AUTH_MAX_LEN 16 diff --git a/subsys/bluetooth/services/ots/ots_l2cap.c b/subsys/bluetooth/services/ots/ots_l2cap.c index ad169c5aee0..aa540361257 100644 --- a/subsys/bluetooth/services/ots/ots_l2cap.c +++ b/subsys/bluetooth/services/ots/ots_l2cap.c @@ -24,7 +24,7 @@ */ #if defined(CONFIG_BT_OTS) LOG_MODULE_DECLARE(bt_ots, CONFIG_BT_OTS_LOG_LEVEL); -#elif IS_ENABLED(CONFIG_BT_OTS_CLIENT) +#elif defined(CONFIG_BT_OTS_CLIENT) LOG_MODULE_REGISTER(bt_ots, CONFIG_BT_OTS_LOG_LEVEL); #endif diff --git a/subsys/fs/fcb/fcb_elem_info.c b/subsys/fs/fcb/fcb_elem_info.c index 3bb6031ec21..1cb9185740d 100644 --- a/subsys/fs/fcb/fcb_elem_info.c +++ b/subsys/fs/fcb/fcb_elem_info.c @@ -66,7 +66,7 @@ fcb_elem_crc8(struct fcb *_fcb, struct fcb_entry *loc, uint8_t *c8p) return 0; } -#if IS_ENABLED(CONFIG_FCB_ALLOW_FIXED_ENDMARKER) +#if defined(CONFIG_FCB_ALLOW_FIXED_ENDMARKER) /* Given the offset in flash sector, calculate the FCB entry data offset and size, and set * the fixed endmarker. */ @@ -97,7 +97,7 @@ fcb_elem_endmarker_fixed(struct fcb *_fcb, struct fcb_entry *loc, uint8_t *em) *em = FCB_FIXED_ENDMARKER; return 0; } -#endif /* IS_ENABLED(CONFIG_FCB_ALLOW_FIXED_ENDMARKER) */ +#endif /* defined(CONFIG_FCB_ALLOW_FIXED_ENDMARKER) */ /* Given the offset in flash sector, calculate the FCB entry data offset and size, and calculate * the expected endmarker. @@ -105,11 +105,11 @@ fcb_elem_endmarker_fixed(struct fcb *_fcb, struct fcb_entry *loc, uint8_t *em) int fcb_elem_endmarker(struct fcb *_fcb, struct fcb_entry *loc, uint8_t *em) { -#if IS_ENABLED(CONFIG_FCB_ALLOW_FIXED_ENDMARKER) +#if defined(CONFIG_FCB_ALLOW_FIXED_ENDMARKER) if (_fcb->f_flags & FCB_FLAGS_CRC_DISABLED) { return fcb_elem_endmarker_fixed(_fcb, loc, em); } -#endif /* IS_ENABLED(CONFIG_FCB_ALLOW_FIXED_ENDMARKER) */ +#endif /* defined(CONFIG_FCB_ALLOW_FIXED_ENDMARKER) */ return fcb_elem_crc8(_fcb, loc, em); } diff --git a/subsys/ipc/ipc_service/lib/icmsg.c b/subsys/ipc/ipc_service/lib/icmsg.c index 61fa03689f4..37fbc30d89e 100644 --- a/subsys/ipc/ipc_service/lib/icmsg.c +++ b/subsys/ipc/ipc_service/lib/icmsg.c @@ -19,7 +19,7 @@ static const uint8_t magic[] = {0x45, 0x6d, 0x31, 0x6c, 0x31, 0x4b, 0x30, 0x72, 0x6e, 0x33, 0x6c, 0x69, 0x34}; -#if IS_ENABLED(CONFIG_IPC_SERVICE_BACKEND_ICMSG_WQ_ENABLE) +#if defined(CONFIG_IPC_SERVICE_BACKEND_ICMSG_WQ_ENABLE) static K_THREAD_STACK_DEFINE(icmsg_stack, CONFIG_IPC_SERVICE_BACKEND_ICMSG_WQ_STACK_SIZE); static struct k_work_q icmsg_workq; static struct k_work_q *const workq = &icmsg_workq; @@ -301,7 +301,7 @@ int icmsg_send(const struct icmsg_config_t *conf, return sent_bytes; } -#if IS_ENABLED(CONFIG_IPC_SERVICE_BACKEND_ICMSG_WQ_ENABLE) +#if defined(CONFIG_IPC_SERVICE_BACKEND_ICMSG_WQ_ENABLE) static int work_q_init(void) { diff --git a/subsys/mgmt/mcumgr/grp/os_mgmt/src/os_mgmt.c b/subsys/mgmt/mcumgr/grp/os_mgmt/src/os_mgmt.c index 4d87ea997cf..ad46a538b4a 100644 --- a/subsys/mgmt/mcumgr/grp/os_mgmt/src/os_mgmt.c +++ b/subsys/mgmt/mcumgr/grp/os_mgmt/src/os_mgmt.c @@ -423,19 +423,19 @@ os_mgmt_mcumgr_params(struct smp_streamer *ctxt) #if defined(CONFIG_MCUMGR_GRP_OS_BOOTLOADER_INFO) -#if IS_ENABLED(CONFIG_MCUBOOT_BOOTLOADER_MODE_SINGLE_APP) +#if defined(CONFIG_MCUBOOT_BOOTLOADER_MODE_SINGLE_APP) #define BOOTLOADER_MODE MCUBOOT_MODE_SINGLE_SLOT -#elif IS_ENABLED(CONFIG_MCUBOOT_BOOTLOADER_MODE_SWAP_SCRATCH) +#elif defined(CONFIG_MCUBOOT_BOOTLOADER_MODE_SWAP_SCRATCH) #define BOOTLOADER_MODE MCUBOOT_MODE_SWAP_USING_SCRATCH -#elif IS_ENABLED(CONFIG_MCUBOOT_BOOTLOADER_MODE_OVERWRITE_ONLY) +#elif defined(CONFIG_MCUBOOT_BOOTLOADER_MODE_OVERWRITE_ONLY) #define BOOTLOADER_MODE MCUBOOT_MODE_UPGRADE_ONLY -#elif IS_ENABLED(CONFIG_MCUBOOT_BOOTLOADER_MODE_SWAP_WITHOUT_SCRATCH) +#elif defined(CONFIG_MCUBOOT_BOOTLOADER_MODE_SWAP_WITHOUT_SCRATCH) #define BOOTLOADER_MODE MCUBOOT_MODE_SWAP_USING_MOVE -#elif IS_ENABLED(CONFIG_MCUBOOT_BOOTLOADER_MODE_DIRECT_XIP) +#elif defined(CONFIG_MCUBOOT_BOOTLOADER_MODE_DIRECT_XIP) #define BOOTLOADER_MODE MCUBOOT_MODE_DIRECT_XIP -#elif IS_ENABLED(CONFIG_MCUBOOT_BOOTLOADER_MODE_DIRECT_XIP_WITH_REVERT) +#elif defined(CONFIG_MCUBOOT_BOOTLOADER_MODE_DIRECT_XIP_WITH_REVERT) #define BOOTLOADER_MODE MCUBOOT_MODE_DIRECT_XIP_WITH_REVERT -#elif IS_ENABLED(CONFIG_MCUBOOT_BOOTLOADER_MODE_FIRMWARE_UPDATER) +#elif defined(CONFIG_MCUBOOT_BOOTLOADER_MODE_FIRMWARE_UPDATER) #define BOOTLOADER_MODE MCUBOOT_MODE_FIRMWARE_LOADER #else #define BOOTLOADER_MODE -1 diff --git a/subsys/mgmt/mcumgr/mgmt/src/mgmt.c b/subsys/mgmt/mcumgr/mgmt/src/mgmt.c index adb2c8e4bcb..0495d3fb4d4 100644 --- a/subsys/mgmt/mcumgr/mgmt/src/mgmt.c +++ b/subsys/mgmt/mcumgr/mgmt/src/mgmt.c @@ -103,7 +103,7 @@ mgmt_get_handler(const struct mgmt_group *group, uint16_t command_id) return &group->mg_handlers[command_id]; } -#if IS_ENABLED(CONFIG_MCUMGR_SMP_SUPPORT_ORIGINAL_PROTOCOL) +#if defined(CONFIG_MCUMGR_SMP_SUPPORT_ORIGINAL_PROTOCOL) smp_translate_error_fn mgmt_find_error_translation_function(uint16_t group_id) { struct mgmt_group *group = NULL; diff --git a/subsys/net/ip/net_pkt.c b/subsys/net/ip/net_pkt.c index 7bfa4f8a2a7..d0ee06487d6 100644 --- a/subsys/net/ip/net_pkt.c +++ b/subsys/net/ip/net_pkt.c @@ -1246,7 +1246,7 @@ int net_pkt_alloc_buffer_raw(struct net_pkt *pkt, size_t size, net_pkt_append_buffer(pkt, buf); -#if IS_ENABLED(CONFIG_NET_BUF_FIXED_DATA_SIZE) +#if defined(CONFIG_NET_BUF_FIXED_DATA_SIZE) /* net_buf allocators shrink the buffer size to the requested size. * We don't want this behavior here, so restore the real size of the * last fragment. diff --git a/subsys/net/lib/lwm2m/lwm2m_registry.c b/subsys/net/lib/lwm2m/lwm2m_registry.c index bd4906144ac..ce59e488bf2 100644 --- a/subsys/net/lib/lwm2m/lwm2m_registry.c +++ b/subsys/net/lib/lwm2m/lwm2m_registry.c @@ -106,7 +106,7 @@ void lwm2m_register_obj(struct lwm2m_engine_obj *obj) k_mutex_lock(®istry_lock, K_FOREVER); #if defined(CONFIG_LWM2M_ACCESS_CONTROL_ENABLE) /* If bootstrap, then bootstrap server should create the ac obj instances */ -#if !IS_ENABLED(CONFIG_LWM2M_RD_CLIENT_SUPPORT_BOOTSTRAP) +#if !defined(CONFIG_LWM2M_RD_CLIENT_SUPPORT_BOOTSTRAP) int server_obj_inst_id = lwm2m_server_short_id_to_inst(CONFIG_LWM2M_SERVER_DEFAULT_SSID); access_control_add_obj(obj->obj_id, server_obj_inst_id); @@ -169,7 +169,7 @@ static void engine_register_obj_inst(struct lwm2m_engine_obj_inst *obj_inst) { #if defined(CONFIG_LWM2M_ACCESS_CONTROL_ENABLE) /* If bootstrap, then bootstrap server should create the ac obj instances */ -#if !IS_ENABLED(CONFIG_LWM2M_RD_CLIENT_SUPPORT_BOOTSTRAP) +#if !defined(CONFIG_LWM2M_RD_CLIENT_SUPPORT_BOOTSTRAP) int server_obj_inst_id = lwm2m_server_short_id_to_inst(CONFIG_LWM2M_SERVER_DEFAULT_SSID); access_control_add(obj_inst->obj->obj_id, obj_inst->obj_inst_id, server_obj_inst_id); diff --git a/subsys/shell/backends/shell_rtt.c b/subsys/shell/backends/shell_rtt.c index 4a874ba9ce8..c8b10cb2567 100644 --- a/subsys/shell/backends/shell_rtt.c +++ b/subsys/shell/backends/shell_rtt.c @@ -15,7 +15,7 @@ #define RTT_UNLOCK() \ COND_CODE_0(CONFIG_SHELL_BACKEND_RTT_BUFFER, (SEGGER_RTT_UNLOCK()), ()) -#if IS_ENABLED(CONFIG_LOG_BACKEND_RTT) +#if defined(CONFIG_LOG_BACKEND_RTT) BUILD_ASSERT(!(CONFIG_SHELL_BACKEND_RTT_BUFFER == CONFIG_LOG_BACKEND_RTT_BUFFER), "Conflicting log RTT backend enabled on the same channel"); #endif diff --git a/subsys/storage/stream/stream_flash.c b/subsys/storage/stream/stream_flash.c index b9bd63df411..0ff0c4578ff 100644 --- a/subsys/storage/stream/stream_flash.c +++ b/subsys/storage/stream/stream_flash.c @@ -76,10 +76,10 @@ static int settings_direct_loader(const char *key, size_t len, int stream_flash_erase_page(struct stream_flash_ctx *ctx, off_t off) { -#if IS_ENABLED(CONFIG_FLASH_HAS_EXPLICIT_ERASE) +#if defined(CONFIG_FLASH_HAS_EXPLICIT_ERASE) int rc; struct flash_pages_info page; -#if IS_ENABLED(CONFIG_FLASH_HAS_NO_EXPLICIT_ERASE) +#if defined(CONFIG_FLASH_HAS_NO_EXPLICIT_ERASE) /* There are both types of devices */ const struct flash_parameters *fparams = flash_get_parameters(ctx->fdev); diff --git a/tests/bsim/bluetooth/mesh/src/test_beacon.c b/tests/bsim/bluetooth/mesh/src/test_beacon.c index 04e89671a5f..e4b77fcbb75 100644 --- a/tests/bsim/bluetooth/mesh/src/test_beacon.c +++ b/tests/bsim/bluetooth/mesh/src/test_beacon.c @@ -1532,7 +1532,7 @@ static void test_tx_priv_beacon_cache(void) PASS(); } -#if IS_ENABLED(CONFIG_BT_MESH_GATT_PROXY) +#if defined(CONFIG_BT_MESH_GATT_PROXY) static uint8_t test_net_key_3[16] = {0x12, 0x54, 0xab, 0x1e}; diff --git a/tests/drivers/disk/disk_access/src/main.c b/tests/drivers/disk/disk_access/src/main.c index 4e0348c0a0d..8e26cc0356e 100644 --- a/tests/drivers/disk/disk_access/src/main.c +++ b/tests/drivers/disk/disk_access/src/main.c @@ -22,13 +22,13 @@ #if defined(CONFIG_DISK_DRIVER_SDMMC) #define DISK_NAME_PHYS CONFIG_SDMMC_VOLUME_NAME -#elif IS_ENABLED(CONFIG_DISK_DRIVER_MMC) +#elif defined(CONFIG_DISK_DRIVER_MMC) #define DISK_NAME_PHYS CONFIG_MMC_VOLUME_NAME -#elif IS_ENABLED(CONFIG_DISK_DRIVER_FLASH) +#elif defined(CONFIG_DISK_DRIVER_FLASH) #define DISK_NAME_PHYS "NAND" -#elif IS_ENABLED(CONFIG_NVME) +#elif defined(CONFIG_NVME) #define DISK_NAME_PHYS "nvme0n0" -#elif IS_ENABLED(CONFIG_DISK_DRIVER_RAM) +#elif defined(CONFIG_DISK_DRIVER_RAM) /* Since ramdisk is enabled by default on e.g. qemu boards, it needs to be checked last to not * override other backends. */ diff --git a/tests/drivers/disk/disk_performance/src/main.c b/tests/drivers/disk/disk_performance/src/main.c index 7d3a67b7a51..0042cde68ee 100644 --- a/tests/drivers/disk/disk_performance/src/main.c +++ b/tests/drivers/disk/disk_performance/src/main.c @@ -14,9 +14,9 @@ #if defined(CONFIG_DISK_DRIVER_SDMMC) #define DISK_NAME CONFIG_SDMMC_VOLUME_NAME -#elif IS_ENABLED(CONFIG_DISK_DRIVER_MMC) +#elif defined(CONFIG_DISK_DRIVER_MMC) #define DISK_NAME CONFIG_MMC_VOLUME_NAME -#elif IS_ENABLED(CONFIG_NVME) +#elif defined(CONFIG_NVME) #define DISK_NAME "nvme0n0" #else #error "No disk device defined, is your board supported?" diff --git a/tests/drivers/flash/common/src/main.c b/tests/drivers/flash/common/src/main.c index 4eeb4920993..048542bf31b 100644 --- a/tests/drivers/flash/common/src/main.c +++ b/tests/drivers/flash/common/src/main.c @@ -44,8 +44,8 @@ #define EXPECTED_SIZE 512 -#if !IS_ENABLED(CONFIG_FLASH_HAS_EXPLICIT_ERASE) && \ - !IS_ENABLED(CONFIG_FLASH_HAS_NO_EXPLICIT_ERASE) +#if !defined(CONFIG_FLASH_HAS_EXPLICIT_ERASE) && \ + !defined(CONFIG_FLASH_HAS_NO_EXPLICIT_ERASE) #error There is no flash device enabled or it is missing Kconfig options #endif diff --git a/tests/lib/gui/lvgl/src/main.c b/tests/lib/gui/lvgl/src/main.c index 6475e63ddd0..8ee495d936a 100644 --- a/tests/lib/gui/lvgl/src/main.c +++ b/tests/lib/gui/lvgl/src/main.c @@ -19,7 +19,7 @@ #ifdef CONFIG_DISK_DRIVER_SDMMC #define DISK_NAME CONFIG_SDMMC_VOLUME_NAME -#elif IS_ENABLED(CONFIG_DISK_DRIVER_MMC) +#elif defined(CONFIG_DISK_DRIVER_MMC) #define DISK_NAME CONFIG_MMC_VOLUME_NAME #else #error "No disk device defined, is your board supported?" diff --git a/tests/subsys/pm/device_driver_init/src/main.c b/tests/subsys/pm/device_driver_init/src/main.c index d01a83d3ca6..014e02a5940 100644 --- a/tests/subsys/pm/device_driver_init/src/main.c +++ b/tests/subsys/pm/device_driver_init/src/main.c @@ -29,7 +29,7 @@ ZTEST(device_driver_init, test_device_driver_init) { -#if IS_ENABLED(CONFIG_PM_DEVICE_RUNTIME) +#if defined(CONFIG_PM_DEVICE_RUNTIME) enum pm_device_state state; int rc; state = -1; diff --git a/tests/subsys/settings/functional/src/settings_basic_test.c b/tests/subsys/settings/functional/src/settings_basic_test.c index 5798605a5a7..f77c87db71d 100644 --- a/tests/subsys/settings/functional/src/settings_basic_test.c +++ b/tests/subsys/settings/functional/src/settings_basic_test.c @@ -21,7 +21,7 @@ LOG_MODULE_REGISTER(settings_basic_test); #if DT_HAS_CHOSEN(zephyr_settings_partition) #define TEST_FLASH_AREA_ID DT_FIXED_PARTITION_ID(DT_CHOSEN(zephyr_settings_partition)) #endif -#elif IS_ENABLED(CONFIG_SETTINGS_FILE) +#elif defined(CONFIG_SETTINGS_FILE) #include #include #else @@ -38,7 +38,7 @@ LOG_MODULE_REGISTER(settings_basic_test); */ ZTEST(settings_functional, test_clear_settings) { -#if !IS_ENABLED(CONFIG_SETTINGS_FILE) +#if !defined(CONFIG_SETTINGS_FILE) const struct flash_area *fap; int rc; diff --git a/tests/subsys/storage/stream/stream_flash/src/main.c b/tests/subsys/storage/stream/stream_flash/src/main.c index 7b4627101c2..58fbb6e35bb 100644 --- a/tests/subsys/storage/stream/stream_flash/src/main.c +++ b/tests/subsys/storage/stream/stream_flash/src/main.c @@ -72,9 +72,9 @@ int stream_flash_callback(uint8_t *buf, size_t len, size_t offset) static void erase_flash(void) { -#if IS_ENABLED(CONFIG_FLASH_HAS_EXPLICIT_ERASE) +#if defined(CONFIG_FLASH_HAS_EXPLICIT_ERASE) int rc; -#if IS_ENABLED(CONFIG_FLASH_HAS_NO_EXPLICIT_ERASE) +#if defined(CONFIG_FLASH_HAS_NO_EXPLICIT_ERASE) const struct flash_parameters *fparam = flash_get_parameters(fdev); if (!(flash_params_get_erase_cap(fparam) & FLASH_ERASE_C_EXPLICIT)) {