From 82df9edfd5cf2d453618ea668b4252f5bb33f925 Mon Sep 17 00:00:00 2001 From: Michael Bestas Date: Sat, 6 Jan 2024 18:36:02 +0200 Subject: [PATCH] arm64: efi: Switch to static_assert wrapper The backported commit 96bc083042d87f305e144ce89aad897f8bd687d4 switched static_assert to _Static_assert compared to the upstream commit, which causes the following error when building with -Werror: arch/arm64/kernel/efi.c:157:36: error: '_Static_assert' with no message is a C2x extension [-Werror,-Wc2x-extensions] _Static_assert(THREAD_SIZE >= SZ_8K); ^ , "" 1 error generated. Switch back to static_assert after picking the required upstream commit 6bab69c65013bed5fce9f101a64a84d0385b3946 "build_bug.h: add wrapper for _Static_assert" Fixes: 96bc083042d8 ("BACKPORT: arm64: efi: Execute runtime services from a dedicated stack") Signed-off-by: Michael Bestas Change-Id: I74ff73517c49792d73f9bd4189ef73aec6addee0 --- arch/arm64/kernel/efi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/kernel/efi.c b/arch/arm64/kernel/efi.c index 27103dddc4ed..e2dd21489b0b 100644 --- a/arch/arm64/kernel/efi.c +++ b/arch/arm64/kernel/efi.c @@ -154,7 +154,7 @@ DEFINE_SPINLOCK(efi_rt_lock); asmlinkage u64 *efi_rt_stack_top __ro_after_init; /* EFI requires 8 KiB of stack space for runtime services */ -_Static_assert(THREAD_SIZE >= SZ_8K); +static_assert(THREAD_SIZE >= SZ_8K); static int __init arm64_efi_rt_init(void) {