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 authored and Anup Patel committed 2023-09-06 17:06:12 +05:30
1 parent a9cffd6532
commit b20bd479ef
2 files changed
+6 -1

No files matched your search

+1 -1
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 */