diff --git a/arch/common/sw_isr_common.c b/arch/common/sw_isr_common.c index b0b68f9c9b..10ac58ea06 100644 --- a/arch/common/sw_isr_common.c +++ b/arch/common/sw_isr_common.c @@ -54,9 +54,9 @@ unsigned int get_parent_offset(unsigned int parent_irq, unsigned int length) { unsigned int i; - unsigned int offset = 0; + unsigned int offset = 0U; - for (i = 0; i < length; ++i) { + for (i = 0U; i < length; ++i) { if (list[i].irq == parent_irq) { offset = list[i].offset; break; @@ -91,7 +91,7 @@ void z_isr_install(unsigned int irq, void (*routine)(const void *), level = irq_get_level(irq); - if (level == 2) { + if (level == 2U) { parent_irq = irq_parent_level_2(irq); parent_offset = get_parent_offset(parent_irq, lvl2_irq_list, @@ -99,7 +99,7 @@ void z_isr_install(unsigned int irq, void (*routine)(const void *), table_idx = parent_offset + irq_from_level_2(irq); } #ifdef CONFIG_3RD_LEVEL_INTERRUPTS - else if (level == 3) { + else if (level == 3U) { parent_irq = irq_parent_level_3(irq); parent_offset = get_parent_offset(parent_irq, lvl3_irq_list, diff --git a/arch/common/timing.c b/arch/common/timing.c index 72b0f053e3..00763a7d0a 100644 --- a/arch/common/timing.c +++ b/arch/common/timing.c @@ -49,5 +49,5 @@ uint64_t arch_timing_cycles_to_ns_avg(uint64_t cycles, uint32_t count) uint32_t arch_timing_freq_get_mhz(void) { - return (uint32_t)(arch_timing_freq_get() / 1000000); + return (uint32_t)(arch_timing_freq_get() / 1000000U); }