script: modpost: emit a warning when the description is missing
PATCH v2 1/1 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.
--- scripts/mod/modpost.c | 4 ++++ 1 file changed, 4 insertions(+)
scripts/mod/modpost.c +4 -0
@@ -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);
Signature · 1 line
2.39.2
Quoted 16 lines · Vincenzo Palazzo
Emit a warning when the mod description is missed and only when the W=1 is enabled.
Reported-by Roland Kletzing <[email protected]>Signed-off-by Vincenzo Palazzo <[email protected]>--- scripts/mod/modpost.c | 4 ++++ 1 file changed, 4 insertions(+)scripts/mod/modpost.c +0
-0
scripts/mod/modpost.c static void read_symbols(const char *modname) · line 1832
Quoted 9 lines
scripts/mod/modpost.c +4
-0@@ -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);
Sorry for the delay.
Users need to do "make HOSTCFLAGS=-DWARN" to make it work, but nobody would do it.
I did a ground work:
https://patchwork.kernel.org/project/linux-kbuild/patch/[email protected]/
Then, you can do like this:
if (extra_warn && !get_modinfo(&info, "description"))
warn("missing MODULE_DESCRIPTION() in %s\n", modname);Quoted 3 lines
scripts/mod/modpost.c +0
-1--2.39.2
Signature · 2 lines
Best Regards Masahiro Yamada
Quoted 31 lines
Quoted 16 lines · Vincenzo Palazzo
Emit a warning when the mod description is missed and only when the W=1 is enabled.
Reported-by Roland Kletzing <[email protected]>Signed-off-by Vincenzo Palazzo <[email protected]>--- scripts/mod/modpost.c | 4 ++++ 1 file changed, 4 insertions(+)scripts/mod/modpost.c +0
-0scripts/mod/modpost.c static void read_symbols(const char *modname) · line 1832
Quoted 9 lines
scripts/mod/modpost.c +4
-0@@ -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);Sorry for the delay.
Quoted 7 lines
Users need to do "make HOSTCFLAGS=-DWARN" to make it work, but nobody would do it.
I did a ground work:
https://patchwork.kernel.org/project/linux-kbuild/patch/[email protected]/
Uh, thanks for doing this!
Quoted 7 lines
Then, you can do like this:
if (extra_warn && !get_modinfo(&info, "description")) warn("missing MODULE_DESCRIPTION() in %s\n", modname);
Do you preferer that I rebase on top of your patch? or just waiting that your patch will be in next?
Quoted 44 lines · Vincenzo Palazzo
Quoted 32 lines
Quoted 16 lines · Vincenzo Palazzo
Emit a warning when the mod description is missed and only when the W=1 is enabled.
Reported-by Roland Kletzing <[email protected]>Signed-off-by Vincenzo Palazzo <[email protected]>--- scripts/mod/modpost.c | 4 ++++ 1 file changed, 4 insertions(+)scripts/mod/modpost.c +0
-0scripts/mod/modpost.c static void read_symbols(const char *modname) · line 1832
Quoted 9 lines
scripts/mod/modpost.c +4
-0@@ -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);Sorry for the delay.
Quoted 7 lines
Users need to do "make HOSTCFLAGS=-DWARN" to make it work, but nobody would do it.
I did a ground work:
https://patchwork.kernel.org/project/linux-kbuild/patch/[email protected]/Uh, thanks for doing this!
Quoted 2 lines
Quoted 8 lines
Quoted 5 lines
Then, you can do like this:
if (extra_warn && !get_modinfo(&info, "description")) warn("missing MODULE_DESCRIPTION() in %s\n", modname);Do you preferer that I rebase on top of your patch? or just waiting that your patch will be in next?
Whichever. Your patch changes a different hunk,
so no merge conflict would happen anyway.
Signature · 2 lines
Best Regards Masahiro Yamada
Quoted 31 lines
Quoted 16 lines · Vincenzo Palazzo
Emit a warning when the mod description is missed and only when the W=1 is enabled.
Reported-by Roland Kletzing <[email protected]>Signed-off-by Vincenzo Palazzo <[email protected]>--- scripts/mod/modpost.c | 4 ++++ 1 file changed, 4 insertions(+)scripts/mod/modpost.c +0
-0scripts/mod/modpost.c static void read_symbols(const char *modname) · line 1832
Quoted 9 lines
scripts/mod/modpost.c +4
-0@@ -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);Sorry for the delay.
Quoted 2 lines
Users need to do "make HOSTCFLAGS=-DWARN" to make it work, but nobody would do it.
Ok coming on this with some more time while my machine is building, my code should work with the make W=1 (but the kernel do not work with the warnings enables)
I do not know if you was meaning another thing.
Quoted 10 lines
I did a ground work:
https://patchwork.kernel.org/project/linux-kbuild/patch/[email protected]/Then, you can do like this:
if (extra_warn && !get_modinfo(&info, "description")) warn("missing MODULE_DESCRIPTION() in %s\n", modname);
Preparing the version 3.
Vincent.