public inbox for linux-mips@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] mips: remove unused variable 'prev_state'
@ 2021-03-31  8:54 Xu Jia
  2021-03-31  9:02 ` Colin Ian King
  2021-03-31  9:22 ` Dan Carpenter
  0 siblings, 2 replies; 3+ messages in thread
From: Xu Jia @ 2021-03-31  8:54 UTC (permalink / raw)
  To: xujia39, Thomas Bogendoerfer, Andrew Morton, Huacai Chen,
	WANG Xuerui, Dmitry Safonov, Liangliang Huang, Xingxing Su,
	Huang Pei
  Cc: linux-mips, kernel-janitors

GCC reports the following warning with W=1:

arch/mips/kernel/traps.c:1593:17: warning:
 variable 'prev_state' set but not used [-Wunused-but-set-variable]
 1593 |  enum ctx_state prev_state;
      |                 ^~~~~~~~~~

This variable is not used in function , this commit
remove it to fix the warning.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Xu Jia <xujia39@huawei.com>
---
 arch/mips/kernel/traps.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c
index 808b8b61ded1..d1f23ddf0c8c 100644
--- a/arch/mips/kernel/traps.c
+++ b/arch/mips/kernel/traps.c
@@ -1590,10 +1590,8 @@ asmlinkage void do_watch(struct pt_regs *regs)
 asmlinkage void do_mcheck(struct pt_regs *regs)
 {
 	int multi_match = regs->cp0_status & ST0_TS;
-	enum ctx_state prev_state;
 	mm_segment_t old_fs = get_fs();
 
-	prev_state = exception_enter();
 	show_regs(regs);
 
 	if (multi_match) {


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-03-31  9:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-31  8:54 [PATCH -next] mips: remove unused variable 'prev_state' Xu Jia
2021-03-31  9:02 ` Colin Ian King
2021-03-31  9:22 ` Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox