Skip to contentSkip to conversation

x86/mm: fix "cpu" set but not used

PATCH In review Qian Cai 4 participants 4 messages Feb 28, 2019 – Mar 7, 2019

Subsystems (2)
lore
Share & tools
lore

Qian Cai

author
#0 lore raw

PATCH 1/1 x86/mm: fix "cpu" set but not used

The commit a2055abe9c67 ("x86/mm: Pass flush_tlb_info to flush_tlb_others() etc") removed the unnecessary cpu parameter from uv_flush_tlb_others() but left an unused variable.

arch/x86/mm/tlb.c: In function 'native_flush_tlb_others':
arch/x86/mm/tlb.c:688:16: warning: variable 'cpu' set but not used [-Wunused-but-set-variable]

   unsigned int cpu;
                ^~~
---
 arch/x86/mm/tlb.c | 3 ---
 1 file changed, 3 deletions(-)
arch/x86/mm/tlb.c +0 -3
index 999d6d8f0bef..bc4bc7b2f075 100644
@@ -685,9 +685,6 @@ void native_flush_tlb_others(const struct cpumask *cpumask,
 		 * that UV should be updated so that smp_call_function_many(),
 		 * etc, are optimal on UV.
 		 */
-		unsigned int cpu;
-
-		cpu = smp_processor_id();
 		cpumask = uv_flush_tlb_others(cpumask, info);
 		if (cpumask)
 			smp_call_function_many(cpumask, flush_tlb_func_remote,
Signature · 1 line
2.17.2 (Apple Git-113)
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 11 lines · Qian Cai

The commit a2055abe9c67 ("x86/mm: Pass flush_tlb_info to flush_tlb_others() etc") removed the unnecessary cpu parameter from uv_flush_tlb_others() but left an unused variable.

arch/x86/mm/tlb.c: In function 'native_flush_tlb_others':
arch/x86/mm/tlb.c:688:16: warning: variable 'cpu' set but not used [-Wunused-but-set-variable]

   unsigned int cpu;
                ^~~
#2 lore raw

[tip:x86/urgent] x86/mm: Remove unused variable 'cpu'

In reply to Qian Cai
x86/mm: Remove unused variable 'cpu'
Commit-ID:  3609e31bc8dc03b701390f79c74fc7fe92b95039
Gitweb:     https://git.kernel.org/tip/3609e31bc8dc03b701390f79c74fc7fe92b95039
Author:     Qian Cai <[email protected]>
AuthorDate: Thu, 28 Feb 2019 17:01:55 -0500
Committer:  Thomas Gleixner <[email protected]>
CommitDate: Wed, 6 Mar 2019 23:24:52 +0100

x86/mm: Remove unused variable 'cpu'

The commit a2055abe9c67 ("x86/mm: Pass flush_tlb_info to flush_tlb_others() etc") removed the unnecessary cpu parameter from uv_flush_tlb_others() but left an unused variable.

arch/x86/mm/tlb.c: In function 'native_flush_tlb_others':
arch/x86/mm/tlb.c:688:16: warning: variable 'cpu' set but not used [-Wunused-but-set-variable]

   unsigned int cpu;
                ^~~
---
 arch/x86/mm/tlb.c | 3 ---
 1 file changed, 3 deletions(-)
arch/x86/mm/tlb.c +0 -3
index 999d6d8f0bef..bc4bc7b2f075 100644
@@ -685,9 +685,6 @@ void native_flush_tlb_others(const struct cpumask *cpumask,
 		 * that UV should be updated so that smp_call_function_many(),
 		 * etc, are optimal on UV.
 		 */
-		unsigned int cpu;
-
-		cpu = smp_processor_id();
 		cpumask = uv_flush_tlb_others(cpumask, info);
 		if (cpumask)
 			smp_call_function_many(cpumask, flush_tlb_func_remote,
#3 lore raw

Re: [tip:x86/urgent] x86/mm: Remove unused variable 'cpu'

A little confused,
https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?h=x86/cleanups&id=691b9ab6c9676e5868a4787be9041dd990005311

Quoted 50 lines · tip-bot for Qian Cai
Commit-ID:  3609e31bc8dc03b701390f79c74fc7fe92b95039
Gitweb:     https://git.kernel.org/tip/3609e31bc8dc03b701390f79c74fc7fe92b95039
Author:     Qian Cai <[email protected]>
AuthorDate: Thu, 28 Feb 2019 17:01:55 -0500
Committer:  Thomas Gleixner <[email protected]>
CommitDate: Wed, 6 Mar 2019 23:24:52 +0100

x86/mm: Remove unused variable 'cpu'

The commit a2055abe9c67 ("x86/mm: Pass flush_tlb_info to flush_tlb_others() etc") removed the unnecessary cpu parameter from uv_flush_tlb_others() but left an unused variable.

arch/x86/mm/tlb.c: In function 'native_flush_tlb_others':
arch/x86/mm/tlb.c:688:16: warning: variable 'cpu' set but not used [-Wunused-but-set-variable]

   unsigned int cpu;
                ^~~
---
 arch/x86/mm/tlb.c | 3 ---
 1 file changed, 3 deletions(-)
arch/x86/mm/tlb.c +0 -3
index 999d6d8f0bef..bc4bc7b2f075 100644
@@ -685,9 +685,6 @@ void native_flush_tlb_others(const struct cpumask *cpumask,
 		 * that UV should be updated so that smp_call_function_many(),
 		 * etc, are optimal on UV.
 		 */
-		unsigned int cpu;
-
-		cpu = smp_processor_id();
 		cpumask = uv_flush_tlb_others(cpumask, info);
 		if (cpumask)
 			smp_call_function_many(cpumask, flush_tlb_func_remote,

.