Skip to content

Commit 1a3e4b4

Browse files
arndbbp3tk0v
authored andcommitted
x86/alternative: Add a __alt_reloc_selftest() prototype
The newly introduced selftest function causes a warning when -Wmissing-prototypes is enabled: arch/x86/kernel/alternative.c:1461:32: error: no previous prototype for '__alt_reloc_selftest' [-Werror=missing-prototypes] Since it's only used locally, add the prototype directly in front of it. Fixes: 270a69c ("x86/alternative: Support relocations in alternatives") Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Borislav Petkov (AMD) <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 6d33531 commit 1a3e4b4

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

arch/x86/kernel/alternative.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1531,6 +1531,7 @@ static noinline void __init int3_selftest(void)
15311531

15321532
static __initdata int __alt_reloc_selftest_addr;
15331533

1534+
extern void __init __alt_reloc_selftest(void *arg);
15341535
__visible noinline void __init __alt_reloc_selftest(void *arg)
15351536
{
15361537
WARN_ON(arg != &__alt_reloc_selftest_addr);

0 commit comments

Comments
 (0)