aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorVincenzo Palazzo2023-06-16 01:40:37 +0200
committerMasahiro Yamada2023-06-24 18:05:08 +0900
commit1fffe7a34c89b12b58f88b280bc10ce034477c3a (patch)
tree911eab934c94b4ef30022510370b137e45577973 /scripts
parent8ae071fc216a25f4f797f33c56857f4dd6b4408e (diff)
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 <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>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/mod/modpost.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 39cf43d61d51..983f507a47ad 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -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);