From e600dd820db343e87bb858e03988c31eb7e44b5e Mon Sep 17 00:00:00 2001 From: Dmitry Chagin Date: Sun, 29 Jan 2023 15:33:16 +0300 Subject: [PATCH] smp: Drop confusing braces and return statement as panic() is never returns. Reviewed by: imp, kib Differential Revision: https://reviews.freebsd.org/D38235 MFC after: 1 week (cherry picked from commit 6fdf04a2be9b5b509c5b3d927e087122189ad1fb) --- sys/x86/x86/mp_x86.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/x86/x86/mp_x86.c b/sys/x86/x86/mp_x86.c index a7aa508f769..5ced8eb5047 100644 --- a/sys/x86/x86/mp_x86.c +++ b/sys/x86/x86/mp_x86.c @@ -983,10 +983,9 @@ void cpu_add(u_int apic_id, char boot_cpu) { - if (apic_id > max_apic_id) { + if (apic_id > max_apic_id) panic("SMP: APIC ID %d too high", apic_id); - return; - } + KASSERT(cpu_info[apic_id].cpu_present == 0, ("CPU %u added twice", apic_id)); cpu_info[apic_id].cpu_present = 1;