bug: Provide dummy version of bug_get_file_line() when !GENERIC_BUG
authorMarc Zyngier <maz@kernel.org>
Wed, 14 Apr 2021 16:41:14 +0000 (17:41 +0100)
committerMarc Zyngier <maz@kernel.org>
Thu, 15 Apr 2021 16:04:24 +0000 (17:04 +0100)
Provide the missing dummy bug_get_file_line() implementation when
GENENERIC_BUG isn't selected.

Reported-by: kernel test robot <lkp@intel.com>
Fixes: 26dbc7e299c7 ("bug: Factor out a getter for a bug's file line")
Cc: Andrew Scull <ascull@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
include/linux/bug.h

index e3841bee4c8d52b619ddd1b59d436af4e4b9d5c3..348acf2558f3c1a6d6cecc6382a7561721efaabf 100644 (file)
@@ -61,6 +61,13 @@ static inline enum bug_trap_type report_bug(unsigned long bug_addr,
        return BUG_TRAP_TYPE_BUG;
 }
 
+struct bug_entry;
+static inline void bug_get_file_line(struct bug_entry *bug, const char **file,
+                                    unsigned int *line)
+{
+       *file = NULL;
+       *line = 0;
+}
 
 static inline void generic_bug_clear_once(void) {}