git: e600dd820db3 - stable/13 - smp: Drop confusing braces and return statement as panic() is never returns.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 06 Feb 2023 19:07:42 UTC
The branch stable/13 has been updated by dchagin:
URL: https://cgit.FreeBSD.org/src/commit/?id=e600dd820db343e87bb858e03988c31eb7e44b5e
commit e600dd820db343e87bb858e03988c31eb7e44b5e
Author: Dmitry Chagin <dchagin@FreeBSD.org>
AuthorDate: 2023-01-29 12:33:16 +0000
Commit: Dmitry Chagin <dchagin@FreeBSD.org>
CommitDate: 2023-02-06 19:06:30 +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
(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 a7aa508f7699..5ced8eb50479 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;