Skip to content

Commit d214484

Browse files
committed
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 <mingo@kernel.org> Cc: Andy Shevchenko <andy@kernel.org> Cc: Arnd Bergmann <arnd@kernel.org> Cc: Borislav Petkov <bp@alien8.de> Cc: Juergen Gross <jgross@suse.com> Cc: "H . Peter Anvin" <hpa@zytor.com> Cc: Kees Cook <keescook@chromium.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Mike Rapoport <rppt@kernel.org> Cc: Paul Menzel <pmenzel@molgen.mpg.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: David Woodhouse <dwmw@amazon.co.uk> Link: https://patch.msgid.link/20250515120549.2820541-12-mingo@kernel.org
1 parent eea78dc commit d214484

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

arch/x86/kernel/e820.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -893,12 +893,6 @@ unsigned long __init e820__end_of_low_ram_pfn(void)
893893
return e820__end_ram_pfn(1UL << (32 - PAGE_SHIFT));
894894
}
895895

896-
static void __init early_panic(char *msg)
897-
{
898-
early_printk(msg);
899-
panic(msg);
900-
}
901-
902896
static int userdef __initdata;
903897

904898
/* The "mem=nopentium" boot option disables 4MB page tables on 32-bit kernels: */
@@ -1018,7 +1012,7 @@ void __init e820__finish_early_params(void)
10181012
{
10191013
if (userdef) {
10201014
if (e820__update_table(e820_table) < 0)
1021-
early_panic("Invalid user supplied memory map");
1015+
panic("Invalid user supplied memory map");
10221016

10231017
pr_info("user-defined physical RAM map:\n");
10241018
e820__print_table("user");

0 commit comments

Comments
 (0)