diff --git a/drivers/mm/mm_drv_intel_adsp.h b/drivers/mm/mm_drv_intel_adsp.h index 861621a510f4..133e5a2f9d15 100644 --- a/drivers/mm/mm_drv_intel_adsp.h +++ b/drivers/mm/mm_drv_intel_adsp.h @@ -55,7 +55,6 @@ #define MAX_EBB_BANKS_IN_SEGMENT 32 #define SRAM_BANK_SIZE (128 * 1024) #define L2_SRAM_BANK_NUM (L2_SRAM_SIZE / SRAM_BANK_SIZE) -#define IS_BIT_SET(value, idx) ((value) & (1 << (idx))) /** * Calculate TLB entry based on physical address. diff --git a/include/zephyr/sys/util_macro.h b/include/zephyr/sys/util_macro.h index 4a3767bf68a1..c8901e21454a 100644 --- a/include/zephyr/sys/util_macro.h +++ b/include/zephyr/sys/util_macro.h @@ -93,6 +93,14 @@ extern "C" { */ #define IS_BIT_MASK(m) IS_SHIFTED_BIT_MASK(m, 0) +/** + * @brief Check if bit is set in a value + * + * @param value Value that contain checked bit + * @param bit Bit number + */ +#define IS_BIT_SET(value, bit) ((((value) >> (bit)) & (0x1)) != 0) + /** @brief Extract the Least Significant Bit from @p value. */ #define LSB_GET(value) ((value) & -(value)) diff --git a/soc/nuvoton/npcx/common/reg/reg_access.h b/soc/nuvoton/npcx/common/reg/reg_access.h index ae1d6a61694b..b779b98fa2a6 100644 --- a/soc/nuvoton/npcx/common/reg/reg_access.h +++ b/soc/nuvoton/npcx/common/reg/reg_access.h @@ -10,7 +10,6 @@ /* * NPCX register bit/field access operations */ -#define IS_BIT_SET(reg, bit) (((reg >> bit) & (0x1)) != 0) #define GET_POS_FIELD(pos, size) pos #define GET_SIZE_FIELD(pos, size) size diff --git a/subsys/net/lib/shell/http.c b/subsys/net/lib/shell/http.c index ed4bebff533e..6a8c57f210d1 100644 --- a/subsys/net/lib/shell/http.c +++ b/subsys/net/lib/shell/http.c @@ -12,8 +12,7 @@ LOG_MODULE_DECLARE(net_shell); #include #include #include - -#define IS_BIT_SET(val, bit) (((val >> bit) & (0x1)) != 0) +#include static int cmd_net_http(const struct shell *sh, size_t argc, char *argv[]) {