Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

MIPS: Fix the declaration conflict of mm_isBranchInstr()

mm_isBranchInstr() is declared both in branch.h and in fpu_emulator.h
but the two declarations are conflict. If both of them are included by
a same file, they will cause a build error:

./arch/mips/include/asm/branch.h:33:19: error: static declaration of 'mm_isBranchInstr' follows non-static declaration
static inline int mm_isBranchInstr(struct pt_regs *regs,
^
./arch/mips/include/asm/fpu_emulator.h:177:5: note: previous declaration of 'mm_isBranchInstr' was here
int mm_isBranchInstr(struct pt_regs *regs, struct mm_decoded_insn dec_insn,

Fix this error by removing both isBranchInstr() and mm_isBranchInstr()
in fpu_emulator.h, and declaring both of them in branch.h.

Signed-off-by: Huacai Chen <chenhc@lemote.com>
Reviewed-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>

authored by

Huacai Chen and committed by
Thomas Bogendoerfer
c05b5940 6abf4a2f

+3 -4
+3
arch/mips/include/asm/branch.h
··· 27 27 #define MM_POOL32A_MINOR_SHIFT 0x6 28 28 #define MM_MIPS32_COND_FC 0x30 29 29 30 + int isBranchInstr(struct pt_regs *regs, 31 + struct mm_decoded_insn dec_insn, unsigned long *contpc); 32 + 30 33 extern int __mm_isBranchInstr(struct pt_regs *regs, 31 34 struct mm_decoded_insn dec_insn, unsigned long *contpc); 32 35
-4
arch/mips/include/asm/fpu_emulator.h
··· 172 172 struct task_struct *tsk); 173 173 int process_fpemu_return(int sig, void __user *fault_addr, 174 174 unsigned long fcr31); 175 - int isBranchInstr(struct pt_regs *regs, struct mm_decoded_insn dec_insn, 176 - unsigned long *contpc); 177 - int mm_isBranchInstr(struct pt_regs *regs, struct mm_decoded_insn dec_insn, 178 - unsigned long *contpc); 179 175 180 176 /* 181 177 * Mask the FCSR Cause bits according to the Enable bits, observing