summaryrefslogtreecommitdiff
path: root/tools/power/cpupower/utils/helpers/cpuid.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2017-09-04 00:07:36 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2017-09-04 00:07:36 +0200
commitd97561f461e4cb5b2e170bc33b466cffbddc8719 (patch)
tree7be9749e40f2db48c0cebbc1d0eeadbda36c7ce9 /tools/power/cpupower/utils/helpers/cpuid.c
parent4afbce7b39d2b326616f0a87a6246b1383237868 (diff)
parentd0e4a193c33adaa4f91128d5393aa3589c2f3e9e (diff)
Merge branch 'pm-tools'
* pm-tools: tools/power/cpupower: allow running without cpu0 pm-graph: package makefile and man pages pm-graph: AnalyzeBoot v2.1 pm-graph: AnalyzeSuspend v4.7
Diffstat (limited to 'tools/power/cpupower/utils/helpers/cpuid.c')
-rw-r--r--tools/power/cpupower/utils/helpers/cpuid.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/power/cpupower/utils/helpers/cpuid.c b/tools/power/cpupower/utils/helpers/cpuid.c
index 39c2c7d067bb..32d37c9be791 100644
--- a/tools/power/cpupower/utils/helpers/cpuid.c
+++ b/tools/power/cpupower/utils/helpers/cpuid.c
@@ -42,7 +42,7 @@ cpuid_func(edx);
*
* TBD: Should there be a cpuid alternative for this if /proc is not mounted?
*/
-int get_cpu_info(unsigned int cpu, struct cpupower_cpu_info *cpu_info)
+int get_cpu_info(struct cpupower_cpu_info *cpu_info)
{
FILE *fp;
char value[64];
@@ -70,7 +70,7 @@ int get_cpu_info(unsigned int cpu, struct cpupower_cpu_info *cpu_info)
if (!strncmp(value, "processor\t: ", 12))
sscanf(value, "processor\t: %u", &proc);
- if (proc != cpu)
+ if (proc != (unsigned int)base_cpu)
continue;
/* Get CPU vendor */