Skip to content

Commit 1daf375

Browse files
jmberg-intelakpm00
authored andcommitted
panic: remove CONFIG_PANIC_ON_OOPS_VALUE
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 2a01bb3 ("panic: Make panic_on_oops configurable"). Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 8f45f08 commit 1daf375

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

kernel/panic.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ static unsigned int __read_mostly sysctl_oops_all_cpu_backtrace;
5353
#define sysctl_oops_all_cpu_backtrace 0
5454
#endif /* CONFIG_SMP */
5555

56-
int panic_on_oops = CONFIG_PANIC_ON_OOPS_VALUE;
56+
int panic_on_oops = IS_ENABLED(CONFIG_PANIC_ON_OOPS);
5757
static unsigned long tainted_mask =
5858
IS_ENABLED(CONFIG_RANDSTRUCT) ? (1 << TAINT_RANDSTRUCT) : 0;
5959
static int pause_on_oops;

lib/Kconfig.debug

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1067,12 +1067,6 @@ config PANIC_ON_OOPS
10671067

10681068
Say N if unsure.
10691069

1070-
config PANIC_ON_OOPS_VALUE
1071-
int
1072-
range 0 1
1073-
default 0 if !PANIC_ON_OOPS
1074-
default 1 if PANIC_ON_OOPS
1075-
10761070
config PANIC_TIMEOUT
10771071
int "panic timeout"
10781072
default 0

0 commit comments

Comments
 (0)