powerpc/test_emulate_step: Move extern declaration to sstep.h
authorBalamuruhan S <bala24@linux.ibm.com>
Fri, 26 Jun 2020 09:51:58 +0000 (15:21 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 23 Jul 2020 07:43:14 +0000 (17:43 +1000)
fix checkpatch.pl warnings by moving extern declaration from source
file to headerfile.

Signed-off-by: Balamuruhan S <bala24@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200626095158.1031507-5-bala24@linux.ibm.com
arch/powerpc/include/asm/sstep.h
arch/powerpc/lib/test_emulate_step.c

index 325975b..c8e37ef 100644 (file)
@@ -108,6 +108,8 @@ enum instruction_type {
 #define GET_PREFIX_RA(i)       (((i) >> 16) & 0x1f)
 #define GET_PREFIX_R(i)                ((i) & (1ul << 20))
 
+extern s32 patch__exec_instr;
+
 struct instruction_op {
        int type;
        int reg;
index 7d11ab5..081b054 100644 (file)
@@ -1150,7 +1150,6 @@ static int __init emulate_compute_instr(struct pt_regs *regs,
                                        bool negative)
 {
        int analysed;
-       extern s32 patch__exec_instr;
        struct instruction_op op;
 
        if (!regs || !ppc_inst_val(instr))
@@ -1176,7 +1175,6 @@ static int __init execute_compute_instr(struct pt_regs *regs,
                                        struct ppc_inst instr)
 {
        extern int exec_instr(struct pt_regs *regs);
-       extern s32 patch__exec_instr;
 
        if (!regs || !ppc_inst_val(instr))
                return -EINVAL;