Commit 7b4ec8dd7d4ac467e9eee4d49f2c9574d773efbb
Committed by
Rusty Russell
1 parent
74e22fac88
Exists in
master
and in
16 other branches
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: e0f244c63fc9 ("asmlinkage, module: Make ksymtab [...] __visible") Signed-off-by: Johannes Berg <johannes.berg@intel.com> Acked-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Showing 1 changed file with 1 additions and 0 deletions Side-by-side Diff
include/linux/export.h
... | ... | @@ -59,6 +59,7 @@ |
59 | 59 | static const char __kstrtab_##sym[] \ |
60 | 60 | __attribute__((section("__ksymtab_strings"), aligned(1))) \ |
61 | 61 | = VMLINUX_SYMBOL_STR(sym); \ |
62 | + extern const struct kernel_symbol __ksymtab_##sym; \ | |
62 | 63 | __visible const struct kernel_symbol __ksymtab_##sym \ |
63 | 64 | __used \ |
64 | 65 | __attribute__((section("___ksymtab" sec "+" #sym), unused)) \ |