aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/lib/code-patching.c
diff options
context:
space:
mode:
authorNick Child <[email protected]>2021-12-16 22:00:17 +0000
committerMichael Ellerman <[email protected]>2021-12-23 11:33:10 +0000
commitce0c6be9c69883df38e7631d1d7364b52f6db135 (patch)
treeeff23e0ad0efc0a1b21ecef8f2d74c68823afc5e /arch/powerpc/lib/code-patching.c
parentpowerpc/kernel: Add __init attribute to eligible functions (diff)
downloadkernel-ce0c6be9c69883df38e7631d1d7364b52f6db135.tar.gz
kernel-ce0c6be9c69883df38e7631d1d7364b52f6db135.zip
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 <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'arch/powerpc/lib/code-patching.c')
-rw-r--r--arch/powerpc/lib/code-patching.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/lib/code-patching.c b/arch/powerpc/lib/code-patching.c
index 312324a26df3..ee54cb447f80 100644
--- a/arch/powerpc/lib/code-patching.c
+++ b/arch/powerpc/lib/code-patching.c
@@ -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)))