x86/process: remove set but not used varibles 'prev' and 'next'
diff mbox series

Message ID 20191213121253.10072-1-yukuai3@huawei.com
State Accepted
Commit 27353d5785bca61bb49cfd7c78e14f1d21e66ec5
Headers show
Series
  • x86/process: remove set but not used varibles 'prev' and 'next'
Related show

Commit Message

yu kuai Dec. 13, 2019, 12:12 p.m. UTC
Fixes gcc '-Wunused-but-set-variable' warning:

arch/x86/kernel/process.c: In function ‘__switch_to_xtra’:
arch/x86/kernel/process.c:618:31: warning: variable ‘next’ set
but not used [-Wunused-but-set-variable]
arch/x86/kernel/process.c:618:24: warning: variable ‘prev’ set
but not used [-Wunused-but-set-variable]

They are never used, and so can be removed.

Signed-off-by: yu kuai <yukuai3@huawei.com>
---
 arch/x86/kernel/process.c | 4 ----
 1 file changed, 4 deletions(-)

Patch
diff mbox series

diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c
index 61e93a318983..839b5244e3b7 100644
--- a/arch/x86/kernel/process.c
+++ b/arch/x86/kernel/process.c
@@ -615,12 +615,8 @@  void speculation_ctrl_update_current(void)
 
 void __switch_to_xtra(struct task_struct *prev_p, struct task_struct *next_p)
 {
-	struct thread_struct *prev, *next;
 	unsigned long tifp, tifn;
 
-	prev = &prev_p->thread;
-	next = &next_p->thread;
-
 	tifn = READ_ONCE(task_thread_info(next_p)->flags);
 	tifp = READ_ONCE(task_thread_info(prev_p)->flags);