public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] script: modpost: emit a warning when the description is missing
@ 2023-03-09 12:01 Vincenzo Palazzo
  2023-06-06 10:58 ` Masahiro Yamada
  0 siblings, 1 reply; 5+ messages in thread
From: Vincenzo Palazzo @ 2023-03-09 12:01 UTC (permalink / raw)
  To: linux-kbuild; +Cc: masahiroy, Vincenzo Palazzo, Roland Kletzing

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>
---
 scripts/mod/modpost.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index efff8078e395..433518dfc472 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -1824,6 +1824,10 @@ static void read_symbols(const char *modname)
 		}
 	}
 
+#ifdef WARN
+	if (!get_modinfo(&info, "description"))
+		warn("missing MODULE_DESCRIPTION() in %s\n", modname);
+#endif
 	for (sym = info.symtab_start; sym < info.symtab_stop; sym++) {
 		symname = remove_dot(info.strtab + sym->st_name);
 
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-06-15 23:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-09 12:01 [PATCH v2] script: modpost: emit a warning when the description is missing Vincenzo Palazzo
2023-06-06 10:58 ` Masahiro Yamada
2023-06-07 20:06   ` Vincenzo Palazzo
2023-06-08  0:42     ` Masahiro Yamada
2023-06-15 23:28   ` Vincenzo Palazzo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox