diff options
author | Arnd Bergmann <arnd@arndb.de> | 2023-05-16 18:06:36 +0200 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2023-05-25 18:44:02 +0200 |
commit | b925b4314c9155b32d17e9dfda37d64c229063b7 (patch) | |
tree | 48cd2284f4e2bad075ba0eeb4abf46069f6159da /arch/arm64/kernel/traps.c | |
parent | arm64: efi: add efi_handle_corrupted_x18 prototype (diff) | |
download | linux-b925b4314c9155b32d17e9dfda37d64c229063b7.tar.xz linux-b925b4314c9155b32d17e9dfda37d64c229063b7.zip |
arm64: hide unused is_valid_bugaddr()
When generic BUG() support is disabled, this function has no declaration
and no callers but causes a W=1 warning:
arch/arm64/kernel/traps.c:950:5: error: no previous prototype for 'is_valid_bugaddr' [-Werror=missing-prototypes]
Add an #ifdef that matches the one around the declaration.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Kees Cook <keescook@chromium.org>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20230516160642.523862-10-arnd@kernel.org
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm64/kernel/traps.c')
-rw-r--r-- | arch/arm64/kernel/traps.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/arm64/kernel/traps.c b/arch/arm64/kernel/traps.c index 4bb1b8f47298..720d3780d8fd 100644 --- a/arch/arm64/kernel/traps.c +++ b/arch/arm64/kernel/traps.c @@ -947,7 +947,7 @@ void do_serror(struct pt_regs *regs, unsigned long esr) } /* GENERIC_BUG traps */ - +#ifdef CONFIG_GENERIC_BUG int is_valid_bugaddr(unsigned long addr) { /* @@ -959,6 +959,7 @@ int is_valid_bugaddr(unsigned long addr) */ return 1; } +#endif static int bug_handler(struct pt_regs *regs, unsigned long esr) { |