export: declare ksymtab symbols
PATCH 1/1 export: declare ksymtab symbols
From: Johannes Berg <[email protected]>
sparse complains about any __ksymtab symbols with the following:
warning: symbol '__ksymtab_...' was not declared. Should it be static?
due to Andi's patch making it non-static.
Mollify sparse by declaring the symbol extern, otherwise we get drowned in sparse warnings for anything that uses EXPORT_SYMBOL in the sources, making it easy to miss real warnings.
Cc Andi Kleen <[email protected]>
Signed-off-by Johannes Berg <[email protected]>
--- include/linux/export.h | 1 + 1 file changed, 1 insertion(+)
include/linux/export.h +1 -0
@@ -59,6 +59,7 @@ extern struct module __this_module; static const char __kstrtab_##sym[] \ __attribute__((section("__ksymtab_strings"), aligned(1))) \ = VMLINUX_SYMBOL_STR(sym); \ + extern const struct kernel_symbol __ksymtab_##sym; \ __visible const struct kernel_symbol __ksymtab_##sym \ __used \ __attribute__((section("___ksymtab" sec "+" #sym), unused)) \
Signature · 1 line
1.8.5.1
Quoted 2 lines
Cc Andi Kleen <[email protected]>Signed-off-by Johannes Berg <[email protected]>
Acked-by Andi Kleen <[email protected]>
-Andi
Rusty Russell
AppliedQuoted 4 lines · Andi Kleen
Quoted 2 lines
Cc Andi Kleen <[email protected]>Signed-off-by Johannes Berg <[email protected]>Acked-by Andi Kleen <[email protected]>
Thanks, applied.
I added:
Fixes e0f244c63fc9 ("asmlinkage, module: Make ksymtab [...] __visible")
Cheers,
Rusty.