mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] panic: remove CONFIG_PANIC_ON_OOPS_VALUE
@ 2025-09-24  9:43 Johannes Berg
  0 siblings, 0 replies; only message in thread
From: Johannes Berg @ 2025-09-24  9:43 UTC (permalink / raw)
  To: linux-kernel; +Cc: Andrew Morton, Johannes Berg

From: Johannes Berg <johannes.berg@intel.com>

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").

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
Just caught my eye. No idea who should merge it or if
anyone cares.
---
 kernel/panic.c    | 2 +-
 lib/Kconfig.debug | 6 ------
 2 files changed, 1 insertion(+), 7 deletions(-)

diff --git a/kernel/panic.c b/kernel/panic.c
index 72fcbb5a071b..5b73fdd781e0 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -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;
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 49a1748b9f24..7f5e2490a3b7 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -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
-- 
2.51.0


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-09-24  9:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-24  9:43 [PATCH] panic: remove CONFIG_PANIC_ON_OOPS_VALUE Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®