modpost: move struct namespace_list to modpost.c
authorMasahiro Yamada <masahiroy@kernel.org>
Sun, 24 Apr 2022 19:07:56 +0000 (04:07 +0900)
committerMasahiro Yamada <masahiroy@kernel.org>
Sat, 7 May 2022 18:17:00 +0000 (03:17 +0900)
There is no good reason to define struct namespace_list in modpost.h

struct module has pointers to struct namespace_list, but that does
not require the definition of struct namespace_list.

Move it to modpost.c.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
scripts/mod/modpost.c
scripts/mod/modpost.h

index f9cbb6b6b7a5069f28dad102e49f0aca4e53a2c1..689a342298091de175cef5a6c33d885f3e75c70b 100644 (file)
@@ -270,6 +270,11 @@ static struct symbol *find_symbol(const char *name)
        return NULL;
 }
 
+struct namespace_list {
+       struct namespace_list *next;
+       char namespace[];
+};
+
 static bool contains_namespace(struct namespace_list *list,
                               const char *namespace)
 {
index 0a940fd2e5c754f6ecf9cbad3a2199c698a060ca..7aed57fe793e1ee1659fbd63ae438ecdaa96a24e 100644 (file)
@@ -109,11 +109,6 @@ buf_printf(struct buffer *buf, const char *fmt, ...);
 void
 buf_write(struct buffer *buf, const char *s, int len);
 
-struct namespace_list {
-       struct namespace_list *next;
-       char namespace[];
-};
-
 struct module {
        struct module *next;
        int gpl_compatible;