[-mm patch] make kernel/module.c:is_exported() static

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Apr 08, 2007 at 02:35:59PM -0700, Andrew Morton wrote:
>...
> Changes since 2.6.21-rc5-mm4:
>...
> +fix-race-between-rmmod-and-cat-proc-kallsyms.patch
>...
>  Misc
>...


is_exported() can now become static.

Signed-off-by: Adrian Bunk <[email protected]>

---

 include/linux/module.h |    7 -------
 kernel/module.c        |    2 +-
 2 files changed, 1 insertion(+), 8 deletions(-)

--- linux-2.6.21-rc6-mm1/include/linux/module.h.old	2007-04-10 01:04:03.000000000 +0200
+++ linux-2.6.21-rc6-mm1/include/linux/module.h	2007-04-10 01:05:09.000000000 +0200
@@ -382,8 +382,6 @@
 /* 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);
@@ -558,11 +556,6 @@
 	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 */
--- linux-2.6.21-rc6-mm1/kernel/module.c.old	2007-04-10 01:05:16.000000000 +0200
+++ linux-2.6.21-rc6-mm1/kernel/module.c	2007-04-10 01:05:36.000000000 +0200
@@ -1746,7 +1746,7 @@
 }
 
 #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;

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux