commit | dd9d0c58d601a003ebc1918c53edc16aab607080 | [log] [tgz] |
---|---|---|
author | Edward O'Callaghan <quasisec@google.com> | Sat Jun 04 20:23:57 2022 +1000 |
committer | Nico Huber <nico.h@gmx.de> | Sun Jan 29 12:29:02 2023 +0000 |
tree | 2daac025bb07ce348b414cb9c6e7957419ca3102 | |
parent | 4bd966c8099b64ebb665b6f40786bb21d59a9363 [diff] [blame] |
tree: Consolidate BIT() macro Change-Id: I7e61f7671b70ca5ed751d99405714436bcd18d5a Signed-off-by: Edward O'Callaghan <quasisec@google.com> Original-Reviewed-on: https://review.coreboot.org/c/flashrom/+/64962 Original-Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Original-Reviewed-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/flashrom-stable/+/72338 Reviewed-by: Nico Huber <nico.h@gmx.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
diff --git a/include/flash.h b/include/flash.h index e955942..efc2558 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))