summaryrefslogtreecommitdiff
path: root/include/linux/bug.h
diff options
context:
space:
mode:
authorAndrew Scull <ascull@google.com>2021-03-18 17:33:08 +0300
committerMarc Zyngier <maz@kernel.org>2021-04-01 11:54:37 +0300
commit26dbc7e299c7ebbb6a95e2c620b21b5280b37c57 (patch)
tree05f06cc724e5d23532b59b9a357b37e72b735640 /include/linux/bug.h
parent3ad1a6cb0abc63d036fc866bd7c2c5983516dec5 (diff)
downloadlinux-26dbc7e299c7ebbb6a95e2c620b21b5280b37c57.tar.xz
bug: Factor out a getter for a bug's file line
There is some non-trivial config-based logic to get the file name and line number associated with a bug. Factor this out to a getter that can be resused. 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-3-ascull@google.com
Diffstat (limited to 'include/linux/bug.h')
-rw-r--r--include/linux/bug.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/bug.h b/include/linux/bug.h
index f639bd0122f3..e3841bee4c8d 100644
--- a/include/linux/bug.h
+++ b/include/linux/bug.h
@@ -36,6 +36,9 @@ static inline int is_warning_bug(const struct bug_entry *bug)
return bug->flags & BUGFLAG_WARNING;
}
+void bug_get_file_line(struct bug_entry *bug, const char **file,
+ unsigned int *line);
+
struct bug_entry *find_bug(unsigned long bugaddr);
enum bug_trap_type report_bug(unsigned long bug_addr, struct pt_regs *regs);