Skip to contentSkip to conversation

x86/iperm: remove unused pointers

PATCH In review Alex Shi 3 participants 3 messages Jan 21, 2020 – Jan 22, 2020 x86

lore
Share & tools
lore

Alex Shi

author
#0 lore raw

PATCH 1/1 x86/iperm: remove unused pointers

No one use the prev/next pointers in its function after commit 22fe5b0439dd ("x86/ioperm: Move TSS bitmap update to exit to user work"). So better to remove them.

Cc Thomas Gleixner <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Borislav Petkov <[email protected]>
Cc "H. Peter Anvin" <[email protected]>
Cc Andy Lutomirski <[email protected]>
Cc Rik van Riel <[email protected]>
Cc Dave Hansen <[email protected]>
Cc Waiman Long <[email protected]>
Cc Marcelo Tosatti <[email protected]>
---
 arch/x86/kernel/process.c | 4 ----
 1 file changed, 4 deletions(-)
arch/x86/kernel/process.c +0 -4
index 61e93a318983..839b5244e3b7 100644
@@ -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);
 
Signature · 1 line
1.8.3.1
Acked-by on v1 1/1
#1 lore raw
Quoted 27 lines · Alex Shi

No one use the prev/next pointers in its function after commit 22fe5b0439dd ("x86/ioperm: Move TSS bitmap update to exit to user work"). So better to remove them.

Cc Thomas Gleixner <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Borislav Petkov <[email protected]>
Cc "H. Peter Anvin" <[email protected]>
Cc Andy Lutomirski <[email protected]>
Cc Rik van Riel <[email protected]>
Cc Dave Hansen <[email protected]>
Cc Waiman Long <[email protected]>
Cc Marcelo Tosatti <[email protected]>
---
 arch/x86/kernel/process.c | 4 ----
 1 file changed, 4 deletions(-)
arch/x86/kernel/process.c +0 -0
index 61e93a318983..839b5244e3b7 100644
@@ -615,12 +615,8 @@ void speculation_ctrl_update_current(void)
 
 void __switch_to_xtra(struct task_struct *prev_p, struct task_struct *next_p)

arch/x86/kernel/process.c void speculation_ctrl_update_current(void) · line 622

Quoted 10 lines
arch/x86/kernel/process.c +0 -4
 {
-	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);
 
maintainer
#2 lore raw
In reply to Alex Shi
Quoted 28 lines · Alex Shi

No one use the prev/next pointers in its function after commit 22fe5b0439dd ("x86/ioperm: Move TSS bitmap update to exit to user work"). So better to remove them.

Cc Thomas Gleixner <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Borislav Petkov <[email protected]>
Cc "H. Peter Anvin" <[email protected]>
Cc Andy Lutomirski <[email protected]>
Cc Rik van Riel <[email protected]>
Cc Dave Hansen <[email protected]>
Cc Waiman Long <[email protected]>
Cc Marcelo Tosatti <[email protected]>
---
 arch/x86/kernel/process.c | 4 ----
 1 file changed, 4 deletions(-)
arch/x86/kernel/process.c +0 -0
index 61e93a318983..839b5244e3b7 100644
@@ -615,12 +615,8 @@ void speculation_ctrl_update_current(void)
 
 void __switch_to_xtra(struct task_struct *prev_p, struct task_struct *next_p)

arch/x86/kernel/process.c void speculation_ctrl_update_current(void) · line 622

Quoted 10 lines
arch/x86/kernel/process.c +0 -4
 {
-	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);
 

https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?h=x86/cleanups&id=27353d5785bca61bb49cfd7c78e14f1d21e66ec5

Signature · 4 lines
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette