MIPS: uprobes: remove set but not used variable 'epc'
authorYueHaibing <yuehaibing@huawei.com>
Sat, 25 May 2019 12:20:24 +0000 (20:20 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 25 Jun 2019 03:36:52 +0000 (11:36 +0800)
[ Upstream commit f532beeeff0c0a3586cc15538bc52d249eb19e7c ]

Fixes gcc '-Wunused-but-set-variable' warning:

arch/mips/kernel/uprobes.c: In function 'arch_uprobe_pre_xol':
arch/mips/kernel/uprobes.c:115:17: warning: variable 'epc' set but not used [-Wunused-but-set-variable]

It's never used since introduction in
commit 40e084a506eb ("MIPS: Add uprobes support.")

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Paul Burton <paul.burton@mips.com>
Cc: <ralf@linux-mips.org>
Cc: <jhogan@kernel.org>
Cc: <linux-kernel@vger.kernel.org>
Cc: <linux-mips@vger.kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/mips/kernel/uprobes.c

index f7a0645ccb82c446af586d6cbcf7b683c6b47a6b..6305e91ffc44d00fd2e6e4d096ce22f931b08775 100644 (file)
@@ -112,9 +112,6 @@ int arch_uprobe_pre_xol(struct arch_uprobe *aup, struct pt_regs *regs)
         */
        aup->resume_epc = regs->cp0_epc + 4;
        if (insn_has_delay_slot((union mips_instruction) aup->insn[0])) {
-               unsigned long epc;
-
-               epc = regs->cp0_epc;
                __compute_return_epc_for_insn(regs,
                        (union mips_instruction) aup->insn[0]);
                aup->resume_epc = regs->cp0_epc;