mirror of
https://github.com/torvalds/linux.git
synced 2026-09-25 21:21:09 -04:00
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 <[email protected]> Reviewed-by: Kees Cook <[email protected]> Acked-by: Ard Biesheuvel <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Catalin Marinas <[email protected]>
This commit is contained in:
committed by
Catalin Marinas
parent
fbc0cd6f60
commit
b925b4314c
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user