]> git.baikalelectronics.ru Git - kernel.git/commitdiff
lib/bootconfig: Make xbc_alloc_mem() and xbc_free_mem() as __init function
authorMasami Hiramatsu <mhiramat@kernel.org>
Mon, 25 Oct 2021 08:32:37 +0000 (17:32 +0900)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Tue, 26 Oct 2021 21:23:45 +0000 (17:23 -0400)
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.

Link: https://lkml.kernel.org/r/163515075747.547467.5746167540626712819.stgit@devnote2
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Fixes: c7d94c12fe79 ("bootconfig: Cleanup dummy headers in tools/bootconfig")
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
lib/bootconfig.c

index a056ae1377505719c1eeee164d7aa37fe8ff6d19..3276675b25e102d45f36bb2e31e34d2a91a0ebe4 100644 (file)
@@ -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);
 }