From: Jeff Johnson <quic_jjohnson@quicinc.com>
To: Masahiro Yamada <masahiroy@kernel.org>,
Nathan Chancellor <nathan@kernel.org>,
Nicolas Schier <nicolas@fjasle.eu>,
Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
Cc: <linux-kbuild@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<kernel-janitors@vger.kernel.org>,
Jeff Johnson <quic_jjohnson@quicinc.com>
Subject: [PATCH] modpost: bypass module description test on vmlinux.o
Date: Fri, 7 Jun 2024 14:42:43 -0700 [thread overview]
Message-ID: <20240607-md-scripts-mod-v1-1-d3cd5a024f05@quicinc.com> (raw)
When building modules with W=1, modpost will warn if a module is
missing a MODULE_DESCRIPTION. Unfortunately, it also performs this
test on vmlinux.o:
WARNING: modpost: missing MODULE_DESCRIPTION() in vmlinux.o
Relocate the logic so that the test is not performed on vmlinux.o.
Fixes: 1fffe7a34c89 ("script: modpost: emit a warning when the description is missing")
Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com>
---
scripts/mod/modpost.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 937294ff164f..f48d72d22dc2 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -1647,10 +1647,11 @@ static void read_symbols(const char *modname)
namespace = get_next_modinfo(&info, "import_ns",
namespace);
}
+
+ if (extra_warn && !get_modinfo(&info, "description"))
+ warn("missing MODULE_DESCRIPTION() in %s\n", modname);
}
- if (extra_warn && !get_modinfo(&info, "description"))
- warn("missing MODULE_DESCRIPTION() in %s\n", modname);
for (sym = info.symtab_start; sym < info.symtab_stop; sym++) {
symname = remove_dot(info.strtab + sym->st_name);
---
base-commit: 19ca0d8a433ff37018f9429f7e7739e9f3d3d2b4
change-id: 20240607-md-scripts-mod-7f7ff091e02b
next reply other threads:[~2024-06-07 21:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-07 21:42 Jeff Johnson [this message]
2024-06-08 8:25 ` Nicolas Schier
2024-06-08 13:58 ` Jeff Johnson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240607-md-scripts-mod-v1-1-d3cd5a024f05@quicinc.com \
--to=quic_jjohnson@quicinc.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=masahiroy@kernel.org \
--cc=nathan@kernel.org \
--cc=nicolas@fjasle.eu \
--cc=vincenzopalazzodev@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®