lkml.org 
[lkml]   [2019]   [Dec]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] x86/process: remove unused variable in __switch_to_xtra()
Date
After the commit ecc7e37d4dad ("x86/io: Speedup schedule out of I/O
bitmap user") and commit 22fe5b0439dd ("x86/ioperm: Move TSS bitmap
update to exit to user work"), warning is found:

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]
struct thread_struct *prev, *next;
^~~~
arch/x86/kernel/process.c:618:24: warning: variable ‘prev’ set but not
used [-Wunused-but-set-variable]
struct thread_struct *prev, *next;
^~~~
Fix this by removing the unused variable @prev and @next;

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

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);

--
2.7.4
\
 
 \ /
  Last update: 2019-12-17 13:10    [W:0.027 / U:0.520 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site