From: Arnd Bergmann <arnd@kernel.org>
To: Andrew Morton <akpm@linux-foundation.org>,
"Mike Rapoport (Microsoft)" <rppt@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>, linux-kernel@vger.kernel.org
Subject: [PATCH] kho: fix kho_test_restore section mismatch warning
Date: Thu, 31 Jul 2025 10:00:00 +0200 [thread overview]
Message-ID: <20250731080007.2037366-1-arnd@kernel.org> (raw)
From: Arnd Bergmann <arnd@arndb.de>
kho_test_restore_data() is not always inlined, and that configuration
causes a link warning:
WARNING: modpost: vmlinux: section mismatch in reference: kho_test_restore+0xd2 (section: .text.unlikely) -> kho_test_restore_data.isra.0 (section: .init.text)
ERROR: modpost: Section mismatches detected.
Mark it __init as well to be consistent with the rest of the call chain.
Fixes: c2d288f7ab13 ("kho: add test for kexec handover")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
lib/test_kho.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/test_kho.c b/lib/test_kho.c
index f5fe39c7c2b1..aeeb693d0251 100644
--- a/lib/test_kho.c
+++ b/lib/test_kho.c
@@ -239,7 +239,7 @@ static int __init kho_test_restore_data(const void *fdt, int node)
return 0;
}
-static int kho_test_restore(phys_addr_t fdt_phys)
+static int __init kho_test_restore(phys_addr_t fdt_phys)
{
void *fdt = phys_to_virt(fdt_phys);
const unsigned int *magic;
--
2.39.5
next reply other threads:[~2025-07-31 8:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-31 8:00 Arnd Bergmann [this message]
2025-07-31 8:11 ` Mike Rapoport
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=20250731080007.2037366-1-arnd@kernel.org \
--to=arnd@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=linux-kernel@vger.kernel.org \
--cc=rppt@kernel.org \
/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®