From: Randy Dunlap <rdunlap@infradead.org>
To: Masahiro Yamada <masahiroy@kernel.org>,
linux-kbuild@vger.kernel.org,
Richard Henderson <richard.henderson@linaro.org>,
Ivan Kokshaysky <ink@jurassic.park.msu.ru>,
Matt Turner <mattst88@gmail.com>,
linux-alpha@vger.kernel.org
Cc: linux-kernel@vger.kernel.org,
Chen Gong <gong.chen@linux.intel.com>,
Tony Luck <tony.luck@intel.com>
Subject: Re: [PATCH] alpha: remove __init annotation from exported page_is_ram()
Date: Sat, 29 Jul 2023 18:49:58 -0700 [thread overview]
Message-ID: <1c4b9496-2ac3-d271-0ef9-0c0979da55ae@infradead.org> (raw)
In-Reply-To: <20230729074223.1457109-1-masahiroy@kernel.org>
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
prev parent reply other threads:[~2023-07-30 1:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-29 7:42 Masahiro Yamada
2023-07-30 1:49 ` Randy Dunlap [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1c4b9496-2ac3-d271-0ef9-0c0979da55ae@infradead.org \
--to=rdunlap@infradead.org \
--cc=gong.chen@linux.intel.com \
--cc=ink@jurassic.park.msu.ru \
--cc=linux-alpha@vger.kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=masahiroy@kernel.org \
--cc=mattst88@gmail.com \
--cc=richard.henderson@linaro.org \
--cc=tony.luck@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®