arch: arm: Fix 14.4 guideline violation

The controlling expression of an if statement has to be an
essentially boolean type.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit is contained in:
Flavio Ceolin 2021-04-02 16:42:16 -07:00 committed by Anas Nashif
commit 95cd021cea
7 changed files with 10 additions and 10 deletions

View file

@ -84,7 +84,7 @@ static ALWAYS_INLINE unsigned int arch_irq_lock(void)
static ALWAYS_INLINE void arch_irq_unlock(unsigned int key)
{
#if defined(CONFIG_ARMV6_M_ARMV8_M_BASELINE)
if (key) {
if (key != 0U) {
return;
}
__asm__ volatile(
@ -97,7 +97,7 @@ static ALWAYS_INLINE void arch_irq_unlock(unsigned int key)
"isb;"
: : "r"(key) : "memory");
#elif defined(CONFIG_ARMV7_R)
if (key) {
if (key != 0U) {
return;
}
__asm__ volatile(

View file

@ -147,7 +147,7 @@ static inline void arch_isr_direct_footer(int maybe_swap)
#ifdef CONFIG_TRACING
sys_trace_isr_exit();
#endif
if (maybe_swap) {
if (maybe_swap != 0) {
z_arm_int_exit();
}
}