mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
bug: Remove redundant condition check in report_bug
report_bug() will return early if it cannot find a bug corresponding to
the provided address. The subsequent test for the bug will always be
true so remove it.
Fixes: 1b4cfe3c0a
("lib/bug.c: exclude non-BUG/WARN exceptions from report_bug()")
Signed-off-by: Andrew Scull <ascull@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: "Steven Rostedt (VMware)" <rostedt@goodmis.org>
Reviewed-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Acked-by: Will Deacon <will@kernel.org>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20210318143311.839894-2-ascull@google.com
This commit is contained in:
parent
1e28eed176
commit
3ad1a6cb0a
1 changed files with 13 additions and 16 deletions
|
@ -155,9 +155,7 @@ enum bug_trap_type report_bug(unsigned long bugaddr, struct pt_regs *regs)
|
|||
|
||||
file = NULL;
|
||||
line = 0;
|
||||
warning = 0;
|
||||
|
||||
if (bug) {
|
||||
#ifdef CONFIG_DEBUG_BUGVERBOSE
|
||||
#ifndef CONFIG_GENERIC_BUG_RELATIVE_POINTERS
|
||||
file = bug->file;
|
||||
|
@ -179,7 +177,6 @@ enum bug_trap_type report_bug(unsigned long bugaddr, struct pt_regs *regs)
|
|||
*/
|
||||
bug->flags |= BUGFLAG_DONE;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* BUG() and WARN_ON() families don't print a custom debug message
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue