powerpc/optprobes: Make patch_imm64_load_insns() static

patch_imm64_load_insns() is only used locally in
arch_prepare_optimized_kprobe() and does not need to be external.

It fixes this W=1 compile error :

../arch/powerpc/kernel/optprobes.c:149:6: error: no previous prototype for ‘patch_imm64_load_insns’ [-Werror=missing-prototypes]
  149 | void patch_imm64_load_insns(unsigned int val, kprobe_opcode_t *addr)

Signed-off-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210104143206.695198-12-clg@kaod.org
This commit is contained in:
Cédric Le Goater 2021-01-04 15:31:54 +01:00 committed by Michael Ellerman
parent d47d307f10
commit bb21e1b6c5

View File

@ -145,7 +145,7 @@ void arch_remove_optimized_kprobe(struct optimized_kprobe *op)
* Generate instructions to load provided immediate 64-bit value
* to register 'reg' and patch these instructions at 'addr'.
*/
void patch_imm64_load_insns(unsigned long val, int reg, kprobe_opcode_t *addr)
static void patch_imm64_load_insns(unsigned long val, int reg, kprobe_opcode_t *addr)
{
/* lis reg,(op)@highest */
patch_instruction((struct ppc_inst *)addr,