mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] x86/cacheinfo: Remove unused trace variable
@ 2023-02-10 23:45 Borislav Petkov
  2023-02-11 10:01 ` [tip: x86/cleanups] " tip-bot2 for Borislav Petkov (AMD)
  0 siblings, 1 reply; 2+ messages in thread
From: Borislav Petkov @ 2023-02-10 23:45 UTC (permalink / raw)
  To: X86 ML; +Cc: LKML

From: "Borislav Petkov (AMD)" <bp@alien8.de>

15cd8812ab2c ("x86: Remove the CPU cache size printk's") removed the
last use of the trace local var. Remove it too and the useless trace
cache case.

No functional changes.

Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
---
 arch/x86/kernel/cpu/cacheinfo.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/arch/x86/kernel/cpu/cacheinfo.c b/arch/x86/kernel/cpu/cacheinfo.c
index f4e5aa27eec6..4063e8991211 100644
--- a/arch/x86/kernel/cpu/cacheinfo.c
+++ b/arch/x86/kernel/cpu/cacheinfo.c
@@ -734,7 +734,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;
@@ -835,9 +835,6 @@ 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;
 						}
 
 						break;
-- 
2.35.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [tip: x86/cleanups] x86/cacheinfo: Remove unused trace variable
  2023-02-10 23:45 [PATCH] x86/cacheinfo: Remove unused trace variable Borislav Petkov
@ 2023-02-11 10:01 ` tip-bot2 for Borislav Petkov (AMD)
  0 siblings, 0 replies; 2+ messages in thread
From: tip-bot2 for Borislav Petkov (AMD) @ 2023-02-11 10:01 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: Jiapeng Chong, Borislav Petkov (AMD), x86, linux-kernel

The following commit has been merged into the x86/cleanups branch of tip:

Commit-ID:     851026a2bf54e739a2e13723bf3c4513f3cbcdc9
Gitweb:        https://git.kernel.org/tip/851026a2bf54e739a2e13723bf3c4513f3cbcdc9
Author:        Borislav Petkov (AMD) <bp@alien8.de>
AuthorDate:    Sat, 11 Feb 2023 00:45:41 +01:00
Committer:     Borislav Petkov (AMD) <bp@alien8.de>
CommitterDate: Sat, 11 Feb 2023 10:43:31 +01:00

x86/cacheinfo: Remove unused trace variable

15cd8812ab2c ("x86: Remove the CPU cache size printk's") removed the
last use of the trace local var. Remove it too and the useless trace
cache case.

No functional changes.

Reported-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://lore.kernel.org/r/20230210234541.9694-1-bp@alien8.de
Link: http://lore.kernel.org/r/20220705073349.1512-1-jiapeng.chong@linux.alibaba.com
---
 arch/x86/kernel/cpu/cacheinfo.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/arch/x86/kernel/cpu/cacheinfo.c b/arch/x86/kernel/cpu/cacheinfo.c
index f4e5aa2..4063e89 100644
--- a/arch/x86/kernel/cpu/cacheinfo.c
+++ b/arch/x86/kernel/cpu/cacheinfo.c
@@ -734,7 +734,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;
@@ -835,9 +835,6 @@ 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;
 						}
 
 						break;

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-02-11 10:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-10 23:45 [PATCH] x86/cacheinfo: Remove unused trace variable Borislav Petkov
2023-02-11 10:01 ` [tip: x86/cleanups] " tip-bot2 for Borislav Petkov (AMD)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome