diff --git a/plat/common/plat_bl_common.c b/plat/common/plat_bl_common.c index dbb6f81f7..4772bada9 100644 --- a/plat/common/plat_bl_common.c +++ b/plat/common/plat_bl_common.c @@ -51,8 +51,9 @@ void bl2_el3_plat_prepare_exit(void) void __dead2 plat_error_handler(int err) { - while (1) + while (1) { wfi(); + } } void bl2_plat_preload_setup(void) diff --git a/plat/common/plat_gicv2.c b/plat/common/plat_gicv2.c index f78d2dfc6..05df97add 100644 --- a/plat/common/plat_gicv2.c +++ b/plat/common/plat_gicv2.c @@ -80,9 +80,9 @@ uint32_t plat_ic_get_pending_interrupt_type(void) #endif } - if (id == GIC_SPURIOUS_INTERRUPT) + if (id == GIC_SPURIOUS_INTERRUPT) { return INTR_TYPE_INVAL; - + } return INTR_TYPE_NS; } @@ -142,8 +142,9 @@ uint32_t plat_interrupt_type_to_line(uint32_t type, assert(sec_state_is_valid(security_state)); /* Non-secure interrupts are signaled on the IRQ line always */ - if (type == INTR_TYPE_NS) + if (type == INTR_TYPE_NS) { return __builtin_ctz(SCR_IRQ_BIT); + } /* * Secure interrupts are signaled using the IRQ line if the FIQ is @@ -329,8 +330,9 @@ unsigned int plat_ic_get_interrupt_id(unsigned int raw) { unsigned int id = (raw & INT_ID_MASK); - if (id == GIC_SPURIOUS_INTERRUPT) + if (id == GIC_SPURIOUS_INTERRUPT) { id = INTR_ID_UNAVAILABLE; + } return id; } diff --git a/plat/common/plat_psci_common.c b/plat/common/plat_psci_common.c index 4cea0b9ae..72b79adb6 100644 --- a/plat/common/plat_psci_common.c +++ b/plat/common/plat_psci_common.c @@ -59,10 +59,11 @@ static u_register_t calc_stat_residency(unsigned long long pwrupts, residency_div = read_cntfrq_el0() / MHZ_TICKS_PER_SEC; assert(residency_div > 0U); - if (pwrupts < pwrdnts) + if (pwrupts < pwrdnts) { res = MAX_TS - pwrdnts + pwrupts; - else + } else { res = pwrupts - pwrdnts; + } return res / residency_div; } @@ -170,8 +171,9 @@ plat_local_state_t plat_get_target_pwr_state(unsigned int lvl, do { temp = *st; st++; - if (temp < target) + if (temp < target) { target = temp; + } n--; } while (n > 0U);