powerpc/lib: Add __init attribute to eligible functions
Some functions defined in 'arch/powerpc/lib' are deserving of an `__init` macro attribute. These functions are only called by other initialization functions and therefore should inherit the attribute. Also, change function declarations in header files to include `__init`. Signed-off-by: Nick Child <nick.child@ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20211216220035.605465-3-nick.child@ibm.com
This commit is contained in:
committed by
Michael Ellerman
parent
d276960d92
commit
ce0c6be9c6
@@ -397,7 +397,7 @@ void __patch_exception(int exc, unsigned long addr)
|
||||
|
||||
#ifdef CONFIG_CODE_PATCHING_SELFTEST
|
||||
|
||||
static int instr_is_branch_to_addr(const u32 *instr, unsigned long addr)
|
||||
static int __init instr_is_branch_to_addr(const u32 *instr, unsigned long addr)
|
||||
{
|
||||
if (instr_is_branch_iform(ppc_inst_read(instr)) ||
|
||||
instr_is_branch_bform(ppc_inst_read(instr)))
|
||||
|
||||
Reference in New Issue
Block a user