Skip to contentSkip to conversation

x86: alternative: add __alt_reloc_selftest prototype

PATCH New Arnd Bergmann 1 participant 1 message May 19, 2023 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86: alternative: add __alt_reloc_selftest prototype

From: Arnd Bergmann <[email protected]>

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 270a69c4485d ("x86/alternative: Support relocations in alternatives")
---
 arch/x86/kernel/alternative.c | 1 +
 1 file changed, 1 insertion(+)
arch/x86/kernel/alternative.c +1 -0
index 93aa95afd005..4338bd74b663 100644
@@ -1458,6 +1458,7 @@ static noinline void __init int3_selftest(void)
 
 static __initdata int __alt_reloc_selftest_addr;
 
+extern void __init __alt_reloc_selftest(void *arg);
 __visible noinline void __init __alt_reloc_selftest(void *arg)
 {
 	WARN_ON(arg != &__alt_reloc_selftest_addr);
Signature · 1 line
2.39.2