Skip to content
Permalink
Browse files

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 <bbolen@lexmark.com>
  • Loading branch information...
Bradley Bolen authored and nashif committed May 17, 2019
1 parent 63013d9 commit 65ae6433dc86aae3165305a3019db20e4fd49377
Showing with 2 additions and 2 deletions.
  1. +2 −2 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}

0 comments on commit 65ae643

Please sign in to comment.
You can’t perform that action at this time.