]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
tools/x86/kcpuid: Remove unused variable
authorAhmed S. Darwish <darwi@linutronix.de>
Thu, 18 Jul 2024 13:47:41 +0000 (15:47 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Fri, 2 Aug 2024 07:17:18 +0000 (09:17 +0200)
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
tools/arch/x86/kcpuid/kcpuid.c

index 24b7d017ec2c112fb99d4f4721cf1d3077e46fa1..e1973d8b322e80f500be573edbf2e486e07246b9 100644 (file)
@@ -76,7 +76,6 @@ struct cpuid_range {
  */
 struct cpuid_range *leafs_basic, *leafs_ext;
 
-static int num_leafs;
 static bool is_amd;
 static bool show_details;
 static bool show_raw;
@@ -246,7 +245,6 @@ struct cpuid_range *setup_cpuid_range(u32 input_eax)
                allzero = cpuid_store(range, f, subleaf, eax, ebx, ecx, edx);
                if (allzero)
                        continue;
-               num_leafs++;
 
                if (!has_subleafs(f))
                        continue;
@@ -272,7 +270,6 @@ struct cpuid_range *setup_cpuid_range(u32 input_eax)
                                                eax, ebx, ecx, edx);
                        if (allzero)
                                continue;
-                       num_leafs++;
                }
 
        }