diff --git a/boards/arm/nrf9160dk_nrf52840/board.c b/boards/arm/nrf9160dk_nrf52840/board.c index efb4c59bb2b..6a7834d620e 100644 --- a/boards/arm/nrf9160dk_nrf52840/board.c +++ b/boards/arm/nrf9160dk_nrf52840/board.c @@ -39,7 +39,7 @@ struct switch_cfg { gpio_pin_t pin; gpio_dt_flags_t flags; bool on; -#if IS_ENABLED(CONFIG_LOG) +#if defined(CONFIG_LOG) uint8_t port; bool info; const char *name; @@ -175,7 +175,7 @@ static int init(const struct device *dev) flags |= (cfg->on ? GPIO_OUTPUT_ACTIVE : GPIO_OUTPUT_INACTIVE); rc = gpio_pin_configure(cfg->gpio, cfg->pin, flags); -#if IS_ENABLED(CONFIG_LOG) +#if defined(CONFIG_LOG) LOG_DBG("Configuring P%d.%02d with flags: 0x%08x", cfg->port, cfg->pin, flags); if (rc) { diff --git a/drivers/console/gsm_mux.h b/drivers/console/gsm_mux.h index d9e5c8fa6ec..fce8a104bd7 100644 --- a/drivers/console/gsm_mux.h +++ b/drivers/console/gsm_mux.h @@ -6,7 +6,7 @@ #define DLCI_CONTROL 0 -#if IS_ENABLED(CONFIG_GSM_MUX) +#if defined(CONFIG_GSM_MUX) #define DLCI_AT CONFIG_GSM_MUX_DLCI_AT #define DLCI_PPP CONFIG_GSM_MUX_DLCI_PPP #else diff --git a/drivers/ethernet/eth_e1000.c b/drivers/ethernet/eth_e1000.c index c78e1d865a4..0ec98f2c55d 100644 --- a/drivers/ethernet/eth_e1000.c +++ b/drivers/ethernet/eth_e1000.c @@ -89,10 +89,10 @@ static struct net_if *get_iface(struct e1000_dev *ctx, uint16_t vlan_tag) static enum ethernet_hw_caps e1000_caps(const struct device *dev) { return -#if IS_ENABLED(CONFIG_NET_VLAN) +#if defined(CONFIG_NET_VLAN) ETHERNET_HW_VLAN | #endif -#if IS_ENABLED(CONFIG_ETH_E1000_PTP_CLOCK) +#if defined(CONFIG_ETH_E1000_PTP_CLOCK) ETHERNET_PTP | #endif ETHERNET_LINK_10BASE_T | ETHERNET_LINK_100BASE_T | diff --git a/drivers/ethernet/eth_mcux.c b/drivers/ethernet/eth_mcux.c index ad51ec98774..1047f31c683 100644 --- a/drivers/ethernet/eth_mcux.c +++ b/drivers/ethernet/eth_mcux.c @@ -37,7 +37,7 @@ LOG_MODULE_REGISTER(LOG_MODULE_NAME); #include #endif -#if IS_ENABLED(CONFIG_NET_DSA) +#if defined(CONFIG_NET_DSA) #include #endif @@ -868,7 +868,7 @@ static int eth_rx(struct eth_context *context) #endif /* CONFIG_PTP_CLOCK_MCUX */ iface = get_iface(context, vlan_tag); -#if IS_ENABLED(CONFIG_NET_DSA) +#if defined(CONFIG_NET_DSA) iface = dsa_net_recv(iface, &pkt); #endif if (net_recv_data(iface, pkt) < 0) { @@ -1200,7 +1200,7 @@ static void eth_iface_init(struct net_if *iface) context->iface = iface; } -#if IS_ENABLED(CONFIG_NET_DSA) +#if defined(CONFIG_NET_DSA) dsa_register_master_tx(iface, ð_tx); #endif ethernet_init(iface); @@ -1217,7 +1217,7 @@ static enum ethernet_hw_caps eth_mcux_get_capabilities(const struct device *dev) #if defined(CONFIG_PTP_CLOCK_MCUX) ETHERNET_PTP | #endif -#if IS_ENABLED(CONFIG_NET_DSA) +#if defined(CONFIG_NET_DSA) ETHERNET_DSA_MASTER_PORT | #endif #if defined(CONFIG_ETH_MCUX_HW_ACCELERATION) @@ -1272,7 +1272,7 @@ static const struct ethernet_api api_funcs = { #endif .get_capabilities = eth_mcux_get_capabilities, .set_config = eth_mcux_set_config, -#if IS_ENABLED(CONFIG_NET_DSA) +#if defined(CONFIG_NET_DSA) .send = dsa_tx, #else .send = eth_tx, diff --git a/drivers/ethernet/eth_native_posix.c b/drivers/ethernet/eth_native_posix.c index a526879f9d7..8f4743993ad 100644 --- a/drivers/ethernet/eth_native_posix.c +++ b/drivers/ethernet/eth_native_posix.c @@ -436,7 +436,7 @@ static void eth_iface_init(struct net_if *iface) ctx->init_done = true; -#if IS_ENABLED(CONFIG_ETH_NATIVE_POSIX_RANDOM_MAC) +#if defined(CONFIG_ETH_NATIVE_POSIX_RANDOM_MAC) /* 00-00-5E-00-53-xx Documentation RFC 7042 */ gen_random_mac(ctx->mac_addr, 0x00, 0x00, 0x5E); @@ -650,7 +650,7 @@ LISTIFY(CONFIG_ETH_NATIVE_POSIX_INTERFACE_COUNT, DEFINE_ETH_DEVICE, (;), _); #if defined(CONFIG_ETH_NATIVE_POSIX_PTP_CLOCK) -#if IS_ENABLED(CONFIG_NET_GPTP) +#if defined(CONFIG_NET_GPTP) BUILD_ASSERT( \ CONFIG_ETH_NATIVE_POSIX_INTERFACE_COUNT == CONFIG_NET_GPTP_NUM_PORTS, \ "Number of network interfaces must match gPTP port count"); diff --git a/drivers/flash/soc_flash_nrf.c b/drivers/flash/soc_flash_nrf.c index 2b81f5e9c99..e7f5fb27baf 100644 --- a/drivers/flash/soc_flash_nrf.c +++ b/drivers/flash/soc_flash_nrf.c @@ -54,7 +54,7 @@ static int erase_synchronously(uint32_t addr, uint32_t size); #endif /* !CONFIG_SOC_FLASH_NRF_RADIO_SYNC_NONE */ static const struct flash_parameters flash_nrf_parameters = { -#if IS_ENABLED(CONFIG_SOC_FLASH_NRF_EMULATE_ONE_BYTE_WRITE_ACCESS) +#if defined(CONFIG_SOC_FLASH_NRF_EMULATE_ONE_BYTE_WRITE_ACCESS) .write_block_size = 1, #else .write_block_size = 4, @@ -408,7 +408,7 @@ static int write_op(void *context) nrf_flash_sync_get_timestamp_begin(); } #endif /* !CONFIG_SOC_FLASH_NRF_RADIO_SYNC_NONE */ -#if IS_ENABLED(CONFIG_SOC_FLASH_NRF_EMULATE_ONE_BYTE_WRITE_ACCESS) +#if defined(CONFIG_SOC_FLASH_NRF_EMULATE_ONE_BYTE_WRITE_ACCESS) /* If not aligned, write unaligned beginning */ if (!is_aligned_32(w_ctx->flash_addr)) { uint32_t count = sizeof(uint32_t) - (w_ctx->flash_addr & 0x3); @@ -460,7 +460,7 @@ static int write_op(void *context) } #endif /* !CONFIG_SOC_FLASH_NRF_RADIO_SYNC_NONE */ } -#if IS_ENABLED(CONFIG_SOC_FLASH_NRF_EMULATE_ONE_BYTE_WRITE_ACCESS) +#if defined(CONFIG_SOC_FLASH_NRF_EMULATE_ONE_BYTE_WRITE_ACCESS) /* Write remaining unaligned data */ if (w_ctx->len) { if (SUSPEND_POFWARN()) { diff --git a/drivers/flash/spi_flash_at45.c b/drivers/flash/spi_flash_at45.c index 978b03a32e1..9ac27c67f7a 100644 --- a/drivers/flash/spi_flash_at45.c +++ b/drivers/flash/spi_flash_at45.c @@ -69,7 +69,7 @@ struct spi_flash_at45_config { #if ANY_INST_HAS_WP_GPIOS const struct gpio_dt_spec *wp; #endif -#if IS_ENABLED(CONFIG_FLASH_PAGE_LAYOUT) +#if defined(CONFIG_FLASH_PAGE_LAYOUT) struct flash_pages_layout pages_layout; #endif uint32_t chip_size; @@ -500,7 +500,7 @@ static int spi_flash_at45_erase(const struct device *dev, off_t offset, return err; } -#if IS_ENABLED(CONFIG_FLASH_PAGE_LAYOUT) +#if defined(CONFIG_FLASH_PAGE_LAYOUT) static void spi_flash_at45_pages_layout(const struct device *dev, const struct flash_pages_layout **layout, size_t *layout_size) @@ -594,7 +594,7 @@ static int spi_flash_at45_init(const struct device *dev) return err; } -#if IS_ENABLED(CONFIG_PM_DEVICE) +#if defined(CONFIG_PM_DEVICE) static int spi_flash_at45_pm_action(const struct device *dev, enum pm_device_action action) { @@ -636,7 +636,7 @@ static const struct flash_driver_api spi_flash_at45_api = { .write = spi_flash_at45_write, .erase = spi_flash_at45_erase, .get_parameters = flash_at45_get_parameters, -#if IS_ENABLED(CONFIG_FLASH_PAGE_LAYOUT) +#if defined(CONFIG_FLASH_PAGE_LAYOUT) .page_layout = spi_flash_at45_pages_layout, #endif }; diff --git a/drivers/ieee802154/ieee802154_nrf5.c b/drivers/ieee802154/ieee802154_nrf5.c index 9c5755d67db..e2953fbb525 100644 --- a/drivers/ieee802154/ieee802154_nrf5.c +++ b/drivers/ieee802154/ieee802154_nrf5.c @@ -475,7 +475,7 @@ static bool nrf5_tx_csma_ca(struct net_pkt *pkt, uint8_t *payload) } #endif -#if IS_ENABLED(CONFIG_NET_PKT_TXTIME) +#if defined(CONFIG_NET_PKT_TXTIME) /** * @brief Convert 32-bit target time to absolute 64-bit target time. */ @@ -601,7 +601,7 @@ static int nrf5_tx(const struct device *dev, ret = nrf5_tx_csma_ca(pkt, nrf5_radio->tx_psdu); break; #endif -#if IS_ENABLED(CONFIG_NET_PKT_TXTIME) +#if defined(CONFIG_NET_PKT_TXTIME) case IEEE802154_TX_MODE_TXTIME: case IEEE802154_TX_MODE_TXTIME_CCA: __ASSERT_NO_MSG(pkt); @@ -998,7 +998,7 @@ void nrf_802154_received_timestamp_raw(uint8_t *data, int8_t power, uint8_t lqi, nrf5_data.rx_frames[i].rssi = power; nrf5_data.rx_frames[i].lqi = lqi; -#if IS_ENABLED(CONFIG_NET_PKT_TIMESTAMP) +#if defined(CONFIG_NET_PKT_TIMESTAMP) nrf5_data.rx_frames[i].time = nrf_802154_mhr_timestamp_get(time, data[0]); #endif @@ -1085,7 +1085,7 @@ void nrf_802154_transmitted_raw(uint8_t *frame, nrf5_data.ack_frame.rssi = metadata->data.transmitted.power; nrf5_data.ack_frame.lqi = metadata->data.transmitted.lqi; -#if IS_ENABLED(CONFIG_NET_PKT_TIMESTAMP) +#if defined(CONFIG_NET_PKT_TIMESTAMP) nrf5_data.ack_frame.time = nrf_802154_mhr_timestamp_get( metadata->data.transmitted.time, nrf5_data.ack_frame.psdu[0]); diff --git a/drivers/ipm/ipm_imx.c b/drivers/ipm/ipm_imx.c index 9279d724569..f1205a4ae89 100644 --- a/drivers/ipm/ipm_imx.c +++ b/drivers/ipm/ipm_imx.c @@ -11,7 +11,7 @@ #include #include #include -#if IS_ENABLED(CONFIG_IPM_IMX_REV2) +#if defined(CONFIG_IPM_IMX_REV2) #define DT_DRV_COMPAT nxp_imx_mu_rev2 #include "fsl_mu.h" #else @@ -37,7 +37,7 @@ struct imx_mu_data { void *user_data; }; -#if IS_ENABLED(CONFIG_IPM_IMX_REV2) +#if defined(CONFIG_IPM_IMX_REV2) /*! * @brief Check RX full status. * @@ -126,7 +126,7 @@ static void imx_mu_isr(const struct device *dev) } if (all_registers_full) { for (i = 0; i < IMX_IPM_DATA_REGS; i++) { -#if IS_ENABLED(CONFIG_IPM_IMX_REV2) +#if defined(CONFIG_IPM_IMX_REV2) data32[i] = MU_ReceiveMsg(base, (id * IMX_IPM_DATA_REGS) + i); #else @@ -181,7 +181,7 @@ static int imx_mu_ipm_send(const struct device *dev, int wait, uint32_t id, /* Actual message is passing using 32 bits registers */ memcpy(data32, data, size); -#if IS_ENABLED(CONFIG_IPM_IMX_REV2) +#if defined(CONFIG_IPM_IMX_REV2) if (wait) { for (i = 0; i < IMX_IPM_DATA_REGS; i++) { MU_SendMsgNonBlocking(base, id * IMX_IPM_DATA_REGS + i, @@ -248,7 +248,7 @@ static int imx_mu_ipm_set_enabled(const struct device *dev, int enable) { const struct imx_mu_config *config = dev->config; MU_Type *base = MU(config); -#if IS_ENABLED(CONFIG_IPM_IMX_REV2) +#if defined(CONFIG_IPM_IMX_REV2) #if CONFIG_IPM_IMX_MAX_DATA_SIZE_4 if (enable) { MU_EnableInterrupts(base, kMU_Rx0FullInterruptEnable); diff --git a/drivers/ipm/ipm_nrfx_ipc.c b/drivers/ipm/ipm_nrfx_ipc.c index aca1f11bac7..2dfbf758237 100644 --- a/drivers/ipm/ipm_nrfx_ipc.c +++ b/drivers/ipm/ipm_nrfx_ipc.c @@ -26,7 +26,7 @@ static struct ipm_nrf_data nrfx_ipm_data; static void gipm_init(void); static void gipm_send(uint32_t id); -#if IS_ENABLED(CONFIG_IPM_NRF_SINGLE_INSTANCE) +#if defined(CONFIG_IPM_NRF_SINGLE_INSTANCE) static void nrfx_ipc_handler(uint8_t event_idx, void *p_context) { @@ -231,7 +231,7 @@ LISTIFY(NRFX_IPC_ID_MAX_VALUE, VIPM_DEVICE, (;), _); static void gipm_init(void) { /* Init IPC */ -#if IS_ENABLED(CONFIG_IPM_NRF_SINGLE_INSTANCE) +#if defined(CONFIG_IPM_NRF_SINGLE_INSTANCE) nrfx_ipc_init(0, nrfx_ipc_handler, (void *)&nrfx_ipm_data); #else nrfx_ipc_init(0, vipm_dispatcher, (void *)&nrfx_ipm_data); diff --git a/drivers/net/ppp.c b/drivers/net/ppp.c index ede797d5cb4..31d58acb106 100644 --- a/drivers/net/ppp.c +++ b/drivers/net/ppp.c @@ -1023,7 +1023,7 @@ static int ppp_start(const struct device *dev) * configuration is enabled, and use that. If none are enabled, * then use our own config. */ -#if IS_ENABLED(CONFIG_GSM_MUX) +#if defined(CONFIG_GSM_MUX) const struct device *mux; mux = uart_mux_find(CONFIG_GSM_MUX_DLCI_PPP); diff --git a/drivers/serial/uart_pl011.c b/drivers/serial/uart_pl011.c index cf05e66c393..7f345c66d22 100644 --- a/drivers/serial/uart_pl011.c +++ b/drivers/serial/uart_pl011.c @@ -15,7 +15,7 @@ #include #include #include -#if IS_ENABLED(CONFIG_PINCTRL) +#if defined(CONFIG_PINCTRL) #include #endif @@ -51,7 +51,7 @@ struct pl011_regs { struct pl011_config { DEVICE_MMIO_ROM; uint32_t sys_clk_freq; -#if IS_ENABLED(CONFIG_PINCTRL) +#if defined(CONFIG_PINCTRL) const struct pinctrl_dev_config *pincfg; #endif #ifdef CONFIG_UART_INTERRUPT_DRIVEN @@ -395,7 +395,7 @@ static int pl011_init(const struct device *dev) * virtualization software). */ if (!data->sbsa) { -#if IS_ENABLED(CONFIG_PINCTRL) +#if defined(CONFIG_PINCTRL) ret = pinctrl_apply_state(config->pincfg, PINCTRL_STATE_DEFAULT); if (ret) { return ret; @@ -442,7 +442,7 @@ static int pl011_init(const struct device *dev) return 0; } -#if IS_ENABLED(CONFIG_PINCTRL) +#if defined(CONFIG_PINCTRL) #define PINCTRL_DEFINE(n) PINCTRL_DT_INST_DEFINE(n); #define PINCTRL_INIT(n) .pincfg = PINCTRL_DT_INST_DEV_CONFIG_GET(n), #else diff --git a/drivers/spi/spi_pl022.c b/drivers/spi/spi_pl022.c index 51c277e5057..3408ca07c84 100644 --- a/drivers/spi/spi_pl022.c +++ b/drivers/spi/spi_pl022.c @@ -11,7 +11,7 @@ #include #include #include -#if IS_ENABLED(CONFIG_PINCTRL) +#if defined(CONFIG_PINCTRL) #include #endif @@ -245,10 +245,10 @@ LOG_MODULE_REGISTER(spi_pl022); struct spi_pl022_cfg { const uint32_t reg; const uint32_t pclk; -#if IS_ENABLED(CONFIG_PINCTRL) +#if defined(CONFIG_PINCTRL) const struct pinctrl_dev_config *pincfg; #endif -#if IS_ENABLED(CONFIG_SPI_PL022_INTERRUPT) +#if defined(CONFIG_SPI_PL022_INTERRUPT) void (*irq_config)(const struct device *port); #endif }; @@ -350,7 +350,7 @@ static int spi_pl022_configure(const struct device *dev, SSP_WRITE_REG(SSP_CR0(cfg->reg), cr0); SSP_WRITE_REG(SSP_CR1(cfg->reg), cr1); -#if IS_ENABLED(CONFIG_SPI_PL022_INTERRUPT) +#if defined(CONFIG_SPI_PL022_INTERRUPT) SSP_WRITE_REG(SSP_IMSC(cfg->reg), SSP_IMSC_MASK_RORIM | SSP_IMSC_MASK_RTIM | SSP_IMSC_MASK_RXIM); #endif @@ -365,7 +365,7 @@ static inline bool spi_pl022_transfer_ongoing(struct spi_pl022_data *data) return spi_context_tx_on(&data->ctx) || spi_context_rx_on(&data->ctx); } -#if IS_ENABLED(CONFIG_SPI_PL022_INTERRUPT) +#if defined(CONFIG_SPI_PL022_INTERRUPT) static void spi_pl022_async_xfer(const struct device *dev) { @@ -537,7 +537,7 @@ static int spi_pl022_transceive_impl(const struct device *dev, spi_context_cs_control(ctx, true); -#if IS_ENABLED(CONFIG_SPI_PL022_INTERRUPT) +#if defined(CONFIG_SPI_PL022_INTERRUPT) spi_pl022_start_async_xfer(dev); ret = spi_context_wait_for_completion(ctx); #else @@ -570,7 +570,7 @@ static int spi_pl022_transceive(const struct device *dev, return spi_pl022_transceive_impl(dev, config, tx_bufs, rx_bufs, NULL, NULL); } -#if IS_ENABLED(CONFIG_SPI_ASYNC) +#if defined(CONFIG_SPI_ASYNC) static int spi_pl022_transceive_async(const struct device *dev, const struct spi_config *config, @@ -596,7 +596,7 @@ static int spi_pl022_release(const struct device *dev, static struct spi_driver_api spi_pl022_api = { .transceive = spi_pl022_transceive, -#if IS_ENABLED(CONFIG_SPI_ASYNC) +#if defined(CONFIG_SPI_ASYNC) .transceive_async = spi_pl022_transceive_async, #endif .release = spi_pl022_release @@ -613,7 +613,7 @@ static int spi_pl022_init(const struct device *dev) struct spi_pl022_data *data = dev->data; int ret; -#if IS_ENABLED(CONFIG_PINCTRL) +#if defined(CONFIG_PINCTRL) const struct spi_pl022_cfg *cfg = dev->config; ret = pinctrl_apply_state(cfg->pincfg, PINCTRL_STATE_DEFAULT); @@ -623,7 +623,7 @@ static int spi_pl022_init(const struct device *dev) } #endif -#if IS_ENABLED(CONFIG_SPI_PL022_INTERRUPT) +#if defined(CONFIG_SPI_PL022_INTERRUPT) cfg->irq_config(dev); #endif @@ -645,7 +645,7 @@ static int spi_pl022_init(const struct device *dev) return 0; } -#if IS_ENABLED(CONFIG_PINCTRL) +#if defined(CONFIG_PINCTRL) #define PINCTRL_DEFINE(n) PINCTRL_DT_INST_DEFINE(n); #define PINCTRL_INIT(n) .pincfg = PINCTRL_DT_INST_DEV_CONFIG_GET(n), #else @@ -653,7 +653,7 @@ static int spi_pl022_init(const struct device *dev) #define PINCTRL_INIT(n) #endif /* CONFIG_PINCTRL */ -#if IS_ENABLED(CONFIG_SPI_PL022_INTERRUPT) +#if defined(CONFIG_SPI_PL022_INTERRUPT) #define DECLARE_IRQ_CONFIGURE(idx) \ static void spi_pl022_irq_config_##idx(const struct device *dev) \ { \ diff --git a/drivers/usb/udc/udc_common.c b/drivers/usb/udc/udc_common.c index 75a3e43bb5b..c9866281bac 100644 --- a/drivers/usb/udc/udc_common.c +++ b/drivers/usb/udc/udc_common.c @@ -12,7 +12,7 @@ #include "udc_common.h" #include -#if IS_ENABLED(CONFIG_UDC_DRIVER_LOG_LEVEL) +#if defined(CONFIG_UDC_DRIVER_LOG_LEVEL) #define UDC_COMMON_LOG_LEVEL CONFIG_UDC_DRIVER_LOG_LEVEL #else #define UDC_COMMON_LOG_LEVEL LOG_LEVEL_NONE @@ -1091,7 +1091,7 @@ void udc_ctrl_update_stage(const struct device *dev, data->stage = next_stage; } -#if IS_ENABLED(CONFIG_UDC_WORKQUEUE) +#if defined(CONFIG_UDC_WORKQUEUE) K_KERNEL_STACK_DEFINE(udc_work_q_stack, CONFIG_UDC_WORKQUEUE_STACK_SIZE); struct k_work_q udc_work_q; diff --git a/drivers/usb/udc/udc_common.h b/drivers/usb/udc/udc_common.h index b21e7587ba5..fd8703b2cdd 100644 --- a/drivers/usb/udc/udc_common.h +++ b/drivers/usb/udc/udc_common.h @@ -458,7 +458,7 @@ int udc_ctrl_submit_status(const struct device *dev, void udc_ctrl_update_stage(const struct device *dev, struct net_buf *const buf); -#if IS_ENABLED(CONFIG_UDC_WORKQUEUE) +#if defined(CONFIG_UDC_WORKQUEUE) extern struct k_work_q udc_work_q; static inline struct k_work_q *udc_get_work_q(void) diff --git a/include/zephyr/bluetooth/audio/bap.h b/include/zephyr/bluetooth/audio/bap.h index 61f4daf72d8..135e6c529d9 100644 --- a/include/zephyr/bluetooth/audio/bap.h +++ b/include/zephyr/bluetooth/audio/bap.h @@ -12,7 +12,7 @@ #include #include -#if IS_ENABLED(CONFIG_BT_BAP_SCAN_DELEGATOR) +#if defined(CONFIG_BT_BAP_SCAN_DELEGATOR) #define BT_BAP_SCAN_DELEGATOR_MAX_METADATA_LEN CONFIG_BT_BAP_SCAN_DELEGATOR_MAX_METADATA_LEN #define BT_BAP_SCAN_DELEGATOR_MAX_SUBGROUPS CONFIG_BT_BAP_SCAN_DELEGATOR_MAX_SUBGROUPS #else diff --git a/modules/openthread/platform/radio.c b/modules/openthread/platform/radio.c index 35e261d4285..c627efb75b1 100644 --- a/modules/openthread/platform/radio.c +++ b/modules/openthread/platform/radio.c @@ -48,7 +48,7 @@ LOG_MODULE_REGISTER(LOG_MODULE_NAME, CONFIG_OPENTHREAD_L2_LOG_LEVEL); #define FRAME_TYPE_MASK 0x07 #define FRAME_TYPE_ACK 0x02 -#if IS_ENABLED(CONFIG_NET_TC_THREAD_COOPERATIVE) +#if defined(CONFIG_NET_TC_THREAD_COOPERATIVE) #define OT_WORKER_PRIORITY K_PRIO_COOP(CONFIG_OPENTHREAD_THREAD_PRIORITY) #else #define OT_WORKER_PRIORITY K_PRIO_PREEMPT(CONFIG_OPENTHREAD_THREAD_PRIORITY) diff --git a/samples/drivers/spi_flash_at45/src/main.c b/samples/drivers/spi_flash_at45/src/main.c index 186ce480722..234e29cb381 100644 --- a/samples/drivers/spi_flash_at45/src/main.c +++ b/samples/drivers/spi_flash_at45/src/main.c @@ -147,7 +147,7 @@ void main(void) printk("OK\n"); -#if IS_ENABLED(CONFIG_PM_DEVICE) +#if defined(CONFIG_PM_DEVICE) printk("Putting the flash device into suspended state... "); err = pm_device_action_run(flash_dev, PM_DEVICE_ACTION_SUSPEND); if (err != 0) { diff --git a/samples/net/cloud/tagoio_http_post/src/sockets.c b/samples/net/cloud/tagoio_http_post/src/sockets.c index b7b278c0331..e7bd79d8506 100644 --- a/samples/net/cloud/tagoio_http_post/src/sockets.c +++ b/samples/net/cloud/tagoio_http_post/src/sockets.c @@ -16,7 +16,7 @@ LOG_MODULE_DECLARE(tagoio_http_post, CONFIG_TAGOIO_HTTP_POST_LOG_LEVEL); #include "sockets.h" -#if IS_ENABLED(CONFIG_TAGOIO_MANUAL_SERVER) +#if defined(CONFIG_TAGOIO_MANUAL_SERVER) #define TAGOIO_SERVER CONFIG_TAGOIO_API_SERVER_IP #else #define TAGOIO_SERVER "api.tago.io" diff --git a/samples/net/mqtt_publisher/src/main.c b/samples/net/mqtt_publisher/src/main.c index b2ae8d9942c..771df48b42d 100644 --- a/samples/net/mqtt_publisher/src/main.c +++ b/samples/net/mqtt_publisher/src/main.c @@ -501,7 +501,7 @@ static int start_app(void) #if defined(CONFIG_USERSPACE) #define STACK_SIZE 2048 -#if IS_ENABLED(CONFIG_NET_TC_THREAD_COOPERATIVE) +#if defined(CONFIG_NET_TC_THREAD_COOPERATIVE) #define THREAD_PRIORITY K_PRIO_COOP(CONFIG_NUM_COOP_PRIORITIES - 1) #else #define THREAD_PRIORITY K_PRIO_PREEMPT(8) diff --git a/samples/net/sockets/dumb_http_server_mt/src/main.c b/samples/net/sockets/dumb_http_server_mt/src/main.c index 963cfcb0b91..bff0e9cd20c 100644 --- a/samples/net/sockets/dumb_http_server_mt/src/main.c +++ b/samples/net/sockets/dumb_http_server_mt/src/main.c @@ -36,7 +36,7 @@ static const unsigned char private_key[] = { #else #define STACK_SIZE 1024 #endif -#if IS_ENABLED(CONFIG_NET_TC_THREAD_COOPERATIVE) +#if defined(CONFIG_NET_TC_THREAD_COOPERATIVE) #define THREAD_PRIORITY K_PRIO_COOP(CONFIG_NUM_COOP_PRIORITIES - 1) #else #define THREAD_PRIORITY K_PRIO_PREEMPT(8) diff --git a/samples/net/sockets/echo_client/src/common.h b/samples/net/sockets/echo_client/src/common.h index 7e31fdc9934..83f5ec27e46 100644 --- a/samples/net/sockets/echo_client/src/common.h +++ b/samples/net/sockets/echo_client/src/common.h @@ -21,7 +21,7 @@ extern struct k_mem_domain app_domain; #define APP_DMEM #endif -#if IS_ENABLED(CONFIG_NET_TC_THREAD_PREEMPTIVE) +#if defined(CONFIG_NET_TC_THREAD_PREEMPTIVE) #define THREAD_PRIORITY K_PRIO_PREEMPT(8) #else #define THREAD_PRIORITY K_PRIO_COOP(CONFIG_NUM_COOP_PRIORITIES - 1) diff --git a/samples/net/sockets/echo_server/src/common.h b/samples/net/sockets/echo_server/src/common.h index 923f0a6676c..08d8f00edba 100644 --- a/samples/net/sockets/echo_server/src/common.h +++ b/samples/net/sockets/echo_server/src/common.h @@ -14,7 +14,7 @@ #define STACK_SIZE 2048 #endif -#if IS_ENABLED(CONFIG_NET_TC_THREAD_COOPERATIVE) +#if defined(CONFIG_NET_TC_THREAD_COOPERATIVE) #define THREAD_PRIORITY K_PRIO_COOP(CONFIG_NUM_COOP_PRIORITIES - 1) #else #define THREAD_PRIORITY K_PRIO_PREEMPT(8) diff --git a/samples/net/sockets/net_mgmt/src/main.c b/samples/net/sockets/net_mgmt/src/main.c index 62759b8da90..df2eed300ff 100644 --- a/samples/net/sockets/net_mgmt/src/main.c +++ b/samples/net/sockets/net_mgmt/src/main.c @@ -16,7 +16,7 @@ LOG_MODULE_REGISTER(net_mgmt_sock_sample, LOG_LEVEL_DBG); #define MAX_BUF_LEN 64 #define STACK_SIZE 1024 -#if IS_ENABLED(CONFIG_NET_TC_THREAD_COOPERATIVE) +#if defined(CONFIG_NET_TC_THREAD_COOPERATIVE) #define THREAD_PRIORITY K_PRIO_COOP(CONFIG_NUM_COOP_PRIORITIES - 1) #else #define THREAD_PRIORITY K_PRIO_PREEMPT(8) diff --git a/samples/net/sockets/packet/src/packet.c b/samples/net/sockets/packet/src/packet.c index 48e189f9e3e..7075d2b9f7c 100644 --- a/samples/net/sockets/packet/src/packet.c +++ b/samples/net/sockets/packet/src/packet.c @@ -16,7 +16,7 @@ LOG_MODULE_REGISTER(net_pkt_sock_sample, LOG_LEVEL_DBG); #include #define STACK_SIZE 1024 -#if IS_ENABLED(CONFIG_NET_TC_THREAD_COOPERATIVE) +#if defined(CONFIG_NET_TC_THREAD_COOPERATIVE) #define THREAD_PRIORITY K_PRIO_COOP(CONFIG_NUM_COOP_PRIORITIES - 1) #else #define THREAD_PRIORITY K_PRIO_PREEMPT(8) diff --git a/samples/net/syslog_net/src/main.c b/samples/net/syslog_net/src/main.c index 9fb41bad506..46eb812db8b 100644 --- a/samples/net/syslog_net/src/main.c +++ b/samples/net/syslog_net/src/main.c @@ -18,7 +18,7 @@ BUILD_ASSERT(IS_ENABLED(CONFIG_LOG_BACKEND_NET), "syslog backend not enabled"); #define SLEEP_BETWEEN_PRINTS 3 -#if IS_ENABLED(CONFIG_LOG_BACKEND_NET) +#if defined(CONFIG_LOG_BACKEND_NET) extern const struct log_backend *log_backend_net_get(void); #endif diff --git a/samples/net/wpan_serial/src/main.c b/samples/net/wpan_serial/src/main.c index 73fc5d9a70d..05c8adcb80c 100644 --- a/samples/net/wpan_serial/src/main.c +++ b/samples/net/wpan_serial/src/main.c @@ -24,7 +24,7 @@ LOG_MODULE_REGISTER(wpan_serial, CONFIG_USB_DEVICE_LOG_LEVEL); #include #include -#if IS_ENABLED(CONFIG_NET_TC_THREAD_COOPERATIVE) +#if defined(CONFIG_NET_TC_THREAD_COOPERATIVE) #define THREAD_PRIORITY K_PRIO_COOP(CONFIG_NUM_COOP_PRIORITIES - 1) #else #define THREAD_PRIORITY K_PRIO_PREEMPT(8) diff --git a/samples/net/wpanusb/src/wpanusb.c b/samples/net/wpanusb/src/wpanusb.c index 987e1660ca6..fa44eacdfa8 100644 --- a/samples/net/wpanusb/src/wpanusb.c +++ b/samples/net/wpanusb/src/wpanusb.c @@ -18,7 +18,7 @@ LOG_MODULE_REGISTER(wpanusb); #include "wpanusb.h" -#if IS_ENABLED(CONFIG_NET_TC_THREAD_COOPERATIVE) +#if defined(CONFIG_NET_TC_THREAD_COOPERATIVE) #define THREAD_PRIORITY K_PRIO_COOP(CONFIG_NUM_COOP_PRIORITIES - 1) #else #define THREAD_PRIORITY K_PRIO_PREEMPT(8) @@ -28,7 +28,7 @@ LOG_MODULE_REGISTER(wpanusb); #define WPANUSB_PROTOCOL 0 /* Max packet size for endpoints */ -#if IS_ENABLED(CONFIG_USB_DC_HAS_HS_SUPPORT) +#if defined(CONFIG_USB_DC_HAS_HS_SUPPORT) #define WPANUSB_BULK_EP_MPS 512 #else #define WPANUSB_BULK_EP_MPS 64 diff --git a/samples/subsys/settings/src/main.c b/samples/subsys/settings/src/main.c index 0edddbdd5c5..38729396da5 100644 --- a/samples/subsys/settings/src/main.c +++ b/samples/subsys/settings/src/main.c @@ -12,7 +12,7 @@ #include #include -#if IS_ENABLED(CONFIG_SETTINGS_FILE) +#if defined(CONFIG_SETTINGS_FILE) #include #include #endif @@ -422,7 +422,7 @@ static void example_initialization(void) { int rc; -#if IS_ENABLED(CONFIG_SETTINGS_FILE) +#if defined(CONFIG_SETTINGS_FILE) FS_LITTLEFS_DECLARE_DEFAULT_CONFIG(cstorage); /* mounting info */ diff --git a/samples/subsys/usb/cdc_acm/src/main.c b/samples/subsys/usb/cdc_acm/src/main.c index 3c64a667999..f8f44ddf1cf 100644 --- a/samples/subsys/usb/cdc_acm/src/main.c +++ b/samples/subsys/usb/cdc_acm/src/main.c @@ -29,7 +29,7 @@ uint8_t ring_buffer[RING_BUF_SIZE]; struct ring_buf ringbuf; -#if IS_ENABLED(CONFIG_USB_DEVICE_STACK_NEXT) +#if defined(CONFIG_USB_DEVICE_STACK_NEXT) USBD_CONFIGURATION_DEFINE(config_1, USB_SCD_SELF_POWERED, 200); @@ -162,7 +162,7 @@ void main(void) return; } -#if IS_ENABLED(CONFIG_USB_DEVICE_STACK_NEXT) +#if defined(CONFIG_USB_DEVICE_STACK_NEXT) ret = enable_usb_device_next(); #else ret = usb_enable(NULL); diff --git a/samples/subsys/usb/console/src/main.c b/samples/subsys/usb/console/src/main.c index 6df51e2dbe8..1cd1b7fe9fe 100644 --- a/samples/subsys/usb/console/src/main.c +++ b/samples/subsys/usb/console/src/main.c @@ -13,7 +13,7 @@ BUILD_ASSERT(DT_NODE_HAS_COMPAT(DT_CHOSEN(zephyr_console), zephyr_cdc_acm_uart), "Console device is not ACM CDC UART device"); -#if IS_ENABLED(CONFIG_USB_DEVICE_STACK_NEXT) +#if defined(CONFIG_USB_DEVICE_STACK_NEXT) USBD_CONFIGURATION_DEFINE(config_1, USB_SCD_SELF_POWERED, 200); @@ -80,7 +80,7 @@ void main(void) const struct device *const dev = DEVICE_DT_GET(DT_CHOSEN(zephyr_console)); uint32_t dtr = 0; -#if IS_ENABLED(CONFIG_USB_DEVICE_STACK_NEXT) +#if defined(CONFIG_USB_DEVICE_STACK_NEXT) if (enable_usb_device_next()) { return; } diff --git a/samples/subsys/usb/webusb/src/webusb.c b/samples/subsys/usb/webusb/src/webusb.c index 13cbfd07bd2..51258908163 100644 --- a/samples/subsys/usb/webusb/src/webusb.c +++ b/samples/subsys/usb/webusb/src/webusb.c @@ -23,7 +23,7 @@ LOG_MODULE_REGISTER(webusb); #include "webusb.h" /* Max packet size for Bulk endpoints */ -#if IS_ENABLED(CONFIG_USB_DC_HAS_HS_SUPPORT) +#if defined(CONFIG_USB_DC_HAS_HS_SUPPORT) #define WEBUSB_BULK_EP_MPS 512 #else #define WEBUSB_BULK_EP_MPS 64 diff --git a/soc/arm/nordic_nrf/validate_enabled_instances.c b/soc/arm/nordic_nrf/validate_enabled_instances.c index 02f585a79c8..f3fe6110ed3 100644 --- a/soc/arm/nordic_nrf/validate_enabled_instances.c +++ b/soc/arm/nordic_nrf/validate_enabled_instances.c @@ -51,7 +51,7 @@ BUILD_ASSERT(CHECK(1), MSG(1)); BUILD_ASSERT(CHECK(2), MSG(2)); BUILD_ASSERT(CHECK(3), MSG(3)); -#if IS_ENABLED(CONFIG_SOC_NRF52811) +#if defined(CONFIG_SOC_NRF52811) BUILD_ASSERT(!(SPI_ENABLED(1) && I2C_ENABLED(0)), "Only one of the following peripherals can be enabled: " "SPI1, SPIM1, SPIS1, TWI0, TWIM0, TWIS0. " diff --git a/subsys/bluetooth/audio/csip_internal.h b/subsys/bluetooth/audio/csip_internal.h index 2f402197a1c..deccab6815d 100644 --- a/subsys/bluetooth/audio/csip_internal.h +++ b/subsys/bluetooth/audio/csip_internal.h @@ -25,7 +25,7 @@ struct csip_pending_notifications { * the array containing this struct, if the security manager overwrites * the oldest keys, we also overwrite the oldest entry */ -#if IS_ENABLED(CONFIG_BT_KEYS_OVERWRITE_OLDEST) +#if defined(CONFIG_BT_KEYS_OVERWRITE_OLDEST) uint32_t age; #endif /* CONFIG_BT_KEYS_OVERWRITE_OLDEST */ }; diff --git a/subsys/bluetooth/audio/csip_set_member.c b/subsys/bluetooth/audio/csip_set_member.c index b39b69a202b..c6a00361f12 100644 --- a/subsys/bluetooth/audio/csip_set_member.c +++ b/subsys/bluetooth/audio/csip_set_member.c @@ -48,7 +48,7 @@ struct bt_csip_set_member_svc_inst { bt_addr_le_t lock_client_addr; struct bt_gatt_service *service_p; struct csip_pending_notifications pend_notify[CONFIG_BT_MAX_PAIRED]; -#if IS_ENABLED(CONFIG_BT_KEYS_OVERWRITE_OLDEST) +#if defined(CONFIG_BT_KEYS_OVERWRITE_OLDEST) uint32_t age_counter; #endif /* CONFIG_BT_KEYS_OVERWRITE_OLDEST */ }; @@ -538,7 +538,7 @@ static void handle_csip_auth_complete(struct bt_csip_set_member_svc_inst *svc_in if (pend_notify->active && bt_addr_le_eq(bt_conn_get_dst(conn), &pend_notify->addr)) { -#if IS_ENABLED(CONFIG_BT_KEYS_OVERWRITE_OLDEST) +#if defined(CONFIG_BT_KEYS_OVERWRITE_OLDEST) pend_notify->age = svc_inst->age_counter++; #endif /* CONFIG_BT_KEYS_OVERWRITE_OLDEST */ return; @@ -555,14 +555,14 @@ static void handle_csip_auth_complete(struct bt_csip_set_member_svc_inst *svc_in bt_addr_le_copy(&pend_notify->addr, bt_conn_get_dst(conn)); pend_notify->active = true; -#if IS_ENABLED(CONFIG_BT_KEYS_OVERWRITE_OLDEST) +#if defined(CONFIG_BT_KEYS_OVERWRITE_OLDEST) pend_notify->age = svc_inst->age_counter++; #endif /* CONFIG_BT_KEYS_OVERWRITE_OLDEST */ return; } } -#if IS_ENABLED(CONFIG_BT_KEYS_OVERWRITE_OLDEST) +#if defined(CONFIG_BT_KEYS_OVERWRITE_OLDEST) struct csip_pending_notifications *oldest; oldest = &svc_inst->pend_notify[0]; diff --git a/subsys/bluetooth/audio/tbs.c b/subsys/bluetooth/audio/tbs.c index 339c350b189..584fad1036f 100644 --- a/subsys/bluetooth/audio/tbs.c +++ b/subsys/bluetooth/audio/tbs.c @@ -92,7 +92,7 @@ struct gtbs_service_inst { const struct bt_gatt_service_static *service_p; }; -#if IS_ENABLED(CONFIG_BT_GTBS) +#if defined(CONFIG_BT_GTBS) #define READ_BUF_SIZE (CONFIG_BT_TBS_MAX_CALLS * \ sizeof(struct bt_tbs_current_call_item) * \ CONFIG_BT_TBS_BEARER_COUNT) diff --git a/subsys/bluetooth/audio/tbs_client.c b/subsys/bluetooth/audio/tbs_client.c index 9512025f337..0d03a9ed8fc 100644 --- a/subsys/bluetooth/audio/tbs_client.c +++ b/subsys/bluetooth/audio/tbs_client.c @@ -28,7 +28,7 @@ LOG_MODULE_REGISTER(bt_tbs_client, CONFIG_BT_TBS_CLIENT_LOG_LEVEL); #include "common/bt_str.h" #define MAX_URI_SCHEME_LIST_SIZE 64 -#if IS_ENABLED(CONFIG_BT_TBS_CLIENT_GTBS) +#if defined(CONFIG_BT_TBS_CLIENT_GTBS) #define BT_TBS_INSTANCE_MAX_CNT (CONFIG_BT_TBS_CLIENT_MAX_TBS_INSTANCES + 1) #else #define BT_TBS_INSTANCE_MAX_CNT CONFIG_BT_TBS_CLIENT_MAX_TBS_INSTANCES diff --git a/subsys/bluetooth/host/conn.c b/subsys/bluetooth/host/conn.c index 17ffb73b018..719fab247e6 100644 --- a/subsys/bluetooth/host/conn.c +++ b/subsys/bluetooth/host/conn.c @@ -2164,7 +2164,7 @@ void bt_conn_security_changed(struct bt_conn *conn, uint8_t hci_err, } } -#if IS_ENABLED(CONFIG_BT_KEYS_OVERWRITE_OLDEST) +#if defined(CONFIG_BT_KEYS_OVERWRITE_OLDEST) if (!err && conn->sec_level >= BT_SECURITY_L2) { if (conn->type == BT_CONN_TYPE_LE) { bt_keys_update_usage(conn->id, bt_conn_get_dst(conn)); diff --git a/subsys/bluetooth/host/hci_core.c b/subsys/bluetooth/host/hci_core.c index c8bc73bbabc..85e1fd92027 100644 --- a/subsys/bluetooth/host/hci_core.c +++ b/subsys/bluetooth/host/hci_core.c @@ -53,7 +53,7 @@ #include "br.h" #endif -#if IS_ENABLED(CONFIG_BT_DF) +#if defined(CONFIG_BT_DF) #include "direction_internal.h" #endif /* CONFIG_BT_DF */ @@ -3060,7 +3060,7 @@ static int le_init(void) } #endif -#if IS_ENABLED(CONFIG_BT_DF) +#if defined(CONFIG_BT_DF) if (BT_FEAT_LE_CONNECTIONLESS_CTE_TX(bt_dev.le.features) || BT_FEAT_LE_CONNECTIONLESS_CTE_RX(bt_dev.le.features) || BT_FEAT_LE_RX_CTE(bt_dev.le.features)) { diff --git a/subsys/bluetooth/host/keys.c b/subsys/bluetooth/host/keys.c index 65170c4f03c..5040903aa6b 100644 --- a/subsys/bluetooth/host/keys.c +++ b/subsys/bluetooth/host/keys.c @@ -38,7 +38,7 @@ static struct bt_keys key_pool[CONFIG_BT_MAX_PAIRED]; #define BT_KEYS_STORAGE_LEN_COMPAT (BT_KEYS_STORAGE_LEN - sizeof(uint32_t)) -#if IS_ENABLED(CONFIG_BT_KEYS_OVERWRITE_OLDEST) +#if defined(CONFIG_BT_KEYS_OVERWRITE_OLDEST) static uint32_t aging_counter_val; static struct bt_keys *last_keys_updated; @@ -102,7 +102,7 @@ struct bt_keys *bt_keys_get_addr(uint8_t id, const bt_addr_le_t *addr) } } -#if IS_ENABLED(CONFIG_BT_KEYS_OVERWRITE_OLDEST) +#if defined(CONFIG_BT_KEYS_OVERWRITE_OLDEST) if (first_free_slot == ARRAY_SIZE(key_pool)) { struct bt_keys *oldest = NULL; bt_addr_le_t oldest_addr; @@ -138,7 +138,7 @@ struct bt_keys *bt_keys_get_addr(uint8_t id, const bt_addr_le_t *addr) keys = &key_pool[first_free_slot]; keys->id = id; bt_addr_le_copy(&keys->addr, addr); -#if IS_ENABLED(CONFIG_BT_KEYS_OVERWRITE_OLDEST) +#if defined(CONFIG_BT_KEYS_OVERWRITE_OLDEST) keys->aging_counter = ++aging_counter_val; last_keys_updated = keys; #endif /* CONFIG_BT_KEYS_OVERWRITE_OLDEST */ @@ -443,7 +443,7 @@ static int keys_set(const char *name, size_t len_rd, settings_read_cb read_cb, } LOG_DBG("Successfully restored keys for %s", bt_addr_le_str(&addr)); -#if IS_ENABLED(CONFIG_BT_KEYS_OVERWRITE_OLDEST) +#if defined(CONFIG_BT_KEYS_OVERWRITE_OLDEST) if (aging_counter_val < keys->aging_counter) { aging_counter_val = keys->aging_counter; } @@ -478,7 +478,7 @@ SETTINGS_STATIC_HANDLER_DEFINE(bt_keys, "bt/keys", NULL, keys_set, keys_commit, #endif /* CONFIG_BT_SETTINGS */ -#if IS_ENABLED(CONFIG_BT_KEYS_OVERWRITE_OLDEST) +#if defined(CONFIG_BT_KEYS_OVERWRITE_OLDEST) void bt_keys_update_usage(uint8_t id, const bt_addr_le_t *addr) { __ASSERT_NO_MSG(addr != NULL); @@ -537,7 +537,7 @@ struct bt_keys *bt_keys_get_key_pool(void) return key_pool; } -#if IS_ENABLED(CONFIG_BT_KEYS_OVERWRITE_OLDEST) +#if defined(CONFIG_BT_KEYS_OVERWRITE_OLDEST) uint32_t bt_keys_get_aging_counter_val(void) { return aging_counter_val; diff --git a/subsys/bluetooth/host/keys_br.c b/subsys/bluetooth/host/keys_br.c index b08fde96a6d..ee32f26c336 100644 --- a/subsys/bluetooth/host/keys_br.c +++ b/subsys/bluetooth/host/keys_br.c @@ -28,7 +28,7 @@ LOG_MODULE_REGISTER(bt_keys_br); static struct bt_keys_link_key key_pool[CONFIG_BT_MAX_PAIRED]; -#if IS_ENABLED(CONFIG_BT_KEYS_OVERWRITE_OLDEST) +#if defined(CONFIG_BT_KEYS_OVERWRITE_OLDEST) static uint32_t aging_counter_val; static struct bt_keys_link_key *last_keys_updated; #endif /* CONFIG_BT_KEYS_OVERWRITE_OLDEST */ @@ -61,7 +61,7 @@ struct bt_keys_link_key *bt_keys_get_link_key(const bt_addr_t *addr) } key = bt_keys_find_link_key(BT_ADDR_ANY); -#if IS_ENABLED(CONFIG_BT_KEYS_OVERWRITE_OLDEST) +#if defined(CONFIG_BT_KEYS_OVERWRITE_OLDEST) if (!key) { int i; @@ -82,7 +82,7 @@ struct bt_keys_link_key *bt_keys_get_link_key(const bt_addr_t *addr) if (key) { bt_addr_copy(&key->addr, addr); -#if IS_ENABLED(CONFIG_BT_KEYS_OVERWRITE_OLDEST) +#if defined(CONFIG_BT_KEYS_OVERWRITE_OLDEST) key->aging_counter = ++aging_counter_val; last_keys_updated = key; #endif @@ -195,7 +195,7 @@ static int link_key_set(const char *name, size_t len_rd, memcpy(link_key->storage_start, val, len); LOG_DBG("Successfully restored link key for %s", bt_addr_le_str(&le_addr)); -#if IS_ENABLED(CONFIG_BT_KEYS_OVERWRITE_OLDEST) +#if defined(CONFIG_BT_KEYS_OVERWRITE_OLDEST) if (aging_counter_val < link_key->aging_counter) { aging_counter_val = link_key->aging_counter; } @@ -207,7 +207,7 @@ static int link_key_set(const char *name, size_t len_rd, SETTINGS_STATIC_HANDLER_DEFINE(bt_link_key, "bt/link_key", NULL, link_key_set, NULL, NULL); -#if IS_ENABLED(CONFIG_BT_KEYS_OVERWRITE_OLDEST) +#if defined(CONFIG_BT_KEYS_OVERWRITE_OLDEST) void bt_keys_link_key_update_usage(const bt_addr_t *addr) { struct bt_keys_link_key *link_key = bt_keys_find_link_key(addr); diff --git a/subsys/bluetooth/services/ots/ots_l2cap.c b/subsys/bluetooth/services/ots/ots_l2cap.c index ec9612dace1..78392ec01d4 100644 --- a/subsys/bluetooth/services/ots/ots_l2cap.c +++ b/subsys/bluetooth/services/ots/ots_l2cap.c @@ -22,7 +22,7 @@ /* This l2cap is the only OTS-file in use for OTC. * If only OTC is used, the OTS log module must be registered here. */ -#if IS_ENABLED(CONFIG_BT_OTS) +#if defined(CONFIG_BT_OTS) LOG_MODULE_DECLARE(bt_ots, CONFIG_BT_OTS_LOG_LEVEL); #elif IS_ENABLED(CONFIG_BT_OTS_CLIENT) LOG_MODULE_REGISTER(bt_ots, CONFIG_BT_OTS_LOG_LEVEL); diff --git a/subsys/debug/thread_analyzer.c b/subsys/debug/thread_analyzer.c index 3bc11b55aa9..39a9bcf6aae 100644 --- a/subsys/debug/thread_analyzer.c +++ b/subsys/debug/thread_analyzer.c @@ -18,7 +18,7 @@ LOG_MODULE_REGISTER(thread_analyzer, CONFIG_THREAD_ANALYZER_LOG_LEVEL); -#if IS_ENABLED(CONFIG_THREAD_ANALYZER_USE_PRINTK) +#if defined(CONFIG_THREAD_ANALYZER_USE_PRINTK) #define THREAD_ANALYZER_PRINT(...) printk(__VA_ARGS__) #define THREAD_ANALYZER_FMT(str) str "\n" #define THREAD_ANALYZER_VSTR(str) (str) @@ -169,7 +169,7 @@ void thread_analyzer_print(void) thread_analyzer_run(thread_print_cb); } -#if IS_ENABLED(CONFIG_THREAD_ANALYZER_AUTO) +#if defined(CONFIG_THREAD_ANALYZER_AUTO) void thread_analyzer_auto(void) { diff --git a/subsys/net/ip/net_context.c b/subsys/net/ip/net_context.c index 630b5d23ddd..5216a031dc5 100644 --- a/subsys/net/ip/net_context.c +++ b/subsys/net/ip/net_context.c @@ -38,7 +38,7 @@ LOG_MODULE_REGISTER(net_ctx, CONFIG_NET_CONTEXT_LOG_LEVEL); #include "tcp_internal.h" #include "net_stats.h" -#if IS_ENABLED(CONFIG_NET_TCP) +#if defined(CONFIG_NET_TCP) #include "tcp.h" #endif diff --git a/subsys/net/ip/net_mgmt.c b/subsys/net/ip/net_mgmt.c index 956ecf27064..b71d33622c4 100644 --- a/subsys/net/ip/net_mgmt.c +++ b/subsys/net/ip/net_mgmt.c @@ -383,7 +383,7 @@ void net_mgmt_event_init(void) (void)memset(events, 0, CONFIG_NET_MGMT_EVENT_QUEUE_SIZE * sizeof(struct mgmt_event_entry)); -#if IS_ENABLED(CONFIG_NET_TC_THREAD_COOPERATIVE) +#if defined(CONFIG_NET_TC_THREAD_COOPERATIVE) /* Lowest priority cooperative thread */ #define THREAD_PRIORITY K_PRIO_COOP(CONFIG_NUM_COOP_PRIORITIES - 1) #else diff --git a/subsys/net/ip/net_pkt.c b/subsys/net/ip/net_pkt.c index c566b6dce03..81bba652542 100644 --- a/subsys/net/ip/net_pkt.c +++ b/subsys/net/ip/net_pkt.c @@ -1254,13 +1254,13 @@ static struct net_pkt *pkt_alloc(struct k_mem_slab *slab, k_timeout_t timeout) net_pkt_set_ipv6_next_hdr(pkt, 255); } -#if IS_ENABLED(CONFIG_NET_TX_DEFAULT_PRIORITY) +#if defined(CONFIG_NET_TX_DEFAULT_PRIORITY) #define TX_DEFAULT_PRIORITY CONFIG_NET_TX_DEFAULT_PRIORITY #else #define TX_DEFAULT_PRIORITY 0 #endif -#if IS_ENABLED(CONFIG_NET_RX_DEFAULT_PRIORITY) +#if defined(CONFIG_NET_RX_DEFAULT_PRIORITY) #define RX_DEFAULT_PRIORITY CONFIG_NET_RX_DEFAULT_PRIORITY #else #define RX_DEFAULT_PRIORITY 0 diff --git a/subsys/net/ip/net_tc.c b/subsys/net/ip/net_tc.c index 70942421ffc..b9e21ba79e4 100644 --- a/subsys/net/ip/net_tc.c +++ b/subsys/net/ip/net_tc.c @@ -105,7 +105,7 @@ int net_rx_priority2tc(enum net_priority prio) } -#if IS_ENABLED(CONFIG_NET_TC_THREAD_COOPERATIVE) +#if defined(CONFIG_NET_TC_THREAD_COOPERATIVE) #define BASE_PRIO_TX (CONFIG_NET_TC_NUM_PRIORITIES - 1) #else #define BASE_PRIO_TX (CONFIG_NET_TC_TX_COUNT - 1) @@ -113,7 +113,7 @@ int net_rx_priority2tc(enum net_priority prio) #define PRIO_TX(i, _) (BASE_PRIO_TX - i) -#if IS_ENABLED(CONFIG_NET_TC_THREAD_COOPERATIVE) +#if defined(CONFIG_NET_TC_THREAD_COOPERATIVE) #define BASE_PRIO_RX (CONFIG_NET_TC_NUM_PRIORITIES - 1) #else #define BASE_PRIO_RX (CONFIG_NET_TC_RX_COUNT - 1) diff --git a/subsys/net/ip/packet_socket.c b/subsys/net/ip/packet_socket.c index 8f21af97bbf..e0d0c8318f1 100644 --- a/subsys/net/ip/packet_socket.c +++ b/subsys/net/ip/packet_socket.c @@ -25,7 +25,7 @@ enum net_verdict net_packet_socket_input(struct net_pkt *pkt, uint8_t proto) sa_family_t orig_family; enum net_verdict net_verdict; -#if IS_ENABLED(CONFIG_NET_DSA) +#if defined(CONFIG_NET_DSA) /* * For DSA the master port is not supporting raw packets. Only the * lan1..3 are working with them. diff --git a/subsys/net/ip/tcp.c b/subsys/net/ip/tcp.c index bede2497d0d..e5e8f12c209 100644 --- a/subsys/net/ip/tcp.c +++ b/subsys/net/ip/tcp.c @@ -1644,7 +1644,7 @@ static uint32_t tcpv6_init_isn(struct in6_addr *saddr, memcpy(buf.key, unique_key, sizeof(buf.key)); -#if IS_ENABLED(CONFIG_NET_TCP_ISN_RFC6528) +#if defined(CONFIG_NET_TCP_ISN_RFC6528) mbedtls_md5((const unsigned char *)&buf, sizeof(buf), hash); #endif @@ -1679,7 +1679,7 @@ static uint32_t tcpv4_init_isn(struct in_addr *saddr, memcpy(buf.key, unique_key, sizeof(unique_key)); -#if IS_ENABLED(CONFIG_NET_TCP_ISN_RFC6528) +#if defined(CONFIG_NET_TCP_ISN_RFC6528) mbedtls_md5((const unsigned char *)&buf, sizeof(buf), hash); #endif @@ -3401,7 +3401,7 @@ void net_tcp_init(void) tcp_recv_cb = tp_tcp_recv_cb; #endif -#if IS_ENABLED(CONFIG_NET_TC_THREAD_COOPERATIVE) +#if defined(CONFIG_NET_TC_THREAD_COOPERATIVE) #define THREAD_PRIORITY K_PRIO_COOP(0) #else #define THREAD_PRIORITY K_PRIO_PREEMPT(0) diff --git a/subsys/net/ip/tcp_private.h b/subsys/net/ip/tcp_private.h index 12bad334191..952e1393999 100644 --- a/subsys/net/ip/tcp_private.h +++ b/subsys/net/ip/tcp_private.h @@ -33,7 +33,7 @@ _x; \ }) -#if IS_ENABLED(CONFIG_NET_TEST_PROTOCOL) +#if defined(CONFIG_NET_TEST_PROTOCOL) #define tcp_malloc(_size) \ tp_malloc(_size, tp_basename(__FILE__), __LINE__, __func__) #define tcp_calloc(_nmemb, _size) \ @@ -98,7 +98,7 @@ }) -#if IS_ENABLED(CONFIG_NET_TEST_PROTOCOL) +#if defined(CONFIG_NET_TEST_PROTOCOL) #define conn_seq(_conn, _req) \ tp_seq_track(TP_SEQ, &(_conn)->seq, (_req), tp_basename(__FILE__), \ __LINE__, __func__) diff --git a/subsys/net/ip/tp.h b/subsys/net/ip/tp.h index 736c7f9f40e..7825633f9b9 100644 --- a/subsys/net/ip/tp.h +++ b/subsys/net/ip/tp.h @@ -16,7 +16,7 @@ extern "C" { #include #include "connection.h" -#if IS_ENABLED(CONFIG_NET_TEST_PROTOCOL) +#if defined(CONFIG_NET_TEST_PROTOCOL) #define TP_SEQ 0 #define TP_ACK 1 diff --git a/subsys/net/l2/ppp/ppp_l2.c b/subsys/net/l2/ppp/ppp_l2.c index 81a4e9a29c4..ab1d7bad4ee 100644 --- a/subsys/net/l2/ppp/ppp_l2.c +++ b/subsys/net/l2/ppp/ppp_l2.c @@ -23,7 +23,7 @@ LOG_MODULE_REGISTER(net_l2_ppp, CONFIG_NET_L2_PPP_LOG_LEVEL); static K_FIFO_DEFINE(tx_queue); -#if IS_ENABLED(CONFIG_NET_TC_THREAD_COOPERATIVE) +#if defined(CONFIG_NET_TC_THREAD_COOPERATIVE) /* Lowest priority cooperative thread */ #define THREAD_PRIORITY K_PRIO_COOP(CONFIG_NUM_COOP_PRIORITIES - 1) #else diff --git a/subsys/net/lib/conn_mgr/conn_mgr.c b/subsys/net/lib/conn_mgr/conn_mgr.c index 610df7236f4..6cf46e7737f 100644 --- a/subsys/net/lib/conn_mgr/conn_mgr.c +++ b/subsys/net/lib/conn_mgr/conn_mgr.c @@ -16,7 +16,7 @@ LOG_MODULE_REGISTER(conn_mgr, CONFIG_NET_CONNECTION_MANAGER_LOG_LEVEL); #include -#if IS_ENABLED(CONFIG_NET_TC_THREAD_COOPERATIVE) +#if defined(CONFIG_NET_TC_THREAD_COOPERATIVE) #define THREAD_PRIORITY K_PRIO_COOP(CONFIG_NUM_COOP_PRIORITIES - 1) #else #define THREAD_PRIORITY K_PRIO_PREEMPT(7) diff --git a/subsys/net/lib/lwm2m/lwm2m_engine.c b/subsys/net/lib/lwm2m/lwm2m_engine.c index 1ee35fa1694..8b2984ef1de 100644 --- a/subsys/net/lib/lwm2m/lwm2m_engine.c +++ b/subsys/net/lib/lwm2m/lwm2m_engine.c @@ -63,7 +63,7 @@ LOG_MODULE_REGISTER(LOG_MODULE_NAME); #include "lwm2m_rd_client.h" #endif -#if IS_ENABLED(CONFIG_NET_TC_THREAD_COOPERATIVE) +#if defined(CONFIG_NET_TC_THREAD_COOPERATIVE) /* Lowest priority cooperative thread */ #define THREAD_PRIORITY K_PRIO_COOP(CONFIG_NUM_COOP_PRIORITIES - 1) #else diff --git a/subsys/net/lib/zperf/zperf_tcp_receiver.c b/subsys/net/lib/zperf/zperf_tcp_receiver.c index bd4ce8c1aee..618a71baf17 100644 --- a/subsys/net/lib/zperf/zperf_tcp_receiver.c +++ b/subsys/net/lib/zperf/zperf_tcp_receiver.c @@ -28,7 +28,7 @@ static struct sockaddr_in *in4_addr_my; static bool init_done; -#if IS_ENABLED(CONFIG_NET_TC_THREAD_COOPERATIVE) +#if defined(CONFIG_NET_TC_THREAD_COOPERATIVE) #define TCP_RECEIVER_THREAD_PRIORITY K_PRIO_COOP(8) #else #define TCP_RECEIVER_THREAD_PRIORITY K_PRIO_PREEMPT(8) diff --git a/subsys/net/lib/zperf/zperf_udp_receiver.c b/subsys/net/lib/zperf/zperf_udp_receiver.c index 65988860ccf..6d45c32a893 100644 --- a/subsys/net/lib/zperf/zperf_udp_receiver.c +++ b/subsys/net/lib/zperf/zperf_udp_receiver.c @@ -26,7 +26,7 @@ LOG_MODULE_DECLARE(net_zperf, CONFIG_NET_ZPERF_LOG_LEVEL); static struct sockaddr_in6 *in6_addr_my; static struct sockaddr_in *in4_addr_my; -#if IS_ENABLED(CONFIG_NET_TC_THREAD_COOPERATIVE) +#if defined(CONFIG_NET_TC_THREAD_COOPERATIVE) #define UDP_RECEIVER_THREAD_PRIORITY K_PRIO_COOP(8) #else #define UDP_RECEIVER_THREAD_PRIORITY K_PRIO_PREEMPT(8) diff --git a/subsys/usb/device/class/dfu/usb_dfu.c b/subsys/usb/device/class/dfu/usb_dfu.c index 2fd6e228a3f..87d703205eb 100644 --- a/subsys/usb/device/class/dfu/usb_dfu.c +++ b/subsys/usb/device/class/dfu/usb_dfu.c @@ -66,19 +66,19 @@ LOG_MODULE_REGISTER(usb_dfu, CONFIG_USB_DEVICE_LOG_LEVEL); #define INTERMITTENT_CHECK_DELAY 50 -#if IS_ENABLED(CONFIG_USB_DFU_REBOOT) +#if defined(CONFIG_USB_DFU_REBOOT) #define DFU_DESC_ATTRIBUTES_MANIF_TOL 0 #else #define DFU_DESC_ATTRIBUTES_MANIF_TOL DFU_ATTR_MANIFESTATION_TOLERANT #endif -#if IS_ENABLED(CONFIG_USB_DFU_ENABLE_UPLOAD) +#if defined(CONFIG_USB_DFU_ENABLE_UPLOAD) #define DFU_DESC_ATTRIBUTES_CAN_UPLOAD DFU_ATTR_CAN_UPLOAD #else #define DFU_DESC_ATTRIBUTES_CAN_UPLOAD 0 #endif -#if IS_ENABLED(CONFIG_USB_DFU_WILL_DETACH) +#if defined(CONFIG_USB_DFU_WILL_DETACH) #define DFU_DESC_ATTRIBUTES_WILL_DETACH DFU_ATTR_WILL_DETACH #else #define DFU_DESC_ATTRIBUTES_WILL_DETACH 0 @@ -470,7 +470,7 @@ static int dfu_class_handle_to_host(struct usb_setup_packet *setup, if (dfu_data.state == dfuMANIFEST_SYNC) { -#if IS_ENABLED(CONFIG_USB_DFU_REBOOT) +#if defined(CONFIG_USB_DFU_REBOOT) dfu_data.state = dfuMANIFEST_WAIT_RST; reboot_schedule(); #else diff --git a/subsys/usb/device_next/usbd_class.c b/subsys/usb/device_next/usbd_class.c index 8b1df8a7ac1..95ba6122081 100644 --- a/subsys/usb/device_next/usbd_class.c +++ b/subsys/usb/device_next/usbd_class.c @@ -16,7 +16,7 @@ #include "usbd_ch9.h" #include -#if IS_ENABLED(CONFIG_USBD_LOG_LEVEL) +#if defined(CONFIG_USBD_LOG_LEVEL) #define USBD_CLASS_LOG_LEVEL CONFIG_USBD_LOG_LEVEL #else #define USBD_CLASS_LOG_LEVEL LOG_LEVEL_NONE diff --git a/tests/bluetooth/bsim_bt/edtt_ble_test_app/hci_test_app/src/main.c b/tests/bluetooth/bsim_bt/edtt_ble_test_app/hci_test_app/src/main.c index e0382a702cd..e7af59850cd 100644 --- a/tests/bluetooth/bsim_bt/edtt_ble_test_app/hci_test_app/src/main.c +++ b/tests/bluetooth/bsim_bt/edtt_ble_test_app/hci_test_app/src/main.c @@ -27,7 +27,7 @@ #include "bs_tracing.h" #include "commands.h" -#if IS_ENABLED(CONFIG_BT_HCI_CORE_LOG_LEVEL_DBG) +#if defined(CONFIG_BT_HCI_CORE_LOG_LEVEL_DBG) #define LOG_LEVEL LOG_LEVEL_DBG #else #define LOG_LEVEL CONFIG_BT_LOG_LEVEL diff --git a/tests/bluetooth/host/keys/bt_keys_get_addr/src/test_suite_full_list_overwrite_oldest.c b/tests/bluetooth/host/keys/bt_keys_get_addr/src/test_suite_full_list_overwrite_oldest.c index 64905f13a65..469d96c53e3 100644 --- a/tests/bluetooth/host/keys/bt_keys_get_addr/src/test_suite_full_list_overwrite_oldest.c +++ b/tests/bluetooth/host/keys/bt_keys_get_addr/src/test_suite_full_list_overwrite_oldest.c @@ -230,7 +230,7 @@ ZTEST(bt_keys_get_addr_full_list_overwrite_oldest, test_full_list_key_0_in_use_k bt_addr_le_t *addr = BT_ADDR_LE_5; uint32_t expected_oldest_params_ref_idx; -#if IS_ENABLED(CONFIG_BT_KEYS_OVERWRITE_OLDEST) +#if defined(CONFIG_BT_KEYS_OVERWRITE_OLDEST) /* Normally first items inserted in the list are the oldest. * For this particular test, we need to override that by setting * the 'aging_counter' diff --git a/tests/bluetooth/host/keys/mocks/keys_help_utils.h b/tests/bluetooth/host/keys/mocks/keys_help_utils.h index 45156499232..2d5f62e0120 100644 --- a/tests/bluetooth/host/keys/mocks/keys_help_utils.h +++ b/tests/bluetooth/host/keys/mocks/keys_help_utils.h @@ -21,7 +21,7 @@ struct id_addr_type { /* keys.c declarations */ struct bt_keys *bt_keys_get_key_pool(void); -#if IS_ENABLED(CONFIG_BT_KEYS_OVERWRITE_OLDEST) +#if defined(CONFIG_BT_KEYS_OVERWRITE_OLDEST) uint32_t bt_keys_get_aging_counter_val(void); #endif diff --git a/tests/drivers/disk/disk_access/src/main.c b/tests/drivers/disk/disk_access/src/main.c index 680015a7aa4..3800ae0626e 100644 --- a/tests/drivers/disk/disk_access/src/main.c +++ b/tests/drivers/disk/disk_access/src/main.c @@ -14,7 +14,7 @@ #include #include -#if IS_ENABLED(CONFIG_DISK_DRIVER_SDMMC) +#if defined(CONFIG_DISK_DRIVER_SDMMC) #define DISK_NAME CONFIG_SDMMC_VOLUME_NAME #elif IS_ENABLED(CONFIG_DISK_DRIVER_RAM) #define DISK_NAME CONFIG_DISK_RAM_VOLUME_NAME diff --git a/tests/drivers/disk/disk_performance/src/main.c b/tests/drivers/disk/disk_performance/src/main.c index a831c635af4..24bdd53e891 100644 --- a/tests/drivers/disk/disk_performance/src/main.c +++ b/tests/drivers/disk/disk_performance/src/main.c @@ -12,7 +12,7 @@ #include #include -#if IS_ENABLED(CONFIG_DISK_DRIVER_SDMMC) +#if defined(CONFIG_DISK_DRIVER_SDMMC) #define DISK_NAME CONFIG_SDMMC_VOLUME_NAME #elif IS_ENABLED(CONFIG_DISK_DRIVER_RAM) #define DISK_NAME CONFIG_DISK_RAM_VOLUME_NAME diff --git a/tests/net/socket/net_mgmt/src/main.c b/tests/net/socket/net_mgmt/src/main.c index fd264247d37..a13f4537206 100644 --- a/tests/net/socket/net_mgmt/src/main.c +++ b/tests/net/socket/net_mgmt/src/main.c @@ -26,7 +26,7 @@ static ZTEST_BMEM int fd; static ZTEST_BMEM struct in6_addr addr_v6; static ZTEST_DMEM struct in_addr addr_v4 = { { { 192, 0, 2, 3 } } }; -#if IS_ENABLED(CONFIG_NET_SOCKETS_LOG_LEVEL_DBG) +#if defined(CONFIG_NET_SOCKETS_LOG_LEVEL_DBG) #define DBG(fmt, ...) printk(fmt, ##__VA_ARGS__) #else #define DBG(fmt, ...) diff --git a/tests/subsys/fs/fat_fs_api/src/test_fat.h b/tests/subsys/fs/fat_fs_api/src/test_fat.h index 9da1fbabfc0..d9093c2519f 100644 --- a/tests/subsys/fs/fat_fs_api/src/test_fat.h +++ b/tests/subsys/fs/fat_fs_api/src/test_fat.h @@ -10,7 +10,7 @@ #include #define FATFS_MNTP "/NAND:" -#if IS_ENABLED(CONFIG_FS_FATFS_LFN) +#if defined(CONFIG_FS_FATFS_LFN) #define TEST_FILE FATFS_MNTP \ "/testlongfilenamethatsmuchlongerthan8.3chars.text" #else diff --git a/tests/subsys/usb/desc_sections/src/desc_sections.c b/tests/subsys/usb/desc_sections/src/desc_sections.c index e0efa4e1152..56df5776b44 100644 --- a/tests/subsys/usb/desc_sections/src/desc_sections.c +++ b/tests/subsys/usb/desc_sections/src/desc_sections.c @@ -33,7 +33,7 @@ struct usb_test_config { struct usb_ep_descriptor if0_in2_ep; } __packed; -#if IS_ENABLED(CONFIG_USB_DC_HAS_HS_SUPPORT) +#if defined(CONFIG_USB_DC_HAS_HS_SUPPORT) #define TEST_BULK_EP_MPS 512 #else #define TEST_BULK_EP_MPS 64 diff --git a/tests/subsys/usb/device/src/main.c b/tests/subsys/usb/device/src/main.c index 8263e8d6750..52735a84656 100644 --- a/tests/subsys/usb/device/src/main.c +++ b/tests/subsys/usb/device/src/main.c @@ -11,7 +11,7 @@ #include /* Max packet size for endpoints */ -#if IS_ENABLED(CONFIG_USB_DC_HAS_HS_SUPPORT) +#if defined(CONFIG_USB_DC_HAS_HS_SUPPORT) #define BULK_EP_MPS 512 #else #define BULK_EP_MPS 64