Skip to content

Commit 39e4700

Browse files
Ahmed S. DarwishKAGA-KOKO
authored andcommitted
tools/x86/kcpuid: Remove unused variable
Global variable "num_leafs" is set in multiple places but is never read anywhere. Remove it. Signed-off-by: Ahmed S. Darwish <darwi@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/all/20240718134755.378115-2-darwi@linutronix.de
1 parent 59c3400 commit 39e4700

1 file changed

Lines changed: 0 additions & 3 deletions

File tree

tools/arch/x86/kcpuid/kcpuid.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ struct cpuid_range {
7676
*/
7777
struct cpuid_range *leafs_basic, *leafs_ext;
7878

79-
static int num_leafs;
8079
static bool is_amd;
8180
static bool show_details;
8281
static bool show_raw;
@@ -246,7 +245,6 @@ struct cpuid_range *setup_cpuid_range(u32 input_eax)
246245
allzero = cpuid_store(range, f, subleaf, eax, ebx, ecx, edx);
247246
if (allzero)
248247
continue;
249-
num_leafs++;
250248

251249
if (!has_subleafs(f))
252250
continue;
@@ -272,7 +270,6 @@ struct cpuid_range *setup_cpuid_range(u32 input_eax)
272270
eax, ebx, ecx, edx);
273271
if (allzero)
274272
continue;
275-
num_leafs++;
276273
}
277274

278275
}

0 commit comments

Comments
 (0)