From cbd9b37ef5332cffa663fea4de860eb964c4e4e0 Mon Sep 17 00:00:00 2001 From: Hess Nathan Date: Mon, 29 Apr 2024 11:24:20 +0200 Subject: [PATCH] coding guidelines: comply with MISRA Rule 20.9 - avoid to use undefined macros in #if expressions Signed-off-by: Hess Nathan --- arch/x86/core/prep_c.c | 2 +- arch/x86/core/x86_mmu.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/core/prep_c.c b/arch/x86/core/prep_c.c index 17a4a7f7473..d9b62b0b711 100644 --- a/arch/x86/core/prep_c.c +++ b/arch/x86/core/prep_c.c @@ -65,7 +65,7 @@ FUNC_NORETURN void z_prep_c(void *arg) #endif #endif -#if CONFIG_X86_STACK_PROTECTION +#ifdef CONFIG_X86_STACK_PROTECTION unsigned int num_cpus = arch_num_cpus(); for (int i = 0; i < num_cpus; i++) { diff --git a/arch/x86/core/x86_mmu.c b/arch/x86/core/x86_mmu.c index 71aafe5cad9..e67ce67ae21 100644 --- a/arch/x86/core/x86_mmu.c +++ b/arch/x86/core/x86_mmu.c @@ -1355,7 +1355,7 @@ void z_x86_mmu_init(void) #endif } -#if CONFIG_X86_STACK_PROTECTION +#ifdef CONFIG_X86_STACK_PROTECTION __pinned_func void z_x86_set_stack_guard(k_thread_stack_t *stack) {