All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86/CPU: drop set but unused variable
@ 2022-07-05  7:33 Jiapeng Chong
  0 siblings, 0 replies; only message in thread
From: Jiapeng Chong @ 2022-07-05  7:33 UTC (permalink / raw)
  To: tglx; +Cc: mingo, bp, dave.hansen, x86, hpa, linux-kernel, Jiapeng Chong

The following warning showed up when compiling with W=1.

arch/x86/kernel/cpu/cacheinfo.c:730:15: warning: variable 'trace' set but not used [-Wunused-but-set-variable].

Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
 arch/x86/kernel/cpu/cacheinfo.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/arch/x86/kernel/cpu/cacheinfo.c b/arch/x86/kernel/cpu/cacheinfo.c
index 66556833d7af..7ef070fbc14c 100644
--- a/arch/x86/kernel/cpu/cacheinfo.c
+++ b/arch/x86/kernel/cpu/cacheinfo.c
@@ -727,7 +727,7 @@ void init_hygon_cacheinfo(struct cpuinfo_x86 *c)
 void init_intel_cacheinfo(struct cpuinfo_x86 *c)
 {
 	/* Cache sizes */
-	unsigned int trace = 0, l1i = 0, l1d = 0, l2 = 0, l3 = 0;
+	unsigned int l1i = 0, l1d = 0, l2 = 0, l3 = 0;
 	unsigned int new_l1d = 0, new_l1i = 0; /* Cache sizes from cpuid(4) */
 	unsigned int new_l2 = 0, new_l3 = 0, i; /* Cache sizes from cpuid(4) */
 	unsigned int l2_id = 0, l3_id = 0, num_threads_sharing, index_msb;
@@ -828,9 +828,11 @@ void init_intel_cacheinfo(struct cpuinfo_x86 *c)
 						case LVL_3:
 							l3 += cache_table[k].size;
 							break;
-						case LVL_TRACE:
-							trace += cache_table[k].size;
-							break;
+						/*
+						 * case LVL_TRACE:
+						 *	trace += cache_table[k].size;
+						 *	break;
+						 */
 						}
 
 						break;
-- 
2.20.1.7.g153144c


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-07-05  7:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-05  7:33 [PATCH] x86/CPU: drop set but unused variable Jiapeng Chong

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.