summary refs log tree commit diff
path: root/arch
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2023-07-29 16:42:23 +0900
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-08-16 18:27:31 +0200
commit3ae919c317dd6607f9c166ce1e0cb2cf5f02dd2b (patch)
tree6f133bc72e4e3691b76355efa15afb36e1d74dc4 /arch
parentcbce265f959f0b58feb06fa90600e683b853c220 (diff)
downloadlinux-3ae919c317dd6607f9c166ce1e0cb2cf5f02dd2b.tar.gz
alpha: remove __init annotation from exported page_is_ram()
commit 6ccbd7fd474674654019a20177c943359469103a upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/alpha/kernel/setup.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/alpha/kernel/setup.c b/arch/alpha/kernel/setup.c
index 33bf3a627002..45a920ba4921 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;