Skip to content

Commit 1fffe7a

Browse files
vincenzopalazzomasahir0y
authored andcommitted
script: modpost: emit a warning when the description is missing
Emit a warning when the mod description is missed and only when the W=1 is enabled. Reported-by: Roland Kletzing <[email protected]> Link: https://bugzilla.kernel.org/show_bug.cgi?id=10770 Signed-off-by: Vincenzo Palazzo <[email protected]> Tested-by: Nicolas Schier <[email protected]> Signed-off-by: Masahiro Yamada <[email protected]>
1 parent 8ae071f commit 1fffe7a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

scripts/mod/modpost.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1720,6 +1720,8 @@ static void read_symbols(const char *modname)
17201720
}
17211721
}
17221722

1723+
if (extra_warn && !get_modinfo(&info, "description"))
1724+
warn("missing MODULE_DESCRIPTION() in %s\n", modname);
17231725
for (sym = info.symtab_start; sym < info.symtab_stop; sym++) {
17241726
symname = remove_dot(info.strtab + sym->st_name);
17251727

0 commit comments

Comments
 (0)