From 39c13b3b84b34e0938220126c8f147d2b0b6ac89 Mon Sep 17 00:00:00 2001 From: Richard Braun Date: Fri, 9 Dec 2016 01:41:06 +0100 Subject: Force brackets around one-line conditional statements This change was done using astyle, with a few manual editing here and there. --- arch/x86/machine/lapic.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'arch/x86/machine/lapic.c') diff --git a/arch/x86/machine/lapic.c b/arch/x86/machine/lapic.c index 994aef6..26b0dd5 100644 --- a/arch/x86/machine/lapic.c +++ b/arch/x86/machine/lapic.c @@ -247,13 +247,15 @@ lapic_setup(uint32_t map_addr) lapic_map = vm_kmem_map_pa(map_addr, sizeof(*lapic_map), NULL, NULL); - if (lapic_map == NULL) + if (lapic_map == NULL) { panic("lapic: unable to map registers in kernel map"); + } value = lapic_read(&lapic_map->version); - if ((value & LAPIC_VERSION_MASK) != LAPIC_VERSION_MASK) + if ((value & LAPIC_VERSION_MASK) != LAPIC_VERSION_MASK) { panic("lapic: external local APIC not supported"); + } lapic_setup_registers(); lapic_setup_timer(); @@ -268,8 +270,9 @@ lapic_ap_setup(void) static void lapic_ipi(uint32_t apic_id, uint32_t icr) { - if ((icr & LAPIC_ICR_DEST_MASK) == 0) + if ((icr & LAPIC_ICR_DEST_MASK) == 0) { lapic_write(&lapic_map->icr_high, apic_id << LAPIC_DEST_SHIFT); + } lapic_write(&lapic_map->icr_low, icr & ~LAPIC_ICR_RESERVED); } -- cgit v1.2.3