> Andrew,
>
> This is what I plan to stick on top of your series. Let me know if
> you're OK with it.
Duh. And now for the real patch and not the dummy thing that was in my
sandbox...
M.
From 882ff4062169d5914ad7ed88c9138a90e485c05e Mon Sep 17 00:00:00 2001
From: Marc Zyngier <maz(a)kernel.org>
Date: Wed, 14 Apr 2021 17:41:14 +0100
Subject: [PATCH] bug: Provide dummy version of bug_get_file_line() when
!GENERIC_BUG
Provide the missing dummy bug_get_file_line() implementation when
GENENERIC_BUG isn't selected.
Oh, conditional in the Makefile...
Reported-by: kernel test robot <lkp(a)intel.com>
Fixes: 26dbc7e299c7 ("bug: Factor out a getter for a bug's file line")
Cc: Andrew Scull <ascull(a)google.com>
Signed-off-by: Marc Zyngier <maz(a)kernel.org>
---
include/linux/bug.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/include/linux/bug.h b/include/linux/bug.h
index e3841bee4c8d..d889ee043118 100644
--- a/include/linux/bug.h
+++ b/include/linux/bug.h
@@ -61,6 +61,12 @@ 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` is also an output argument so it might be worth zeroing even
though it shouldn't really be used if `file` is NULL. Otherwise,
thanks for catching!
> +}
>
> static inline void generic_bug_clear_once(void) {}
>
> --
> 2.30.2