lkml.org 
[lkml]   [2022]   [Apr]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 12/27] modpost: move struct namespace_list to modpost.c
Date
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>
---

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
\
 
 \ /
  Last update: 2022-04-24 21:12    [W:0.892 / U:15.308 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site