lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Sun,  8 Nov 2020 14:47:04 +0800
From:   Alex Shi <alex.shi@...ux.alibaba.com>
To:     unlisted-recipients:; (no To-header on input)
Cc:     Dave Hansen <dave.hansen@...ux.intel.com>,
        Andy Lutomirski <luto@...nel.org>, x86@...nel.org,
        "H. Peter Anvin" <hpa@...or.com>, linux-kernel@...r.kernel.org
Subject: [PATCH] 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]

Signed-off-by: Alex Shi <alex.shi@...ux.alibaba.com>
Cc: Dave Hansen <dave.hansen@...ux.intel.com> 
Cc: Andy Lutomirski <luto@...nel.org> 
Cc: x86@...nel.org 
Cc: "H. Peter Anvin" <hpa@...or.com> 
Cc: linux-kernel@...r.kernel.org 
---
 arch/x86/mm/tlb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/mm/tlb.c b/arch/x86/mm/tlb.c
index 88e9ad5142e4..be2e9080ca79 100644
--- a/arch/x86/mm/tlb.c
+++ b/arch/x86/mm/tlb.c
@@ -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) {
-- 
1.8.3.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ