diff options
author | Edward O'Callaghan <quasisec@google.com> | 2022-06-04 20:23:57 +1000 |
---|---|---|
committer | Edward O'Callaghan <quasisec@chromium.org> | 2022-06-10 01:07:19 +0000 |
commit | cba5de5e24bc2d9b9250263060999d081d18db4a (patch) | |
tree | 831f2916802aaa52ebd290253500b53c21eb3418 /include/flash.h | |
parent | 5613315296821d56e13d98d069ef9a09f811dbd3 (diff) | |
download | flashrom-cba5de5e24bc2d9b9250263060999d081d18db4a.tar.gz flashrom-cba5de5e24bc2d9b9250263060999d081d18db4a.tar.bz2 flashrom-cba5de5e24bc2d9b9250263060999d081d18db4a.zip |
tree: Consolidate BIT() macro
Change-Id: I7e61f7671b70ca5ed751d99405714436bcd18d5a
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/64962
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Diffstat (limited to 'include/flash.h')
-rw-r--r-- | include/flash.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/flash.h b/include/flash.h index 45533ba9b..da238471a 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)) |