* [PATCH] alpha: remove __init annotation from exported page_is_ram()
@ 2023-07-29 7:42 Masahiro Yamada
2023-07-30 1:49 ` Randy Dunlap
0 siblings, 1 reply; 2+ messages in thread
From: Masahiro Yamada @ 2023-07-29 7:42 UTC (permalink / raw)
To: linux-kbuild, Richard Henderson, Ivan Kokshaysky, Matt Turner,
linux-alpha
Cc: linux-kernel, Masahiro Yamada, Chen Gong, Tony Luck
EXPORT_SYMBOL and __init is a bad combination because the .init.text
section is freed up after the initialization.
Commit c5a130325f13 ("ACPI/APEI: Add parameter check before error
injection") exported page_is_ram(), hence the __init annotation should
be removed.
This fixes the modpost warning in ARCH=alpha builds:
WARNING: modpost: vmlinux: page_is_ram: EXPORT_SYMBOL used for init symbol. Remove __init or EXPORT_SYMBOL.
Fixes: c5a130325f13 ("ACPI/APEI: Add parameter check before error injection")
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---
arch/alpha/kernel/setup.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/alpha/kernel/setup.c b/arch/alpha/kernel/setup.c
index b650ff1cb022..3d7473531ab1 100644
--- a/arch/alpha/kernel/setup.c
+++ b/arch/alpha/kernel/setup.c
@@ -385,8 +385,7 @@ setup_memory(void *kernel_end)
#endif /* CONFIG_BLK_DEV_INITRD */
}
-int __init
-page_is_ram(unsigned long pfn)
+int page_is_ram(unsigned long pfn)
{
struct memclust_struct * cluster;
struct memdesc_struct * memdesc;
--
2.39.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] alpha: remove __init annotation from exported page_is_ram()
2023-07-29 7:42 [PATCH] alpha: remove __init annotation from exported page_is_ram() Masahiro Yamada
@ 2023-07-30 1:49 ` Randy Dunlap
0 siblings, 0 replies; 2+ messages in thread
From: Randy Dunlap @ 2023-07-30 1:49 UTC (permalink / raw)
To: Masahiro Yamada, linux-kbuild, Richard Henderson, Ivan Kokshaysky,
Matt Turner, linux-alpha
Cc: linux-kernel, Chen Gong, Tony Luck
On 7/29/23 00:42, Masahiro Yamada wrote:
> EXPORT_SYMBOL and __init is a bad combination because the .init.text
> section is freed up after the initialization.
>
> Commit c5a130325f13 ("ACPI/APEI: Add parameter check before error
> injection") exported page_is_ram(), hence the __init annotation should
> be removed.
>
> This fixes the modpost warning in ARCH=alpha builds:
>
> WARNING: modpost: vmlinux: page_is_ram: EXPORT_SYMBOL used for init symbol. Remove __init or EXPORT_SYMBOL.
>
> Fixes: c5a130325f13 ("ACPI/APEI: Add parameter check before error injection")
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
Thanks.
> ---
>
> arch/alpha/kernel/setup.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/arch/alpha/kernel/setup.c b/arch/alpha/kernel/setup.c
> index b650ff1cb022..3d7473531ab1 100644
> --- a/arch/alpha/kernel/setup.c
> +++ b/arch/alpha/kernel/setup.c
> @@ -385,8 +385,7 @@ setup_memory(void *kernel_end)
> #endif /* CONFIG_BLK_DEV_INITRD */
> }
>
> -int __init
> -page_is_ram(unsigned long pfn)
> +int page_is_ram(unsigned long pfn)
> {
> struct memclust_struct * cluster;
> struct memdesc_struct * memdesc;
--
~Randy
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-07-30 1:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-29 7:42 [PATCH] alpha: remove __init annotation from exported page_is_ram() Masahiro Yamada
2023-07-30 1:49 ` Randy Dunlap
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox