summaryrefslogtreecommitdiff
path: root/src/cpu/x86/lapic
diff options
context:
space:
mode:
authorLee Leahy <leroy.p.leahy@intel.com>2017-03-15 14:49:35 -0700
committerLee Leahy <leroy.p.leahy@intel.com>2017-03-16 04:11:45 +0100
commita15d8af140528df440617c074136d32be28e4976 (patch)
treefbf02e4957b11bb0e14bc53b1706d9346f668c88 /src/cpu/x86/lapic
parenta07d0ddc44a3460e8ce8b84d34335d230ab98906 (diff)
downloadcoreboot-a15d8af140528df440617c074136d32be28e4976.tar.xz
cpu/x86: Remove braces and else if unnecessary
Fix the following warnings detected by checkpatch.pl WARNING: braces {} are not necessary for single statement blocks WARNING: braces {} are not necessary for any arm of this statement WARNING: else is not generally useful after a break or return TEST=Build and run on Galileo Gen2 Change-Id: I2d6b22c66d52f5f2d24b15270ad4b52894adebc2 Signed-off-by: Lee Leahy <Leroy.P.Leahy@intel.com> Reviewed-on: https://review.coreboot.org/18842 Tested-by: build bot (Jenkins) Reviewed-by: Philippe Mathieu-Daudé <philippe.mathieu.daude@gmail.com> Reviewed-by: Martin Roth <martinroth@google.com>
Diffstat (limited to 'src/cpu/x86/lapic')
-rw-r--r--src/cpu/x86/lapic/lapic_cpu_init.c30
1 files changed, 10 insertions, 20 deletions
diff --git a/src/cpu/x86/lapic/lapic_cpu_init.c b/src/cpu/x86/lapic/lapic_cpu_init.c
index ff1a11438c..69710a29da 100644
--- a/src/cpu/x86/lapic/lapic_cpu_init.c
+++ b/src/cpu/x86/lapic/lapic_cpu_init.c
@@ -437,26 +437,22 @@ static void start_other_cpus(struct bus *cpu_bus, struct device *bsp_cpu)
/* Loop through the cpus once getting them started */
for (cpu = cpu_bus->children; cpu; cpu = cpu->sibling) {
- if (cpu->path.type != DEVICE_PATH_APIC) {
+ if (cpu->path.type != DEVICE_PATH_APIC)
continue;
- }
if (IS_ENABLED(CONFIG_PARALLEL_CPU_INIT) && (cpu == bsp_cpu))
continue;
- if (!cpu->enabled) {
+ if (!cpu->enabled)
continue;
- }
- if (cpu->initialized) {
+ if (cpu->initialized)
continue;
- }
- if (!start_cpu(cpu)) {
+ if (!start_cpu(cpu))
/* Record the error in cpu? */
printk(BIOS_ERR, "CPU 0x%02x would not start!\n",
cpu->path.apic.apic_id);
- }
if (!IS_ENABLED(CONFIG_PARALLEL_CPU_INIT))
udelay(10);
@@ -472,9 +468,8 @@ static void smm_other_cpus(struct bus *cpu_bus, device_t bsp_cpu)
/* Loop through the cpus once to let them run through SMM relocator */
for (cpu = cpu_bus->children; cpu; cpu = cpu->sibling) {
- if (cpu->path.type != DEVICE_PATH_APIC) {
+ if (cpu->path.type != DEVICE_PATH_APIC)
continue;
- }
printk(BIOS_ERR, "considering CPU 0x%02x for SMM init\n",
cpu->path.apic.apic_id);
@@ -482,15 +477,13 @@ static void smm_other_cpus(struct bus *cpu_bus, device_t bsp_cpu)
if (cpu == bsp_cpu)
continue;
- if (!cpu->enabled) {
+ if (!cpu->enabled)
continue;
- }
- if (!start_cpu(cpu)) {
+ if (!start_cpu(cpu))
/* Record the error in cpu? */
printk(BIOS_ERR, "CPU 0x%02x would not start!\n",
cpu->path.apic.apic_id);
- }
/* FIXME: endless loop */
while (atomic_read(&active_cpus) != pre_count);
@@ -518,16 +511,13 @@ static void wait_other_cpus_stop(struct bus *cpu_bus)
loopcount++;
}
for (cpu = cpu_bus->children; cpu; cpu = cpu->sibling) {
- if (cpu->path.type != DEVICE_PATH_APIC) {
+ if (cpu->path.type != DEVICE_PATH_APIC)
continue;
- }
- if (cpu->path.apic.apic_id == SPEEDSTEP_APIC_MAGIC) {
+ if (cpu->path.apic.apic_id == SPEEDSTEP_APIC_MAGIC)
continue;
- }
- if (!cpu->initialized) {
+ if (!cpu->initialized)
printk(BIOS_ERR, "CPU 0x%02x did not initialize!\n",
cpu->path.apic.apic_id);
- }
}
printk(BIOS_DEBUG, "All AP CPUs stopped (%ld loops)\n", loopcount);
checkstack(_estack, 0);