Skip to contentSkip to conversation

x86/tlb: remove unused varible 'cpu'

PATCH New Alex Shi 1 participant 1 message Nov 8, 2020

Subsystems (2)
lore
Share & tools
lore

Alex Shi

author
#0 lore raw

PATCH 1/1 x86/tlb: remove unused varible 'cpu'

It's not used, we could remove it to avoid a W1 warning:
arch/x86/mm/tlb.c:318:6: warning: variable ‘cpu’ set but not used [-Wunused-but-set-variable]

Cc Dave Hansen <[email protected]>
Cc Andy Lutomirski <[email protected]>
Cc "H. Peter Anvin" <[email protected]>
---
 arch/x86/mm/tlb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/x86/mm/tlb.c +2 -2
index 88e9ad5142e4..be2e9080ca79 100644
@@ -315,7 +315,7 @@ void leave_mm(int cpu)
 
 int enable_l1d_flush_for_task(struct task_struct *tsk)
 {
-	int cpu, ret = 0, i;
+	int ret = 0, i;
 
 	/*
 	 * Do not enable L1D_FLUSH_OUT if
@@ -328,7 +328,7 @@ int enable_l1d_flush_for_task(struct task_struct *tsk)
 			!static_cpu_has(X86_FEATURE_FLUSH_L1D))
 		return -EINVAL;
 
-	cpu = get_cpu();
+	get_cpu();
 
 	for_each_cpu(i, &tsk->cpus_mask) {
 		if (cpu_data(i).smt_active == true) {
Signature · 1 line
1.8.3.1