diff options
author | Tiezhu Yang <[email protected]> | 2020-08-11 18:36:46 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2020-08-12 10:58:01 -0700 |
commit | 79076e1241bb3bf02d0aac7d39120d8161fe07b1 (patch) | |
tree | ba51eeb847b8a46c7dbfbac26bda55b01b73e94c | |
parent | d71375499d7b0a954e3012d4e16ccad3f28e3d1c (diff) |
kernel/panic.c: make oops_may_print() return bool
The return value of oops_may_print() is true or false, so change its type
to reflect that.
Signed-off-by: Tiezhu Yang <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Reviewed-by: Kees Cook <[email protected]>
Cc: Xuefeng Li <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r-- | include/linux/kernel.h | 2 | ||||
-rw-r--r-- | kernel/panic.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 92517ae53e7c..211005163682 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -322,7 +322,7 @@ void nmi_panic(struct pt_regs *regs, const char *msg); extern void oops_enter(void); extern void oops_exit(void); void print_oops_end_marker(void); -extern int oops_may_print(void); +extern bool oops_may_print(void); void do_exit(long error_code) __noreturn; void complete_and_exit(struct completion *, long) __noreturn; diff --git a/kernel/panic.c b/kernel/panic.c index e2157ca387c8..93ba061d1c79 100644 --- a/kernel/panic.c +++ b/kernel/panic.c @@ -505,7 +505,7 @@ static void do_oops_enter_exit(void) * Return true if the calling CPU is allowed to print oops-related info. * This is a bit racy.. */ -int oops_may_print(void) +bool oops_may_print(void) { return pause_on_oops_flag == 0; } |