* linux-next: build warning after merge of the ftrace tree
@ 2021-10-25 4:39 Stephen Rothwell
2021-10-25 6:13 ` Masami Hiramatsu
0 siblings, 1 reply; 3+ messages in thread
From: Stephen Rothwell @ 2021-10-25 4:39 UTC (permalink / raw)
To: Steven Rostedt
Cc: Masami Hiramatsu, Linux Kernel Mailing List,
Linux Next Mailing List
[-- Attachment #1: Type: text/plain, Size: 627 bytes --]
Hi all,
After merging the ftrace tree, today's linux-next build (x86_64
allmodconfig) produced this warning:
WARNING: modpost: vmlinux.o(.text.unlikely+0x90082): Section mismatch in reference from the function xbc_alloc_mem() to the function .init.text:memblock_alloc_try_nid()
The function xbc_alloc_mem() references
the function __init memblock_alloc_try_nid().
This is often because xbc_alloc_mem lacks a __init
annotation or the annotation of memblock_alloc_try_nid is wrong.
Introduced by commit
4ee1b4cac236 ("bootconfig: Cleanup dummy headers in tools/bootconfig")
--
Cheers,
Stephen Rothwell
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: linux-next: build warning after merge of the ftrace tree
2021-10-25 4:39 linux-next: build warning after merge of the ftrace tree Stephen Rothwell
@ 2021-10-25 6:13 ` Masami Hiramatsu
2021-10-25 8:32 ` [PATCH] lib/bootconfig: Make xbc_alloc_mem() and xbc_free_mem() as __init function Masami Hiramatsu
0 siblings, 1 reply; 3+ messages in thread
From: Masami Hiramatsu @ 2021-10-25 6:13 UTC (permalink / raw)
To: Stephen Rothwell
Cc: Steven Rostedt, Masami Hiramatsu, Linux Kernel Mailing List,
Linux Next Mailing List
On Mon, 25 Oct 2021 15:39:42 +1100
Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> Hi all,
>
> After merging the ftrace tree, today's linux-next build (x86_64
> allmodconfig) produced this warning:
>
> WARNING: modpost: vmlinux.o(.text.unlikely+0x90082): Section mismatch in reference from the function xbc_alloc_mem() to the function .init.text:memblock_alloc_try_nid()
> The function xbc_alloc_mem() references
> the function __init memblock_alloc_try_nid().
> This is often because xbc_alloc_mem lacks a __init
> annotation or the annotation of memblock_alloc_try_nid is wrong.
>
> Introduced by commit
>
> 4ee1b4cac236 ("bootconfig: Cleanup dummy headers in tools/bootconfig")
Thanks for reporting!
Let me fix that.
>
> --
> Cheers,
> Stephen Rothwell
--
Masami Hiramatsu <mhiramat@kernel.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] lib/bootconfig: Make xbc_alloc_mem() and xbc_free_mem() as __init function
2021-10-25 6:13 ` Masami Hiramatsu
@ 2021-10-25 8:32 ` Masami Hiramatsu
0 siblings, 0 replies; 3+ messages in thread
From: Masami Hiramatsu @ 2021-10-25 8:32 UTC (permalink / raw)
To: Steven Rostedt
Cc: Masami Hiramatsu, Linux Kernel Mailing List,
Linux Next Mailing List
Since the xbc_alloc_mem() and xbc_free_mem() are used from
the __init functions and memblock_alloc() is __init function,
make them __init functions too.
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Fixes: 4ee1b4cac236 ("bootconfig: Cleanup dummy headers in tools/bootconfig")
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
lib/bootconfig.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/bootconfig.c b/lib/bootconfig.c
index a056ae137750..3276675b25e1 100644
--- a/lib/bootconfig.c
+++ b/lib/bootconfig.c
@@ -43,12 +43,12 @@ static int open_brace[XBC_DEPTH_MAX] __initdata;
static int brace_index __initdata;
#ifdef __KERNEL__
-static inline void *xbc_alloc_mem(size_t size)
+static inline void * __init xbc_alloc_mem(size_t size)
{
return memblock_alloc(size, SMP_CACHE_BYTES);
}
-static inline void xbc_free_mem(void *addr, size_t size)
+static inline void __init xbc_free_mem(void *addr, size_t size)
{
memblock_free_ptr(addr, size);
}
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-10-25 8:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-25 4:39 linux-next: build warning after merge of the ftrace tree Stephen Rothwell
2021-10-25 6:13 ` Masami Hiramatsu
2021-10-25 8:32 ` [PATCH] lib/bootconfig: Make xbc_alloc_mem() and xbc_free_mem() as __init function Masami Hiramatsu
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).