Commit 7b4ec8dd authored by Johannes Berg's avatar Johannes Berg Committed by Rusty Russell

export: declare ksymtab symbols

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.

Fixes: e0f244c6 ("asmlinkage, module: Make ksymtab [...] __visible")
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Acked-by: default avatarAndi Kleen <ak@linux.intel.com>
Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
parent 74e22fac
...@@ -59,6 +59,7 @@ extern struct module __this_module; ...@@ -59,6 +59,7 @@ extern struct module __this_module;
static const char __kstrtab_##sym[] \ static const char __kstrtab_##sym[] \
__attribute__((section("__ksymtab_strings"), aligned(1))) \ __attribute__((section("__ksymtab_strings"), aligned(1))) \
= VMLINUX_SYMBOL_STR(sym); \ = VMLINUX_SYMBOL_STR(sym); \
extern const struct kernel_symbol __ksymtab_##sym; \
__visible const struct kernel_symbol __ksymtab_##sym \ __visible const struct kernel_symbol __ksymtab_##sym \
__used \ __used \
__attribute__((section("___ksymtab" sec "+" #sym), unused)) \ __attribute__((section("___ksymtab" sec "+" #sym), unused)) \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment