diff --git a/arch/arc/core/cache.c b/arch/arc/core/cache.c index 54fc76d8d45..4a44c27cf34 100644 --- a/arch/arc/core/cache.c +++ b/arch/arc/core/cache.c @@ -58,9 +58,9 @@ static int dcache_available(void) static void dcache_dc_ctrl(u32_t dcache_en_mask) { - if (!dcache_available()) - return; - _arc_v2_aux_reg_write(_ARC_V2_DC_CTRL, dcache_en_mask); + if (dcache_available()) { + _arc_v2_aux_reg_write(_ARC_V2_DC_CTRL, dcache_en_mask); + } } static void dcache_enable(void) @@ -107,8 +107,9 @@ static void dcache_flush_mlines(u32_t start_addr, u32_t size) /* wait for flush completion */ do { if ((_arc_v2_aux_reg_read(_ARC_V2_DC_CTRL) & - DC_CTRL_FLUSH_STATUS) == 0) + DC_CTRL_FLUSH_STATUS) == 0) { break; + } } while (1); start_addr += DCACHE_LINE_SIZE; } while (start_addr <= end_addr); diff --git a/arch/arc/core/irq_manage.c b/arch/arc/core/irq_manage.c index 2836e502e38..dc27c1e316e 100644 --- a/arch/arc/core/irq_manage.c +++ b/arch/arc/core/irq_manage.c @@ -100,8 +100,9 @@ void _irq_spurious(void *unused) { ARG_UNUSED(unused); printk("_irq_spurious(). Spinning...\n"); - for (;;) + for (;;) { ; + } } #ifdef CONFIG_DYNAMIC_INTERRUPTS diff --git a/arch/x86/core/float.c b/arch/x86/core/float.c index 34c8f9cac7b..b456867d1f7 100644 --- a/arch/x86/core/float.c +++ b/arch/x86/core/float.c @@ -208,8 +208,9 @@ void k_float_disable(struct k_thread *thread) _FpAccessDisable(); _kernel.current_fp = (struct k_thread *)0; } else { - if (_kernel.current_fp == thread) + if (_kernel.current_fp == thread) { _kernel.current_fp = (struct k_thread *)0; + } } irq_unlock(imask);