[PATCH] fixup: panic: clean up message about deprecated 'panic_print' parameter

From: Lance Yang
Date: Wed Aug 20 2025 - 05:25:31 EST


Reported-by: kernel test robot <lkp@xxxxxxxxx>
Closes: https://lore.kernel.org/oe-kbuild-all/202508200907.PsZ3geub-lkp@xxxxxxxxx/
Signed-off-by: Lance Yang <lance.yang@xxxxxxxxx>
Reviewed-by: Petr Mladek <pmladek@xxxxxxxx>
---
kernel/panic.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/kernel/panic.c b/kernel/panic.c
index d3907fd95d72..24bca263f896 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -77,6 +77,11 @@ ATOMIC_NOTIFIER_HEAD(panic_notifier_list);

EXPORT_SYMBOL(panic_notifier_list);

+static void panic_print_deprecated(void)
+{
+ pr_info_once("Kernel: The 'panic_print' parameter is now deprecated. Please use 'panic_sys_info' and 'panic_console_replay' instead.\n");
+}
+
#ifdef CONFIG_SYSCTL

/*
@@ -122,11 +127,6 @@ static int proc_taint(const struct ctl_table *table, int write,
return err;
}

-static void panic_print_deprecated(void)
-{
- pr_info_once("Kernel: The 'panic_print' parameter is now deprecated. Please use 'panic_sys_info' and 'panic_console_replay' instead.\n");
-}
-
static int sysctl_panic_print_handler(const struct ctl_table *table, int write,
void *buffer, size_t *lenp, loff_t *ppos)
{
--
2.50.1