Skip to content

Commit 7ef5264

Browse files
Christoph HellwigJessica Yu
authored andcommitted
modules: mark ref_module static
ref_module isn't used anywhere outside of module.c. Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Jessica Yu <[email protected]>
1 parent c6a8b84 commit 7ef5264

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

include/linux/module.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,6 @@ static inline void __module_get(struct module *module)
657657
#define symbol_put_addr(p) do { } while (0)
658658

659659
#endif /* CONFIG_MODULE_UNLOAD */
660-
int ref_module(struct module *a, struct module *b);
661660

662661
/* This is a #define so the string doesn't get put in every .o file */
663662
#define module_name(mod) \

kernel/module.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -869,7 +869,7 @@ static int add_module_usage(struct module *a, struct module *b)
869869
}
870870

871871
/* Module a uses b: caller needs module_mutex() */
872-
int ref_module(struct module *a, struct module *b)
872+
static int ref_module(struct module *a, struct module *b)
873873
{
874874
int err;
875875

@@ -888,7 +888,6 @@ int ref_module(struct module *a, struct module *b)
888888
}
889889
return 0;
890890
}
891-
EXPORT_SYMBOL_GPL(ref_module);
892891

893892
/* Clear the unload stuff of the module. */
894893
static void module_unload_free(struct module *mod)
@@ -1169,11 +1168,10 @@ static inline void module_unload_free(struct module *mod)
11691168
{
11701169
}
11711170

1172-
int ref_module(struct module *a, struct module *b)
1171+
static int ref_module(struct module *a, struct module *b)
11731172
{
11741173
return strong_try_module_get(b);
11751174
}
1176-
EXPORT_SYMBOL_GPL(ref_module);
11771175

11781176
static inline int module_unload_init(struct module *mod)
11791177
{

0 commit comments

Comments
 (0)