From 65ae6433dc86aae3165305a3019db20e4fd49377 Mon Sep 17 00:00:00 2001 From: Bradley Bolen Date: Fri, 17 May 2019 15:00:32 -0400 Subject: [PATCH] arch: arm: Fix checks of CONFIG_IRQ_OFFLOAD The compiler generates errors of the form error: "CONFIG_IRQ_OFFLOAD" is not defined, evaluates to 0 [-Werror=undef] when -Wundef is used and the config option was turned off. Change check to if defined(). Signed-off-by: Bradley Bolen --- arch/arm/core/swap_helper.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/core/swap_helper.S b/arch/arm/core/swap_helper.S index b3f9abef242..3f998a845a9 100644 --- a/arch/arm/core/swap_helper.S +++ b/arch/arm/core/swap_helper.S @@ -301,7 +301,7 @@ _stack_frame_endif: cmp r1, #2 beq _oops -#if CONFIG_IRQ_OFFLOAD +#if defined(CONFIG_IRQ_OFFLOAD) push {r0, lr} bl z_irq_do_offload /* call C routine which executes the offload */ pop {r0, r1} @@ -367,7 +367,7 @@ SECTION_FUNC(TEXT, __svc) cmp r1, #2 beq _oops -#if CONFIG_IRQ_OFFLOAD +#if defined(CONFIG_IRQ_OFFLOAD) push {r0, lr} bl z_irq_do_offload /* call C routine which executes the offload */ pop {r0, lr}