Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit 9185afe

Browse files
committed
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: 1fffe7a ("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>
1 parent 96c9656 commit 9185afe

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

scripts/mod/modpost.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1647,10 +1647,11 @@ static void read_symbols(const char *modname)
16471647
namespace = get_next_modinfo(&info, "import_ns",
16481648
namespace);
16491649
}
1650+
1651+
if (extra_warn && !get_modinfo(&info, "description"))
1652+
warn("missing MODULE_DESCRIPTION() in %s\n", modname);
16501653
}
16511654

1652-
if (extra_warn && !get_modinfo(&info, "description"))
1653-
warn("missing MODULE_DESCRIPTION() in %s\n", modname);
16541655
for (sym = info.symtab_start; sym < info.symtab_stop; sym++) {
16551656
symname = remove_dot(info.strtab + sym->st_name);
16561657

0 commit comments

Comments
 (0)