From: Adrian Bunk is_exported() can now become static. Signed-off-by: Adrian Bunk Cc: Alexey Dobriyan Signed-off-by: Andrew Morton --- include/linux/module.h | 7 ------- kernel/module.c | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) diff -puN include/linux/module.h~fix-race-between-rmmod-and-cat-proc-kallsyms-fix include/linux/module.h --- a/include/linux/module.h~fix-race-between-rmmod-and-cat-proc-kallsyms-fix +++ a/include/linux/module.h @@ -379,8 +379,6 @@ int module_get_kallsym(unsigned int symn /* Look for this name: can be of form module:name. */ unsigned long module_kallsyms_lookup_name(const char *name); -int is_exported(const char *name, const struct module *mod); - extern void __module_put_and_exit(struct module *mod, long code) __attribute__((noreturn)); #define module_put_and_exit(code) __module_put_and_exit(THIS_MODULE, code); @@ -542,11 +540,6 @@ static inline unsigned long module_kalls return 0; } -static inline int is_exported(const char *name, const struct module *mod) -{ - return 0; -} - static inline int register_module_notifier(struct notifier_block * nb) { /* no events will happen anyway, so this can always succeed */ diff -puN kernel/module.c~fix-race-between-rmmod-and-cat-proc-kallsyms-fix kernel/module.c --- a/kernel/module.c~fix-race-between-rmmod-and-cat-proc-kallsyms-fix +++ a/kernel/module.c @@ -1547,7 +1547,7 @@ static void setup_modinfo(struct module } #ifdef CONFIG_KALLSYMS -int is_exported(const char *name, const struct module *mod) +static int is_exported(const char *name, const struct module *mod) { if (!mod && lookup_symbol(name, __start___ksymtab, __stop___ksymtab)) return 1; _