From 677050c2af68fc978d0831f8e782ed9d4c39c563 Mon Sep 17 00:00:00 2001 From: Jan Van Winkel Date: Fri, 27 Sep 2019 22:52:08 +0200 Subject: [PATCH] kernel/idle: Correct SMP_FALLBACK define Corrected the define of SMP_FALLBACK to prevent llvm warning. llvm issues a warning as the behaviour of using defined(x) inside a macro expansion is undefined (https://reviews.llvm.org/D15866). Signed-off-by: Jan Van Winkel --- kernel/idle.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/kernel/idle.c b/kernel/idle.c index e9cef6f85eb..c874df5271a 100644 --- a/kernel/idle.c +++ b/kernel/idle.c @@ -20,8 +20,11 @@ #endif /* Fallback idle spin loop for SMP platforms without a working IPI */ -#define SMP_FALLBACK \ - (defined(CONFIG_SMP) && !defined(CONFIG_SCHED_IPI_SUPPORTED)) +#if (defined(CONFIG_SMP) && !defined(CONFIG_SCHED_IPI_SUPPORTED)) +#define SMP_FALLBACK 1 +#else +#define SMP_FALLBACK 0 +#endif #ifdef CONFIG_SYS_POWER_MANAGEMENT /*