diff --git a/arch/x86/mm/mpx.c b/arch/x86/mm/mpx.c index f30b48e3a991f2300a1d9ece1085e76ea6791780..67ebf57512229a4a29bceda04324c177a587232f 100644 --- a/arch/x86/mm/mpx.c +++ b/arch/x86/mm/mpx.c @@ -102,8 +102,8 @@ enum reg_type { REG_TYPE_BASE, }; -static unsigned long get_reg_offset(struct insn *insn, struct pt_regs *regs, - enum reg_type type) +static int get_reg_offset(struct insn *insn, struct pt_regs *regs, + enum reg_type type) { int regno = 0; @@ -174,9 +174,8 @@ static unsigned long get_reg_offset(struct insn *insn, struct pt_regs *regs, */ static void __user *mpx_get_addr_ref(struct insn *insn, struct pt_regs *regs) { - unsigned long addr, addr_offset; - unsigned long base, base_offset; - unsigned long indx, indx_offset; + unsigned long addr, base, indx; + int addr_offset, base_offset, indx_offset; insn_byte_t sib; insn_get_modrm(insn);