lkml.org 
[lkml]   [2022]   [Apr]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 12/27] modpost: move struct namespace_list to modpost.c
On Sun, Apr 24, 2022 at 12:09 PM Masahiro Yamada <masahiroy@kernel.org> wrote:
>
> 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.

Looks like modpost.h is included in:
- scripts/mod/sumversion.c
- scripts/mod/file2alias.c
- scripts/mod/modpost.c

But indeed, only modpost.c uses struct namespace_list.
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>

>
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> ---
>
> scripts/mod/modpost.c | 5 +++++
> scripts/mod/modpost.h | 5 -----
> 2 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
> index 4c074d6c1721..6f2748340746 100644
> --- a/scripts/mod/modpost.c
> +++ b/scripts/mod/modpost.c
> @@ -281,6 +281,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)
> {
> diff --git a/scripts/mod/modpost.h b/scripts/mod/modpost.h
> index 6a90bfc08458..2dbafbda9b0f 100644
> --- a/scripts/mod/modpost.h
> +++ b/scripts/mod/modpost.h
> @@ -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 list_head list;
> int gpl_compatible;
> --
> 2.32.0
>


--
Thanks,
~Nick Desaulniers

\
 
 \ /
  Last update: 2022-04-25 20:45    [W:0.382 / U:0.764 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site