diff mbox series

[17/27] kbuild, crypto: remove MODULE_LICENSE in non-modules

Message ID 20230222121453.91915-18-nick.alcock@oracle.com
State Accepted
Commit 41a98c68f2abc67b88568b7a25fd547989d2c92f
Headers show
Series None | expand

Commit Message

Nick Alcock Feb. 22, 2023, 12:14 p.m. UTC
Since commit 8b41fc4454e ("kbuild: create modules.builtin without
Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations
are used to identify modules. As a consequence, uses of the macro
in non-modules will cause modprobe to misidentify their containing
object file as a module when it is not (false positives), and modprobe
might succeed rather than failing with a suitable error message.

So remove it in the files in this commit, none of which can be built as
modules.

Signed-off-by: Nick Alcock <nick.alcock@oracle.com>
Suggested-by: Luis Chamberlain <mcgrof@kernel.org>
Cc: Luis Chamberlain <mcgrof@kernel.org>
Cc: linux-modules@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: Hitomi Hasegawa <hasegawa-hitomi@fujitsu.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: x86@kernel.org
Cc: linux-crypto@vger.kernel.org
---
 arch/x86/crypto/blake2s-glue.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Herbert Xu Feb. 23, 2023, 10:21 a.m. UTC | #1
On Wed, Feb 22, 2023 at 12:14:43PM +0000, Nick Alcock wrote:
> 
> diff --git a/arch/x86/crypto/blake2s-glue.c b/arch/x86/crypto/blake2s-glue.c
> index aaba21230528..0df9ec15643a 100644
> --- a/arch/x86/crypto/blake2s-glue.c
> +++ b/arch/x86/crypto/blake2s-glue.c
> @@ -74,4 +74,3 @@ static int __init blake2s_mod_init(void)
>  
>  module_init(blake2s_mod_init);
>  
> -MODULE_LICENSE("GPL v2");

Please change the module_init as well and remove module.h from
this file.

Thanks,
diff mbox series

Patch

diff --git a/arch/x86/crypto/blake2s-glue.c b/arch/x86/crypto/blake2s-glue.c
index aaba21230528..0df9ec15643a 100644
--- a/arch/x86/crypto/blake2s-glue.c
+++ b/arch/x86/crypto/blake2s-glue.c
@@ -74,4 +74,3 @@  static int __init blake2s_mod_init(void)
 
 module_init(blake2s_mod_init);
 
-MODULE_LICENSE("GPL v2");