summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2009-11-25 13:16:26 +1100
committerStephen Rothwell <sfr@canb.auug.org.au>2009-11-25 13:16:26 +1100
commit34c6a3ab1f09f8ef0df7e961ad90ca350689af69 (patch)
tree41ba60516c653d43d67d82473f2086260bc57f24 /kernel
parente3463626ed46ee34f6fc59e0c71c38082a0f9280 (diff)
module:refactor_symbol_tables_and_try_to_reduce_code_size_of_each_symbol-fix2
Fix warning for CONFIG_MODVERSIONS=n: linux-next Maestro Stephen Rothwell reports: Today's linux-next build (i386 defconfig) produced this warning: kernel/module.c:1953: warning: 'crc_section_names' defined but not used Introduced by commit 67260d90118a2394df528fe4e37e814d950ca5b5 ("module: refactor symbol tables and try to reduce code size of each_symbol()"). This build has CONFIG_MODVERSIONS disabled. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/module.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/kernel/module.c b/kernel/module.c
index 7853dde64e87..eb26b95a909b 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -1037,6 +1037,16 @@ static int try_to_force_load(struct module *mod, const char *reason)
}
#ifdef CONFIG_MODVERSIONS
+static const char *crc_section_names[] = {
+ [EXPORT_TYPE_PLAIN] = "__kcrctab",
+ [EXPORT_TYPE_GPL] = "__kcrctab_gpl",
+#ifdef CONFIG_UNUSED_SYMBOLS
+ [EXPORT_TYPE_UNUSED] = "__kcrctab_unused",
+ [EXPORT_TYPE_UNUSED_GPL] = "__kcrctab_unused_gpl",
+#endif
+ [EXPORT_TYPE_GPL_FUTURE] = "__kcrctab_gpl_future",
+};
+
static int check_version(Elf_Shdr *sechdrs,
unsigned int versindex,
const char *symname,
@@ -2079,16 +2089,6 @@ static const char *export_section_names[] = {
[EXPORT_TYPE_GPL_FUTURE] = "__ksymtab_gpl_future",
};
-static const char *crc_section_names[] = {
- [EXPORT_TYPE_PLAIN] = "__kcrctab",
- [EXPORT_TYPE_GPL] = "__kcrctab_gpl",
-#ifdef CONFIG_UNUSED_SYMBOLS
- [EXPORT_TYPE_UNUSED] = "__kcrctab_unused",
- [EXPORT_TYPE_UNUSED_GPL] = "__kcrctab_unused_gpl",
-#endif
- [EXPORT_TYPE_GPL_FUTURE] = "__kcrctab_gpl_future",
-};
-
/* Allocate and load the module: note that size of section 0 is always
zero, and we rely on this for optional sections. */
static noinline struct module *load_module(void __user *umod,