git: 6fdf04a2be9b - main - smp: Drop confusing braces and return statement as panic() is never returns.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 29 Jan 2023 12:38:18 UTC
The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=6fdf04a2be9b5b509c5b3d927e087122189ad1fb commit 6fdf04a2be9b5b509c5b3d927e087122189ad1fb Author: Dmitry Chagin <dchagin@FreeBSD.org> AuthorDate: 2023-01-29 12:33:16 +0000 Commit: Dmitry Chagin <dchagin@FreeBSD.org> CommitDate: 2023-01-29 12:33:16 +0000 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 --- 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 da5c7f52f955..44f3103ff2be 100644 --- a/sys/x86/x86/mp_x86.c +++ b/sys/x86/x86/mp_x86.c @@ -980,10 +980,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;