* [PATCH] kho: fix kho_test_restore section mismatch warning
@ 2025-07-31 8:00 Arnd Bergmann
2025-07-31 8:11 ` Mike Rapoport
0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2025-07-31 8:00 UTC (permalink / raw)
To: Andrew Morton, Mike Rapoport (Microsoft); +Cc: Arnd Bergmann, linux-kernel
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] kho: fix kho_test_restore section mismatch warning
2025-07-31 8:00 [PATCH] kho: fix kho_test_restore section mismatch warning Arnd Bergmann
@ 2025-07-31 8:11 ` Mike Rapoport
0 siblings, 0 replies; 2+ messages in thread
From: Mike Rapoport @ 2025-07-31 8:11 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: Andrew Morton, Arnd Bergmann, linux-kernel
Hi Arnd,
On Thu, Jul 31, 2025 at 10:00:00AM +0200, Arnd Bergmann wrote:
> 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.
I've already sent a fix:
https://lore.kernel.org/all/aIiRC8fXiOXKbPM_@kernel.org/
and Andrew picked it up.
> 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
>
--
Sincerely yours,
Mike.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-07-31 8:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-31 8:00 [PATCH] kho: fix kho_test_restore section mismatch warning Arnd Bergmann
2025-07-31 8:11 ` Mike Rapoport
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).