mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] modpost: bypass module description test on vmlinux.o
@ 2024-06-07 21:42 Jeff Johnson
  2024-06-08  8:25 ` Nicolas Schier
  0 siblings, 1 reply; 3+ messages in thread
From: Jeff Johnson @ 2024-06-07 21:42 UTC (permalink / raw)
  To: Masahiro Yamada, Nathan Chancellor, Nicolas Schier, Vincenzo Palazzo
  Cc: linux-kbuild, linux-kernel, kernel-janitors, Jeff Johnson

When building modules with W=1, modpost will warn if a module is
missing a MODULE_DESCRIPTION. Unfortunately, it also performs this
test on vmlinux.o:

WARNING: modpost: missing MODULE_DESCRIPTION() in vmlinux.o

Relocate the logic so that the test is not performed on vmlinux.o.

Fixes: 1fffe7a34c89 ("script: modpost: emit a warning when the description is missing")
Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com>
---
 scripts/mod/modpost.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 937294ff164f..f48d72d22dc2 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -1647,10 +1647,11 @@ static void read_symbols(const char *modname)
 			namespace = get_next_modinfo(&info, "import_ns",
 						     namespace);
 		}
+
+		if (extra_warn && !get_modinfo(&info, "description"))
+			warn("missing MODULE_DESCRIPTION() in %s\n", 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);
 

---
base-commit: 19ca0d8a433ff37018f9429f7e7739e9f3d3d2b4
change-id: 20240607-md-scripts-mod-7f7ff091e02b


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

* Re: [PATCH] modpost: bypass module description test on vmlinux.o
  2024-06-07 21:42 [PATCH] modpost: bypass module description test on vmlinux.o Jeff Johnson
@ 2024-06-08  8:25 ` Nicolas Schier
  2024-06-08 13:58   ` Jeff Johnson
  0 siblings, 1 reply; 3+ messages in thread
From: Nicolas Schier @ 2024-06-08  8:25 UTC (permalink / raw)
  To: Jeff Johnson
  Cc: Masahiro Yamada, Nathan Chancellor, Vincenzo Palazzo,
	linux-kbuild, linux-kernel, kernel-janitors

On Fri, Jun 07, 2024 at 02:42:43PM -0700, Jeff Johnson wrote:
> When building modules with W=1, modpost will warn if a module is
> missing a MODULE_DESCRIPTION. Unfortunately, it also performs this
> test on vmlinux.o:
> 
> WARNING: modpost: missing MODULE_DESCRIPTION() in vmlinux.o
> 
> Relocate the logic so that the test is not performed on vmlinux.o.
> 
> Fixes: 1fffe7a34c89 ("script: modpost: emit a warning when the description is missing")
> Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com>
> ---

Hi Jeff,

you're a few hours too late:
https://lore.kernel.org/linux-kbuild/20240606183921.1128911-1-masahiroy@kernel.org/

Kind regards,
Nicolas



>  scripts/mod/modpost.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
> index 937294ff164f..f48d72d22dc2 100644
> --- a/scripts/mod/modpost.c
> +++ b/scripts/mod/modpost.c
> @@ -1647,10 +1647,11 @@ static void read_symbols(const char *modname)
>  			namespace = get_next_modinfo(&info, "import_ns",
>  						     namespace);
>  		}
> +
> +		if (extra_warn && !get_modinfo(&info, "description"))
> +			warn("missing MODULE_DESCRIPTION() in %s\n", 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);
>  
> 
> ---
> base-commit: 19ca0d8a433ff37018f9429f7e7739e9f3d3d2b4
> change-id: 20240607-md-scripts-mod-7f7ff091e02b
> 
> 

-- 
epost|xmpp: nicolas@fjasle.eu          irc://oftc.net/nsc
↳ gpg: 18ed 52db e34f 860e e9fb  c82b 7d97 0932 55a0 ce7f
     -- frykten for herren er opphav til kunnskap --

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

* Re: [PATCH] modpost: bypass module description test on vmlinux.o
  2024-06-08  8:25 ` Nicolas Schier
@ 2024-06-08 13:58   ` Jeff Johnson
  0 siblings, 0 replies; 3+ messages in thread
From: Jeff Johnson @ 2024-06-08 13:58 UTC (permalink / raw)
  To: Nicolas Schier
  Cc: Masahiro Yamada, Nathan Chancellor, Vincenzo Palazzo,
	linux-kbuild, linux-kernel, kernel-janitors

On 6/8/2024 1:25 AM, Nicolas Schier wrote:
> On Fri, Jun 07, 2024 at 02:42:43PM -0700, Jeff Johnson wrote:
>> When building modules with W=1, modpost will warn if a module is
>> missing a MODULE_DESCRIPTION. Unfortunately, it also performs this
>> test on vmlinux.o:
>>
>> WARNING: modpost: missing MODULE_DESCRIPTION() in vmlinux.o
>>
>> Relocate the logic so that the test is not performed on vmlinux.o.
>>
>> Fixes: 1fffe7a34c89 ("script: modpost: emit a warning when the description is missing")
>> Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com>
>> ---
> 
> Hi Jeff,
> 
> you're a few hours too late:
> https://lore.kernel.org/linux-kbuild/20240606183921.1128911-1-masahiroy@kernel.org/
> 

:)

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

end of thread, other threads:[~2024-06-08 13:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-07 21:42 [PATCH] modpost: bypass module description test on vmlinux.o Jeff Johnson
2024-06-08  8:25 ` Nicolas Schier
2024-06-08 13:58   ` Jeff Johnson

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

all inboxes | Powered by JetHome®