mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] script: modpost: require a MODULE_DESCRIPTION()
@ 2025-03-11 19:49 Jeff Johnson
  2025-03-11 19:54 ` Jeff Johnson
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Jeff Johnson @ 2025-03-11 19:49 UTC (permalink / raw)
  To: Masahiro Yamada, Nathan Chancellor, Nicolas Schier, Arnd Bergmann
  Cc: linux-kbuild, linux-kernel, Jeff Johnson

Since commit 1fffe7a34c89 ("script: modpost: emit a warning when the
description is missing"), a module without a MODULE_DESCRIPTION() has
resulted in a warning with make W=1. Since that time, all known
instances of this issue have been fixed. Therefore, now make it an
error if a MODULE_DESCRIPTION() is not present.

Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
---
did my treewide cleanup for v6.11, Arnd had a few more stragglers that
he was going to fix. I hope that by posting, some of the 0-day bots
will pick it up and hopefully provide some feedback.

Note: I'm not really sure if *all* of these have been fixed. After I
---
 scripts/mod/modpost.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index c35d22607978..c0b7a869ed24 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -1596,8 +1596,8 @@ static void read_symbols(const char *modname)
 						     namespace);
 		}
 
-		if (extra_warn && !get_modinfo(&info, "description"))
-			warn("missing MODULE_DESCRIPTION() in %s\n", modname);
+		if (!get_modinfo(&info, "description"))
+			error("missing MODULE_DESCRIPTION() in %s\n", modname);
 	}
 
 	for (sym = info.symtab_start; sym < info.symtab_stop; sym++) {

---
base-commit: 4d872d51bc9d7b899c1f61534e3dbde72613f627
change-id: 20250311-moddesc-error-2ad949dcc6ba


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

* Re: [PATCH] script: modpost: require a MODULE_DESCRIPTION()
  2025-03-11 19:49 [PATCH] script: modpost: require a MODULE_DESCRIPTION() Jeff Johnson
@ 2025-03-11 19:54 ` Jeff Johnson
  2025-03-13  0:34 ` Masahiro Yamada
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 8+ messages in thread
From: Jeff Johnson @ 2025-03-11 19:54 UTC (permalink / raw)
  To: Masahiro Yamada, Nathan Chancellor, Nicolas Schier, Arnd Bergmann
  Cc: linux-kbuild, linux-kernel

On 3/11/2025 12:49 PM, Jeff Johnson wrote:
> Since commit 1fffe7a34c89 ("script: modpost: emit a warning when the
> description is missing"), a module without a MODULE_DESCRIPTION() has
> resulted in a warning with make W=1. Since that time, all known
> instances of this issue have been fixed. Therefore, now make it an
> error if a MODULE_DESCRIPTION() is not present.
> 
> Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
> ---
> did my treewide cleanup for v6.11, Arnd had a few more stragglers that
> he was going to fix. I hope that by posting, some of the 0-day bots
> will pick it up and hopefully provide some feedback.
> 
> Note: I'm not really sure if *all* of these have been fixed. After I

guess I should have done another 'b4 send --reflect' after I modified my cover
letter <blush>

Pretend this line is immediately after the cut


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

* Re: [PATCH] script: modpost: require a MODULE_DESCRIPTION()
  2025-03-11 19:49 [PATCH] script: modpost: require a MODULE_DESCRIPTION() Jeff Johnson
  2025-03-11 19:54 ` Jeff Johnson
@ 2025-03-13  0:34 ` Masahiro Yamada
  2025-03-22 15:45   ` Masahiro Yamada
  2025-04-06 15:23 ` Guenter Roeck
  2025-04-06 15:59 ` Guenter Roeck
  3 siblings, 1 reply; 8+ messages in thread
From: Masahiro Yamada @ 2025-03-13  0:34 UTC (permalink / raw)
  To: Jeff Johnson
  Cc: Nathan Chancellor, Nicolas Schier, Arnd Bergmann, linux-kbuild,
	linux-kernel

On Wed, Mar 12, 2025 at 4:49 AM Jeff Johnson
<jeff.johnson@oss.qualcomm.com> wrote:
>
> Since commit 1fffe7a34c89 ("script: modpost: emit a warning when the
> description is missing"), a module without a MODULE_DESCRIPTION() has
> resulted in a warning with make W=1. Since that time, all known
> instances of this issue have been fixed. Therefore, now make it an
> error if a MODULE_DESCRIPTION() is not present.
>
> Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
> ---
> did my treewide cleanup for v6.11, Arnd had a few more stragglers that
> he was going to fix. I hope that by posting, some of the 0-day bots
> will pick it up and hopefully provide some feedback.


I pushed this patch to a separate branch,
so that 0day bot can compile-test it.

If there is no error reported, I will move it to
the for-next branch.




> Note: I'm not really sure if *all* of these have been fixed. After I
> ---
>  scripts/mod/modpost.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
> index c35d22607978..c0b7a869ed24 100644
> --- a/scripts/mod/modpost.c
> +++ b/scripts/mod/modpost.c
> @@ -1596,8 +1596,8 @@ static void read_symbols(const char *modname)
>                                                      namespace);
>                 }
>
> -               if (extra_warn && !get_modinfo(&info, "description"))
> -                       warn("missing MODULE_DESCRIPTION() in %s\n", modname);
> +               if (!get_modinfo(&info, "description"))
> +                       error("missing MODULE_DESCRIPTION() in %s\n", modname);
>         }
>
>         for (sym = info.symtab_start; sym < info.symtab_stop; sym++) {
>
> ---
> base-commit: 4d872d51bc9d7b899c1f61534e3dbde72613f627
> change-id: 20250311-moddesc-error-2ad949dcc6ba
>


-- 
Best Regards
Masahiro Yamada

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

* Re: [PATCH] script: modpost: require a MODULE_DESCRIPTION()
  2025-03-13  0:34 ` Masahiro Yamada
@ 2025-03-22 15:45   ` Masahiro Yamada
  0 siblings, 0 replies; 8+ messages in thread
From: Masahiro Yamada @ 2025-03-22 15:45 UTC (permalink / raw)
  To: Jeff Johnson
  Cc: Nathan Chancellor, Nicolas Schier, Arnd Bergmann, linux-kbuild,
	linux-kernel

On Thu, Mar 13, 2025 at 9:34 AM Masahiro Yamada <masahiroy@kernel.org> wrote:
>
> On Wed, Mar 12, 2025 at 4:49 AM Jeff Johnson
> <jeff.johnson@oss.qualcomm.com> wrote:
> >
> > Since commit 1fffe7a34c89 ("script: modpost: emit a warning when the
> > description is missing"), a module without a MODULE_DESCRIPTION() has
> > resulted in a warning with make W=1. Since that time, all known
> > instances of this issue have been fixed. Therefore, now make it an
> > error if a MODULE_DESCRIPTION() is not present.
> >
> > Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
> > ---
> > did my treewide cleanup for v6.11, Arnd had a few more stragglers that
> > he was going to fix. I hope that by posting, some of the 0-day bots
> > will pick it up and hopefully provide some feedback.
>
>
> I pushed this patch to a separate branch,
> so that 0day bot can compile-test it.
>
> If there is no error reported, I will move it to
> the for-next branch.

I have not got any build error report.
Moved to for-next.



-- 
Best Regards
Masahiro Yamada

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

* Re: [PATCH] script: modpost: require a MODULE_DESCRIPTION()
  2025-03-11 19:49 [PATCH] script: modpost: require a MODULE_DESCRIPTION() Jeff Johnson
  2025-03-11 19:54 ` Jeff Johnson
  2025-03-13  0:34 ` Masahiro Yamada
@ 2025-04-06 15:23 ` Guenter Roeck
  2025-04-06 15:59 ` Guenter Roeck
  3 siblings, 0 replies; 8+ messages in thread
From: Guenter Roeck @ 2025-04-06 15:23 UTC (permalink / raw)
  To: Jeff Johnson
  Cc: Masahiro Yamada, Nathan Chancellor, Nicolas Schier,
	Arnd Bergmann, linux-kbuild, linux-kernel

On Tue, Mar 11, 2025 at 12:49:02PM -0700, Jeff Johnson wrote:
> Since commit 1fffe7a34c89 ("script: modpost: emit a warning when the
> description is missing"), a module without a MODULE_DESCRIPTION() has
> resulted in a warning with make W=1. Since that time, all known
> instances of this issue have been fixed. Therefore, now make it an
> error if a MODULE_DESCRIPTION() is not present.
> 
> Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
> ---
> did my treewide cleanup for v6.11, Arnd had a few more stragglers that
> he was going to fix. I hope that by posting, some of the 0-day bots
> will pick it up and hopefully provide some feedback.
> 
> Note: I'm not really sure if *all* of these have been fixed. After I

ERROR: modpost: missing MODULE_DESCRIPTION() in drivers/fpga/tests/fpga-mgr-test.o
ERROR: modpost: missing MODULE_DESCRIPTION() in drivers/fpga/tests/fpga-bridge-test.o
ERROR: modpost: missing MODULE_DESCRIPTION() in drivers/fpga/tests/fpga-region-test.o

I am going to disable the affected code in my tests.

Guenter

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

* Re: [PATCH] script: modpost: require a MODULE_DESCRIPTION()
  2025-03-11 19:49 [PATCH] script: modpost: require a MODULE_DESCRIPTION() Jeff Johnson
                   ` (2 preceding siblings ...)
  2025-04-06 15:23 ` Guenter Roeck
@ 2025-04-06 15:59 ` Guenter Roeck
  2025-04-06 16:06   ` Arnd Bergmann
  3 siblings, 1 reply; 8+ messages in thread
From: Guenter Roeck @ 2025-04-06 15:59 UTC (permalink / raw)
  To: Jeff Johnson
  Cc: Masahiro Yamada, Nathan Chancellor, Nicolas Schier,
	Arnd Bergmann, linux-kbuild, linux-kernel

On Tue, Mar 11, 2025 at 12:49:02PM -0700, Jeff Johnson wrote:
> Since commit 1fffe7a34c89 ("script: modpost: emit a warning when the
> description is missing"), a module without a MODULE_DESCRIPTION() has
> resulted in a warning with make W=1. Since that time, all known
> instances of this issue have been fixed. Therefore, now make it an
> error if a MODULE_DESCRIPTION() is not present.
> 
> Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
> ---
> did my treewide cleanup for v6.11, Arnd had a few more stragglers that
> he was going to fix. I hope that by posting, some of the 0-day bots
> will pick it up and hopefully provide some feedback.
> 
> Note: I'm not really sure if *all* of these have been fixed. After I

FWIW, I ran

for f in $(find . -name '*.c'); do grep -q MODULE_LICENSE $f && (grep -q MODULE_DESCRIPTION $f || echo $f); done

That reports a large number of files (111, to be exact) with MODULE_LICENSE
but not MODULE_DESCRIPTION. I cross-checked a few, and found that many can
be built as module. The fall-out from this patch might be interesting.

Guenter

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

* Re: [PATCH] script: modpost: require a MODULE_DESCRIPTION()
  2025-04-06 15:59 ` Guenter Roeck
@ 2025-04-06 16:06   ` Arnd Bergmann
  2025-04-06 17:06     ` Guenter Roeck
  0 siblings, 1 reply; 8+ messages in thread
From: Arnd Bergmann @ 2025-04-06 16:06 UTC (permalink / raw)
  To: Guenter Roeck, Jeff Johnson
  Cc: Masahiro Yamada, Nathan Chancellor, Nicolas Schier, linux-kbuild,
	linux-kernel

On Sun, Apr 6, 2025, at 17:59, Guenter Roeck wrote:
> On Tue, Mar 11, 2025 at 12:49:02PM -0700, Jeff Johnson wrote:
>> Since commit 1fffe7a34c89 ("script: modpost: emit a warning when the
>> description is missing"), a module without a MODULE_DESCRIPTION() has
>> resulted in a warning with make W=1. Since that time, all known
>> instances of this issue have been fixed. Therefore, now make it an
>> error if a MODULE_DESCRIPTION() is not present.
>> 
>> Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
>> ---
>> did my treewide cleanup for v6.11, Arnd had a few more stragglers that
>> he was going to fix. I hope that by posting, some of the 0-day bots
>> will pick it up and hopefully provide some feedback.
>> 
>> Note: I'm not really sure if *all* of these have been fixed. After I
>
> FWIW, I ran
>
> for f in $(find . -name '*.c'); do grep -q MODULE_LICENSE $f && (grep 
> -q MODULE_DESCRIPTION $f || echo $f); done
>
> That reports a large number of files (111, to be exact) with MODULE_LICENSE
> but not MODULE_DESCRIPTION. I cross-checked a few, and found that many can
> be built as module. The fall-out from this patch might be interesting.

The ones I sent were only the result of what I found from randconfig
builds on x86, arm32 and arm64, so I likely missed drivers that are
specific to other architectures, or that are very unlikely to be
in loadable modules because of random 'select FOO' Kconfig statements
leading to them being always built-in in practice.

        Arnd

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

* Re: [PATCH] script: modpost: require a MODULE_DESCRIPTION()
  2025-04-06 16:06   ` Arnd Bergmann
@ 2025-04-06 17:06     ` Guenter Roeck
  0 siblings, 0 replies; 8+ messages in thread
From: Guenter Roeck @ 2025-04-06 17:06 UTC (permalink / raw)
  To: Arnd Bergmann, Jeff Johnson
  Cc: Masahiro Yamada, Nathan Chancellor, Nicolas Schier, linux-kbuild,
	linux-kernel

On 4/6/25 09:06, Arnd Bergmann wrote:
> On Sun, Apr 6, 2025, at 17:59, Guenter Roeck wrote:
>> On Tue, Mar 11, 2025 at 12:49:02PM -0700, Jeff Johnson wrote:
>>> Since commit 1fffe7a34c89 ("script: modpost: emit a warning when the
>>> description is missing"), a module without a MODULE_DESCRIPTION() has
>>> resulted in a warning with make W=1. Since that time, all known
>>> instances of this issue have been fixed. Therefore, now make it an
>>> error if a MODULE_DESCRIPTION() is not present.
>>>
>>> Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
>>> ---
>>> did my treewide cleanup for v6.11, Arnd had a few more stragglers that
>>> he was going to fix. I hope that by posting, some of the 0-day bots
>>> will pick it up and hopefully provide some feedback.
>>>
>>> Note: I'm not really sure if *all* of these have been fixed. After I
>>
>> FWIW, I ran
>>
>> for f in $(find . -name '*.c'); do grep -q MODULE_LICENSE $f && (grep
>> -q MODULE_DESCRIPTION $f || echo $f); done
>>
>> That reports a large number of files (111, to be exact) with MODULE_LICENSE
>> but not MODULE_DESCRIPTION. I cross-checked a few, and found that many can
>> be built as module. The fall-out from this patch might be interesting.
> 
> The ones I sent were only the result of what I found from randconfig
> builds on x86, arm32 and arm64, so I likely missed drivers that are
> specific to other architectures, or that are very unlikely to be
> in loadable modules because of random 'select FOO' Kconfig statements
> leading to them being always built-in in practice.
> 
>          Arnd

ERROR: modpost: missing MODULE_DESCRIPTION() in drivers/block/swim3.o

Guess I'll just keep disabling affected drivers.

Guenter


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

end of thread, other threads:[~2025-04-06 17:06 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-03-11 19:49 [PATCH] script: modpost: require a MODULE_DESCRIPTION() Jeff Johnson
2025-03-11 19:54 ` Jeff Johnson
2025-03-13  0:34 ` Masahiro Yamada
2025-03-22 15:45   ` Masahiro Yamada
2025-04-06 15:23 ` Guenter Roeck
2025-04-06 15:59 ` Guenter Roeck
2025-04-06 16:06   ` Arnd Bergmann
2025-04-06 17:06     ` Guenter Roeck

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®