From: Ingo Molnar Date: Thu, 15 May 2025 12:05:27 +0000 (+0200) Subject: x86/boot/e820: Remove pointless early_panic() indirection X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d214484f50f4c5dbab932b943b824a4c2920cb6e;p=thirdparty%2Fkernel%2Flinux.git x86/boot/e820: Remove pointless early_panic() indirection early_panic() is a pointless wrapper around panic(): static void __init early_panic(char *msg) { early_printk(msg); panic(msg); } panic() will already do a printk() of 'msg', and an early_printk() if earlyprintk is enabled. There's no need to print it separately. Remove the function. Signed-off-by: Ingo Molnar Cc: Andy Shevchenko Cc: Arnd Bergmann Cc: Borislav Petkov Cc: Juergen Gross Cc: "H . Peter Anvin" Cc: Kees Cook Cc: Linus Torvalds Cc: Mike Rapoport Cc: Paul Menzel Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: David Woodhouse Link: https://patch.msgid.link/20250515120549.2820541-12-mingo@kernel.org --- diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c index 037864890183d..6bc06860c6b06 100644 --- a/arch/x86/kernel/e820.c +++ b/arch/x86/kernel/e820.c @@ -893,12 +893,6 @@ unsigned long __init e820__end_of_low_ram_pfn(void) return e820__end_ram_pfn(1UL << (32 - PAGE_SHIFT)); } -static void __init early_panic(char *msg) -{ - early_printk(msg); - panic(msg); -} - static int userdef __initdata; /* The "mem=nopentium" boot option disables 4MB page tables on 32-bit kernels: */ @@ -1018,7 +1012,7 @@ void __init e820__finish_early_params(void) { if (userdef) { if (e820__update_table(e820_table) < 0) - early_panic("Invalid user supplied memory map"); + panic("Invalid user supplied memory map"); pr_info("user-defined physical RAM map:\n"); e820__print_table("user");