]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
panic: remove CONFIG_PANIC_ON_OOPS_VALUE
authorJohannes Berg <johannes.berg@intel.com>
Wed, 24 Sep 2025 09:43:04 +0000 (11:43 +0200)
committerAndrew Morton <akpm@linux-foundation.org>
Sun, 28 Sep 2025 18:36:13 +0000 (11:36 -0700)
There's really no need for this since it's 0 or 1 when
CONFIG_PANIC_ON_OOPS is disabled/enabled, so just use IS_ENABLED()
instead.  The extra symbol goes back to the original code adding it in
commit 2a01bb3885c9 ("panic: Make panic_on_oops configurable").

Link: https://lkml.kernel.org/r/20250924094303.18521-2-johannes@sipsolutions.net
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
kernel/panic.c
lib/Kconfig.debug

index ebd81c259fa91b74ee879e462ffc4bf6a15629a3..24cc3eec1805fec400f8639bda3ebeacda24e0ac 100644 (file)
@@ -53,7 +53,7 @@ static unsigned int __read_mostly sysctl_oops_all_cpu_backtrace;
 #define sysctl_oops_all_cpu_backtrace 0
 #endif /* CONFIG_SMP */
 
-int panic_on_oops = CONFIG_PANIC_ON_OOPS_VALUE;
+int panic_on_oops = IS_ENABLED(CONFIG_PANIC_ON_OOPS);
 static unsigned long tainted_mask =
        IS_ENABLED(CONFIG_RANDSTRUCT) ? (1 << TAINT_RANDSTRUCT) : 0;
 static int pause_on_oops;
index dc0e0c6ed075e98346c874ab6170640482e816f3..30761648e2de8bc7be3393d95f95fcca92295154 100644 (file)
@@ -1067,12 +1067,6 @@ config PANIC_ON_OOPS
 
          Say N if unsure.
 
-config PANIC_ON_OOPS_VALUE
-       int
-       range 0 1
-       default 0 if !PANIC_ON_OOPS
-       default 1 if PANIC_ON_OOPS
-
 config PANIC_TIMEOUT
        int "panic timeout"
        default 0