diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/power/cpupower/utils/cpuidle-info.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/power/cpupower/utils/cpuidle-info.c b/tools/power/cpupower/utils/cpuidle-info.c index 458d69b444ad..75e66de7e7a7 100644 --- a/tools/power/cpupower/utils/cpuidle-info.c +++ b/tools/power/cpupower/utils/cpuidle-info.c | |||
@@ -22,13 +22,13 @@ | |||
22 | 22 | ||
23 | static void cpuidle_cpu_output(unsigned int cpu, int verbose) | 23 | static void cpuidle_cpu_output(unsigned int cpu, int verbose) |
24 | { | 24 | { |
25 | int idlestates, idlestate; | 25 | unsigned int idlestates, idlestate; |
26 | char *tmp; | 26 | char *tmp; |
27 | 27 | ||
28 | printf(_ ("Analyzing CPU %d:\n"), cpu); | 28 | printf(_ ("Analyzing CPU %d:\n"), cpu); |
29 | 29 | ||
30 | idlestates = sysfs_get_idlestate_count(cpu); | 30 | idlestates = sysfs_get_idlestate_count(cpu); |
31 | if (idlestates < 1) { | 31 | if (idlestates == 0) { |
32 | printf(_("CPU %u: No idle states\n"), cpu); | 32 | printf(_("CPU %u: No idle states\n"), cpu); |
33 | return; | 33 | return; |
34 | } | 34 | } |
@@ -100,10 +100,10 @@ static void cpuidle_general_output(void) | |||
100 | static void proc_cpuidle_cpu_output(unsigned int cpu) | 100 | static void proc_cpuidle_cpu_output(unsigned int cpu) |
101 | { | 101 | { |
102 | long max_allowed_cstate = 2000000000; | 102 | long max_allowed_cstate = 2000000000; |
103 | int cstate, cstates; | 103 | unsigned int cstate, cstates; |
104 | 104 | ||
105 | cstates = sysfs_get_idlestate_count(cpu); | 105 | cstates = sysfs_get_idlestate_count(cpu); |
106 | if (cstates < 1) { | 106 | if (cstates == 0) { |
107 | printf(_("CPU %u: No C-states info\n"), cpu); | 107 | printf(_("CPU %u: No C-states info\n"), cpu); |
108 | return; | 108 | return; |
109 | } | 109 | } |