From bfd9d0069b171032733c66bcf951181e6751e0e8 Mon Sep 17 00:00:00 2001 From: Flavio Ceolin Date: Fri, 2 Apr 2021 22:56:30 -0700 Subject: [PATCH] arch: sparc: Fix 10.4 violations Both operands of an operator in which the usual arithmetic conversions are performed shall have the same essential type category. Signed-off-by: Flavio Ceolin --- arch/sparc/core/fatal.c | 4 ++-- arch/sparc/core/irq_manage.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/sparc/core/fatal.c b/arch/sparc/core/fatal.c index e693dd12409..fb2b24a6204 100644 --- a/arch/sparc/core/fatal.c +++ b/arch/sparc/core/fatal.c @@ -179,11 +179,11 @@ static void print_backtrace(const z_arch_esf_t *esf) const uint32_t pc = s->in[7]; const uint32_t sp = s->in[6]; - if (sp == 0 && pc == 0) { + if (sp == 0U && pc == 0U) { break; } LOG_ERR(" #%-2d %08x %08x", i, pc, sp); - if (sp == 0 || sp & 7) { + if (sp == 0U || sp & 7U) { break; } s = (const struct savearea *) sp; diff --git a/arch/sparc/core/irq_manage.c b/arch/sparc/core/irq_manage.c index 95d0523b518..cd5041d1e70 100644 --- a/arch/sparc/core/irq_manage.c +++ b/arch/sparc/core/irq_manage.c @@ -31,7 +31,7 @@ void z_sparc_enter_irq(uint32_t irl) _current_cpu->nested++; #ifdef CONFIG_IRQ_OFFLOAD - if (irl != 141) { + if (irl != 141U) { irl = z_sparc_int_get_source(irl); ite = &_sw_isr_table[irl]; ite->isr(ite->arg);