Skip to contentSkip to conversation

kernel/panic.c: remove CONFIG_PANIC_ON_OOPS_VALUE indirection

PATCH New Rasmus Villemoes 1 participant 1 message Mar 16, 2022 Library code

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kernel/panic.c: remove CONFIG_PANIC_ON_OOPS_VALUE indirection

We have the helper IS_ENABLED(). Use that instead of having an unnecessary hidden config option.

---
 kernel/panic.c    | 2 +-
 lib/Kconfig.debug | 6 ------
 2 files changed, 1 insertion(+), 7 deletions(-)
kernel/panic.c +1 -1
index 55b50e052ec3..304957f5b3c4 100644
@@ -46,7 +46,7 @@
 unsigned int __read_mostly sysctl_oops_all_cpu_backtrace;
 #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_GCC_PLUGIN_RANDSTRUCT) ? (1 << TAINT_RANDSTRUCT) : 0;
 static int pause_on_oops;
lib/Kconfig.debug +0 -6
index 14b89aa37c5c..40211c343a14 100644
@@ -995,12 +995,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
Signature · 1 line
2.31.1