Commit 4d1c92a4 authored by Masami Hiramatsu's avatar Masami Hiramatsu Committed by Steven Rostedt (VMware)
Browse files

lib/bootconfig: Make xbc_alloc_mem() and xbc_free_mem() as __init function

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: default avatarMasami Hiramatsu <mhiramat@kernel.org>
Fixes: 4ee1b4ca ("bootconfig: Cleanup dummy headers in tools/bootconfig")
Reported-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
parent 17b251a2
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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);
}