From: Johannes Berg Date: Wed, 15 Jan 2014 23:48:48 +0000 (+1030) Subject: export: declare ksymtab symbols X-Git-Tag: v3.13.6~90 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=19d23c2d3828f46adc452a241cafee5178108ff6;p=thirdparty%2Fkernel%2Fstable.git export: declare ksymtab symbols commit 7b4ec8dd7d4ac467e9eee4d49f2c9574d773efbb upstream. 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 Acked-by: Andi Kleen Signed-off-by: Rusty Russell Signed-off-by: Greg Kroah-Hartman --- diff --git a/include/linux/export.h b/include/linux/export.h index 3f2793d51899c..96e45ea463e71 100644 --- a/include/linux/export.h +++ b/include/linux/export.h @@ -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)) \