Message ID | 20230615234037.244446-1-vincenzopalazzodev@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [v4] script: modpost: emit a warning when the description is missing | expand |
On Fri, Jun 16, 2023 at 01:40:37AM +0200, Vincenzo Palazzo wrote: > Emit a warning when the mod description is missed and only > when the W=1 is enabled. > > Based on top: https://patchwork.kernel.org/project/linux-kbuild/patch/20230606094159.1910369-1-masahiroy@kernel.org/ > > Sorry the version 3 is wrong, there is no reason > to wrap the if under the `W`. You probably wanted to put this paragraph below the trailer block (separated by another '---'). > > 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> > scripts/mod/modpost.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c > index d4531d09984d..0cdf8d655bd3 100644 > --- a/scripts/mod/modpost.c > +++ b/scripts/mod/modpost.c > @@ -1818,6 +1818,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); > > -- > 2.41.0 >
On Mon, Jun 19, 2023 at 9:47 PM Nicolas Schier <n.schier@avm.de> wrote: > > On Fri, Jun 16, 2023 at 01:40:37AM +0200, Vincenzo Palazzo wrote: > > Emit a warning when the mod description is missed and only > > when the W=1 is enabled. > > > > Based on top: https://patchwork.kernel.org/project/linux-kbuild/patch/20230606094159.1910369-1-masahiroy@kernel.org/ > > > > Sorry the version 3 is wrong, there is no reason > > to wrap the if under the `W`. > > You probably wanted to put this paragraph below the trailer block > (separated by another '---'). I removed this paragraph and applied to linux-kbuild. Thanks. > > > > 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> > > > > scripts/mod/modpost.c | 2 ++ > > 1 file changed, 2 insertions(+) > > > > diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c > > index d4531d09984d..0cdf8d655bd3 100644 > > --- a/scripts/mod/modpost.c > > +++ b/scripts/mod/modpost.c > > @@ -1818,6 +1818,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); > > > > -- > > 2.41.0 > >
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index d4531d09984d..0cdf8d655bd3 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -1818,6 +1818,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);
Emit a warning when the mod description is missed and only when the W=1 is enabled. Based on top: https://patchwork.kernel.org/project/linux-kbuild/patch/20230606094159.1910369-1-masahiroy@kernel.org/ Sorry the version 3 is wrong, there is no reason to wrap the if under the `W`. 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 | 2 ++ 1 file changed, 2 insertions(+)