diff options
author | WANG Cong <xiyou.wangcong@gmail.com> | 2008-07-24 10:41:48 -0400 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2008-07-27 22:16:28 -0400 |
commit | 15bba37d62351749c3915add81f673b256952ee1 (patch) | |
tree | 4696ad74ea04df9f3b7091859225ecc123be7197 /kernel | |
parent | 837b41b5de356aa67abb2cadb5eef3efc7776f91 (diff) |
module: fix build warning with !CONFIG_KALLSYMS
This patch fixed the warning:
CC kernel/module.o
/home/wangcong/Projects/linux-2.6/kernel/module.c:332: warning:
‘lookup_symbol’ defined but not used
Signed-off-by: WANG Cong <wangcong@zeuux.org>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/module.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/kernel/module.c b/kernel/module.c index d8b5605132a0..d861bd5b8c10 100644 --- a/kernel/module.c +++ b/kernel/module.c | |||
@@ -325,18 +325,6 @@ static unsigned long find_symbol(const char *name, | |||
325 | return -ENOENT; | 325 | return -ENOENT; |
326 | } | 326 | } |
327 | 327 | ||
328 | /* lookup symbol in given range of kernel_symbols */ | ||
329 | static const struct kernel_symbol *lookup_symbol(const char *name, | ||
330 | const struct kernel_symbol *start, | ||
331 | const struct kernel_symbol *stop) | ||
332 | { | ||
333 | const struct kernel_symbol *ks = start; | ||
334 | for (; ks < stop; ks++) | ||
335 | if (strcmp(ks->name, name) == 0) | ||
336 | return ks; | ||
337 | return NULL; | ||
338 | } | ||
339 | |||
340 | /* Search for module by name: must hold module_mutex. */ | 328 | /* Search for module by name: must hold module_mutex. */ |
341 | static struct module *find_module(const char *name) | 329 | static struct module *find_module(const char *name) |
342 | { | 330 | { |
@@ -1703,6 +1691,19 @@ static void setup_modinfo(struct module *mod, Elf_Shdr *sechdrs, | |||
1703 | } | 1691 | } |
1704 | 1692 | ||
1705 | #ifdef CONFIG_KALLSYMS | 1693 | #ifdef CONFIG_KALLSYMS |
1694 | |||
1695 | /* lookup symbol in given range of kernel_symbols */ | ||
1696 | static const struct kernel_symbol *lookup_symbol(const char *name, | ||
1697 | const struct kernel_symbol *start, | ||
1698 | const struct kernel_symbol *stop) | ||
1699 | { | ||
1700 | const struct kernel_symbol *ks = start; | ||
1701 | for (; ks < stop; ks++) | ||
1702 | if (strcmp(ks->name, name) == 0) | ||
1703 | return ks; | ||
1704 | return NULL; | ||
1705 | } | ||
1706 | |||
1706 | static int is_exported(const char *name, const struct module *mod) | 1707 | static int is_exported(const char *name, const struct module *mod) |
1707 | { | 1708 | { |
1708 | if (!mod && lookup_symbol(name, __start___ksymtab, __stop___ksymtab)) | 1709 | if (!mod && lookup_symbol(name, __start___ksymtab, __stop___ksymtab)) |