]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
module: move 'struct module_use' to internal.h
authorThomas Weißschuh <thomas.weissschuh@linutronix.de>
Fri, 11 Jul 2025 13:31:36 +0000 (15:31 +0200)
committerDaniel Gomez <da.gomez@samsung.com>
Thu, 31 Jul 2025 11:40:46 +0000 (13:40 +0200)
The struct was moved to the public header file in commit c8e21ced08b3
("module: fix kdb's illicit use of struct module_use.").
Back then the structure was used outside of the module core.
Nowadays this is not true anymore, so the structure can be made internal.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Reviewed-by: Daniel Gomez <da.gomez@samsung.com>
Reviewed-by: Petr Pavlu <petr.pavlu@suse.com>
Link: https://lore.kernel.org/r/20250711-kunit-ifdef-modules-v2-1-39443decb1f8@linutronix.de
Signed-off-by: Daniel Gomez <da.gomez@samsung.com>
include/linux/module.h
kernel/module/internal.h

index a7cac01d95e7f38116af6f086f7593f6232e2d00..97c38e1cd37783170650b4a80de69af14e7115fd 100644 (file)
@@ -313,13 +313,6 @@ void *__symbol_get_gpl(const char *symbol);
                __used __section(".no_trim_symbol") = __stringify(x); \
        (typeof(&x))(__symbol_get(__stringify(x))); })
 
-/* modules using other modules: kdb wants to see this. */
-struct module_use {
-       struct list_head source_list;
-       struct list_head target_list;
-       struct module *source, *target;
-};
-
 enum module_state {
        MODULE_STATE_LIVE,      /* Normal state. */
        MODULE_STATE_COMING,    /* Full formed, running module_init. */
index 51ddd8866ef30a2ebb0306f0a58aaf5587d8bb85..618202578b428563b1e5697fd095255278c87668 100644 (file)
@@ -112,6 +112,13 @@ struct find_symbol_arg {
        enum mod_license license;
 };
 
+/* modules using other modules */
+struct module_use {
+       struct list_head source_list;
+       struct list_head target_list;
+       struct module *source, *target;
+};
+
 int mod_verify_sig(const void *mod, struct load_info *info);
 int try_to_force_load(struct module *mod, const char *reason);
 bool find_symbol(struct find_symbol_arg *fsa);