[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210510101951.028735728@linuxfoundation.org>
Date: Mon, 10 May 2021 12:18:38 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Christoph Hellwig <hch@....de>,
Jessica Yu <jeyu@...nel.org>
Subject: [PATCH 5.4 024/184] modules: mark ref_module static
From: Christoph Hellwig <hch@....de>
commit 7ef5264de773279b9f23b6cc8afb5addb30e970b upstream.
ref_module isn't used anywhere outside of module.c.
Signed-off-by: Christoph Hellwig <hch@....de>
Signed-off-by: Jessica Yu <jeyu@...nel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
include/linux/module.h | 1 -
kernel/module.c | 6 ++----
2 files changed, 2 insertions(+), 5 deletions(-)
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -636,7 +636,6 @@ static inline void __module_get(struct m
#define symbol_put_addr(p) do { } while (0)
#endif /* CONFIG_MODULE_UNLOAD */
-int ref_module(struct module *a, struct module *b);
/* This is a #define so the string doesn't get put in every .o file */
#define module_name(mod) \
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -867,7 +867,7 @@ static int add_module_usage(struct modul
}
/* Module a uses b: caller needs module_mutex() */
-int ref_module(struct module *a, struct module *b)
+static int ref_module(struct module *a, struct module *b)
{
int err;
@@ -886,7 +886,6 @@ int ref_module(struct module *a, struct
}
return 0;
}
-EXPORT_SYMBOL_GPL(ref_module);
/* Clear the unload stuff of the module. */
static void module_unload_free(struct module *mod)
@@ -1167,11 +1166,10 @@ static inline void module_unload_free(st
{
}
-int ref_module(struct module *a, struct module *b)
+static int ref_module(struct module *a, struct module *b)
{
return strong_try_module_get(b);
}
-EXPORT_SYMBOL_GPL(ref_module);
static inline int module_unload_init(struct module *mod)
{
Powered by blists - more mailing lists