summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2024-06-06 20:36:12 +0200
committerMasahiro Yamada <masahiroy@kernel.org>2024-06-07 01:42:31 +0200
commit9185afeac2a3dcce8300a5684291a43c2838cfd6 (patch)
tree0ee5a974fa62a682673a5fc321b2ee8cf9285103 /scripts
parentkbuild: explicitly run mksysmap as sed script from link-vmlinux.sh (diff)
downloadlinux-9185afeac2a3dcce8300a5684291a43c2838cfd6.tar.xz
linux-9185afeac2a3dcce8300a5684291a43c2838cfd6.zip
modpost: do not warn about missing MODULE_DESCRIPTION() for vmlinux.o
Building with W=1 incorrectly emits the following warning: WARNING: modpost: missing MODULE_DESCRIPTION() in vmlinux.o This check should apply only to modules. Fixes: 1fffe7a34c89 ("script: modpost: emit a warning when the description is missing") Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Reviewed-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/mod/modpost.c5
1 files 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);