summaryrefslogtreecommitdiff
path: root/tools/power/cpupower/utils/cpuidle-info.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-03-29 16:03:12 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2012-03-29 16:03:12 -0700
commit1c036588772d01655d851f75dffc27c971e072e2 (patch)
treeee35c5ecc726d4fdb77c462cccbe499d1c3292b7 /tools/power/cpupower/utils/cpuidle-info.c
parenta6f707b601c3f85d4b816ea08a757ea1af4f1cc0 (diff)
parentf16603386b38c28979f4df1cafdc2fe73fa87d37 (diff)
downloadlinux-1c036588772d01655d851f75dffc27c971e072e2.tar.gz
Merge git://git.kernel.org/pub/scm/linux/kernel/git/brodo/cpupowerutils
Pull cpupower updates from Dominik Brodowski. * git://git.kernel.org/pub/scm/linux/kernel/git/brodo/cpupowerutils: cpupower tools: add install target to the debug tools' makefiles cpupower tools: allow to build debug tools in a separate directory too cpupower: Fix broken mask values cpupower tool: allow to build in a separate directory cpupower tool: makefile: simplify the recipe used to generate cpupower.pot target cpupower tool: remove use of undefined variables from the clean target of the top makefile cpupower: Fix linking with --as-needed cpupower: Remove unneeded code and by that fix a memleak cpupower: Fix number of idle states cpupower: Unify cpupower-frequency-* manpages cpupower: Add cpupower-idle-info manpage cpupower: AMD fam14h/Ontario monitor can also be used by fam12h cpus cpupower: Better interface for accessing AMD pci registers
Diffstat (limited to 'tools/power/cpupower/utils/cpuidle-info.c')
-rw-r--r--tools/power/cpupower/utils/cpuidle-info.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/tools/power/cpupower/utils/cpuidle-info.c b/tools/power/cpupower/utils/cpuidle-info.c
index b028267c1376..8145af5f93a6 100644
--- a/tools/power/cpupower/utils/cpuidle-info.c
+++ b/tools/power/cpupower/utils/cpuidle-info.c
@@ -35,17 +35,9 @@ static void cpuidle_cpu_output(unsigned int cpu, int verbose)
printf(_("CPU %u: Can't read idle state info\n"), cpu);
return;
}
- tmp = sysfs_get_idlestate_name(cpu, idlestates - 1);
- if (!tmp) {
- printf(_("Could not determine max idle state %u\n"),
- idlestates - 1);
- return;
- }
-
printf(_("Number of idle states: %d\n"), idlestates);
-
printf(_("Available idle states:"));
- for (idlestate = 1; idlestate < idlestates; idlestate++) {
+ for (idlestate = 0; idlestate < idlestates; idlestate++) {
tmp = sysfs_get_idlestate_name(cpu, idlestate);
if (!tmp)
continue;
@@ -57,7 +49,7 @@ static void cpuidle_cpu_output(unsigned int cpu, int verbose)
if (!verbose)
return;
- for (idlestate = 1; idlestate < idlestates; idlestate++) {
+ for (idlestate = 0; idlestate < idlestates; idlestate++) {
tmp = sysfs_get_idlestate_name(cpu, idlestate);
if (!tmp)
continue;