From cba5de5e24bc2d9b9250263060999d081d18db4a Mon Sep 17 00:00:00 2001 From: Edward O'Callaghan Date: Sat, 4 Jun 2022 20:23:57 +1000 Subject: tree: Consolidate BIT() macro Change-Id: I7e61f7671b70ca5ed751d99405714436bcd18d5a Signed-off-by: Edward O'Callaghan Reviewed-on: https://review.coreboot.org/c/flashrom/+/64962 Tested-by: build bot (Jenkins) Reviewed-by: Arthur Heymans Reviewed-by: Elyes Haouas --- include/flash.h | 2 ++ nicintel_eeprom.c | 1 - nicintel_spi.c | 2 -- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/include/flash.h b/include/flash.h index 45533ba9..da238471 100644 --- a/include/flash.h +++ b/include/flash.h @@ -39,6 +39,8 @@ #define KiB (1024) #define MiB (1024 * KiB) +#define BIT(x) (1<<(x)) + /* Assumes `n` and `a` are at most 64-bit wide (to avoid typeof() operator). */ #define ALIGN_DOWN(n, a) ((n) & ~((uint64_t)(a) - 1)) diff --git a/nicintel_eeprom.c b/nicintel_eeprom.c index af5fa216..efd4232c 100644 --- a/nicintel_eeprom.c +++ b/nicintel_eeprom.c @@ -69,7 +69,6 @@ #define EEWR_ADDR 2 #define EEWR_DATA 16 -#define BIT(x) (1<