lib: sbi: improve the definition of SBI_IPI_EVENT_MAX

The previous definition had the assumption that the machine word length
is equal to the word length of LONG. Remove this assumption and add a
static check to prevent errors in subsequent modifications.

Signed-off-by: Xiang W <wxjstz@126.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
Xiang W
2023-08-21 22:11:45 +08:00
committed by Anup Patel
parent a9cffd6532
commit b20bd479ef
2 changed files with 6 additions and 1 deletions

View File

@@ -14,7 +14,7 @@
/* clang-format off */
#define SBI_IPI_EVENT_MAX __riscv_xlen
#define SBI_IPI_EVENT_MAX (8 * __SIZEOF_LONG__)
/* clang-format on */