Skip to content

Commit

Permalink
script: modpost: emit a warning when the description is missing
Browse files Browse the repository at this point in the history
Emit a warning when the mod description is missed and only
when the W=1 is enabled.

Reported-by: Roland Kletzing <devzero@web.de>
Link: https://bugzilla.kernel.org/show_bug.cgi?id=10770
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
Tested-by: Nicolas Schier <n.schier@avm.de>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
  • Loading branch information
Vincenzo Palazzo authored and Masahiro Yamada committed Jun 24, 2023
1 parent 8ae071f commit 1fffe7a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions scripts/mod/modpost.c
Original file line number Diff line number Diff line change
Expand Up @@ -1720,6 +1720,8 @@ static void read_symbols(const char *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);

Expand Down

0 comments on commit 1fffe7a

Please sign in to comment.