public inbox for linux-modules@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] module: Remove unused __INIT*_OR_MODULE macros
@ 2025-08-19 12:13 Petr Pavlu
  2025-08-21 23:11 ` Sami Tolvanen
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Petr Pavlu @ 2025-08-19 12:13 UTC (permalink / raw)
  To: Luis Chamberlain, Petr Pavlu, Daniel Gomez, Sami Tolvanen
  Cc: linux-modules, linux-kernel

Remove the __INIT_OR_MODULE, __INITDATA_OR_MODULE and
__INITRODATA_OR_MODULE macros. These were introduced in commit 8b5a10fc6fd0
("x86: properly annotate alternatives.c"). Only __INITRODATA_OR_MODULE was
ever used, in arch/x86/kernel/alternative.c. In 2011, commit dc326fca2b64
("x86, cpu: Clean up and unify the NOP selection infrastructure") removed
this usage.

Signed-off-by: Petr Pavlu <petr.pavlu@suse.com>
---
 include/linux/module.h | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/include/linux/module.h b/include/linux/module.h
index 3319a5269d28..e9e6eeb042aa 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -151,16 +151,10 @@ extern void cleanup_module(void);
 #define __init_or_module
 #define __initdata_or_module
 #define __initconst_or_module
-#define __INIT_OR_MODULE	.text
-#define __INITDATA_OR_MODULE	.data
-#define __INITRODATA_OR_MODULE	.section ".rodata","a",%progbits
 #else
 #define __init_or_module __init
 #define __initdata_or_module __initdata
 #define __initconst_or_module __initconst
-#define __INIT_OR_MODULE __INIT
-#define __INITDATA_OR_MODULE __INITDATA
-#define __INITRODATA_OR_MODULE __INITRODATA
 #endif /*CONFIG_MODULES*/
 
 struct module_kobject *lookup_or_create_module_kobject(const char *name);

base-commit: be48bcf004f9d0c9207ff21d0edb3b42f253829e
-- 
2.50.1


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

* Re: [PATCH] module: Remove unused __INIT*_OR_MODULE macros
  2025-08-19 12:13 [PATCH] module: Remove unused __INIT*_OR_MODULE macros Petr Pavlu
@ 2025-08-21 23:11 ` Sami Tolvanen
  2025-10-22 22:55 ` Daniel Gomez
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Sami Tolvanen @ 2025-08-21 23:11 UTC (permalink / raw)
  To: Petr Pavlu; +Cc: Luis Chamberlain, Daniel Gomez, linux-modules, linux-kernel

On Tue, Aug 19, 2025 at 5:14 AM Petr Pavlu <petr.pavlu@suse.com> wrote:
>
> Remove the __INIT_OR_MODULE, __INITDATA_OR_MODULE and
> __INITRODATA_OR_MODULE macros. These were introduced in commit 8b5a10fc6fd0
> ("x86: properly annotate alternatives.c"). Only __INITRODATA_OR_MODULE was
> ever used, in arch/x86/kernel/alternative.c. In 2011, commit dc326fca2b64
> ("x86, cpu: Clean up and unify the NOP selection infrastructure") removed
> this usage.
>
> Signed-off-by: Petr Pavlu <petr.pavlu@suse.com>

Reviewed-by: Sami Tolvanen <samitolvanen@google.com>

Sami

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

* Re: [PATCH] module: Remove unused __INIT*_OR_MODULE macros
  2025-08-19 12:13 [PATCH] module: Remove unused __INIT*_OR_MODULE macros Petr Pavlu
  2025-08-21 23:11 ` Sami Tolvanen
@ 2025-10-22 22:55 ` Daniel Gomez
  2025-10-23  2:43 ` Aaron Tomlin
  2025-12-22 20:24 ` Sami Tolvanen
  3 siblings, 0 replies; 5+ messages in thread
From: Daniel Gomez @ 2025-10-22 22:55 UTC (permalink / raw)
  To: Petr Pavlu, Luis Chamberlain, Sami Tolvanen; +Cc: linux-modules, linux-kernel

On 19/08/2025 14.13, Petr Pavlu wrote:
> Remove the __INIT_OR_MODULE, __INITDATA_OR_MODULE and
> __INITRODATA_OR_MODULE macros. These were introduced in commit 8b5a10fc6fd0
> ("x86: properly annotate alternatives.c"). Only __INITRODATA_OR_MODULE was
> ever used, in arch/x86/kernel/alternative.c. In 2011, commit dc326fca2b64
> ("x86, cpu: Clean up and unify the NOP selection infrastructure") removed
> this usage.
> 
> Signed-off-by: Petr Pavlu <petr.pavlu@suse.com>

Reviewed-by: Daniel Gomez <da.gomez@samsung.com>

> ---
>  include/linux/module.h | 6 ------
>  1 file changed, 6 deletions(-)
> 
> diff --git a/include/linux/module.h b/include/linux/module.h
> index 3319a5269d28..e9e6eeb042aa 100644
> --- a/include/linux/module.h
> +++ b/include/linux/module.h
> @@ -151,16 +151,10 @@ extern void cleanup_module(void);
>  #define __init_or_module
>  #define __initdata_or_module
>  #define __initconst_or_module
> -#define __INIT_OR_MODULE	.text
> -#define __INITDATA_OR_MODULE	.data
> -#define __INITRODATA_OR_MODULE	.section ".rodata","a",%progbits
>  #else
>  #define __init_or_module __init
>  #define __initdata_or_module __initdata
>  #define __initconst_or_module __initconst
> -#define __INIT_OR_MODULE __INIT
> -#define __INITDATA_OR_MODULE __INITDATA
> -#define __INITRODATA_OR_MODULE __INITRODATA
>  #endif /*CONFIG_MODULES*/
>  
>  struct module_kobject *lookup_or_create_module_kobject(const char *name);
> 
> base-commit: be48bcf004f9d0c9207ff21d0edb3b42f253829e


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

* Re: [PATCH] module: Remove unused __INIT*_OR_MODULE macros
  2025-08-19 12:13 [PATCH] module: Remove unused __INIT*_OR_MODULE macros Petr Pavlu
  2025-08-21 23:11 ` Sami Tolvanen
  2025-10-22 22:55 ` Daniel Gomez
@ 2025-10-23  2:43 ` Aaron Tomlin
  2025-12-22 20:24 ` Sami Tolvanen
  3 siblings, 0 replies; 5+ messages in thread
From: Aaron Tomlin @ 2025-10-23  2:43 UTC (permalink / raw)
  To: Petr Pavlu
  Cc: Luis Chamberlain, Daniel Gomez, Sami Tolvanen, linux-modules,
	linux-kernel

On Tue, Aug 19, 2025 at 02:13:37PM +0200, Petr Pavlu wrote:
> Remove the __INIT_OR_MODULE, __INITDATA_OR_MODULE and
> __INITRODATA_OR_MODULE macros. These were introduced in commit 8b5a10fc6fd0
> ("x86: properly annotate alternatives.c"). Only __INITRODATA_OR_MODULE was
> ever used, in arch/x86/kernel/alternative.c. In 2011, commit dc326fca2b64
> ("x86, cpu: Clean up and unify the NOP selection infrastructure") removed
> this usage.
> 
> Signed-off-by: Petr Pavlu <petr.pavlu@suse.com>
> ---
>  include/linux/module.h | 6 ------
>  1 file changed, 6 deletions(-)
> 
> diff --git a/include/linux/module.h b/include/linux/module.h
> index 3319a5269d28..e9e6eeb042aa 100644
> --- a/include/linux/module.h
> +++ b/include/linux/module.h
> @@ -151,16 +151,10 @@ extern void cleanup_module(void);
>  #define __init_or_module
>  #define __initdata_or_module
>  #define __initconst_or_module
> -#define __INIT_OR_MODULE	.text
> -#define __INITDATA_OR_MODULE	.data
> -#define __INITRODATA_OR_MODULE	.section ".rodata","a",%progbits
>  #else
>  #define __init_or_module __init
>  #define __initdata_or_module __initdata
>  #define __initconst_or_module __initconst
> -#define __INIT_OR_MODULE __INIT
> -#define __INITDATA_OR_MODULE __INITDATA
> -#define __INITRODATA_OR_MODULE __INITRODATA
>  #endif /*CONFIG_MODULES*/
>  
>  struct module_kobject *lookup_or_create_module_kobject(const char *name);
> 
> base-commit: be48bcf004f9d0c9207ff21d0edb3b42f253829e
> -- 
> 2.50.1
> 
> 

Reviewed-by: Aaron Tomlin <atomlin@atomlin.com>

-- 
Aaron Tomlin

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

* Re: [PATCH] module: Remove unused __INIT*_OR_MODULE macros
  2025-08-19 12:13 [PATCH] module: Remove unused __INIT*_OR_MODULE macros Petr Pavlu
                   ` (2 preceding siblings ...)
  2025-10-23  2:43 ` Aaron Tomlin
@ 2025-12-22 20:24 ` Sami Tolvanen
  3 siblings, 0 replies; 5+ messages in thread
From: Sami Tolvanen @ 2025-12-22 20:24 UTC (permalink / raw)
  To: Luis Chamberlain, Daniel Gomez, Petr Pavlu
  Cc: Sami Tolvanen, linux-modules, linux-kernel

On Tue, 19 Aug 2025 14:13:37 +0200, Petr Pavlu wrote:
> Remove the __INIT_OR_MODULE, __INITDATA_OR_MODULE and
> __INITRODATA_OR_MODULE macros. These were introduced in commit 8b5a10fc6fd0
> ("x86: properly annotate alternatives.c"). Only __INITRODATA_OR_MODULE was
> ever used, in arch/x86/kernel/alternative.c. In 2011, commit dc326fca2b64
> ("x86, cpu: Clean up and unify the NOP selection infrastructure") removed
> this usage.
> 
> [...]

Applied to modules-next, thanks!

[1/1] module: Remove unused __INIT*_OR_MODULE macros
      commit: f13bff1b6d55de341f37a24781df5a1253377db3

Best regards,

	Sami


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

end of thread, other threads:[~2025-12-22 20:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-19 12:13 [PATCH] module: Remove unused __INIT*_OR_MODULE macros Petr Pavlu
2025-08-21 23:11 ` Sami Tolvanen
2025-10-22 22:55 ` Daniel Gomez
2025-10-23  2:43 ` Aaron Tomlin
2025-12-22 20:24 ` Sami Tolvanen

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