diff options
author | Thomas Renninger <trenn@suse.de> | 2013-06-28 17:34:29 +0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-07-05 03:52:19 +0400 |
commit | f605181abd95a109031a23c67a824eb8e5dcfe67 (patch) | |
tree | 5601199a58e0c9f5d1cd1a3e4a07457ca7070247 /tools/power/cpupower/utils/helpers | |
parent | f991fae5c6d42dfc5029150b05a78cf3f6c18cc9 (diff) | |
download | linux-f605181abd95a109031a23c67a824eb8e5dcfe67.tar.xz |
cpupower: Make idlestate usage unsigned
Use unsigned int as the data type for some variables related to CPU
idle states which allows the code to be simplified slightly.
[rjw: Changelog]
Signed-off-by: Thomas Renninger <trenn@suse.de>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'tools/power/cpupower/utils/helpers')
-rw-r--r-- | tools/power/cpupower/utils/helpers/sysfs.c | 2 | ||||
-rw-r--r-- | tools/power/cpupower/utils/helpers/sysfs.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/tools/power/cpupower/utils/helpers/sysfs.c b/tools/power/cpupower/utils/helpers/sysfs.c index 38ab91629463..891f6710d026 100644 --- a/tools/power/cpupower/utils/helpers/sysfs.c +++ b/tools/power/cpupower/utils/helpers/sysfs.c @@ -238,7 +238,7 @@ char *sysfs_get_idlestate_desc(unsigned int cpu, unsigned int idlestate) * Negativ in error case * Zero if cpuidle does not export any C-states */ -int sysfs_get_idlestate_count(unsigned int cpu) +unsigned int sysfs_get_idlestate_count(unsigned int cpu) { char file[SYSFS_PATH_MAX]; struct stat statbuf; diff --git a/tools/power/cpupower/utils/helpers/sysfs.h b/tools/power/cpupower/utils/helpers/sysfs.h index 8cb797bbceb0..0401a97a4cab 100644 --- a/tools/power/cpupower/utils/helpers/sysfs.h +++ b/tools/power/cpupower/utils/helpers/sysfs.h @@ -19,7 +19,7 @@ extern char *sysfs_get_idlestate_name(unsigned int cpu, unsigned int idlestate); extern char *sysfs_get_idlestate_desc(unsigned int cpu, unsigned int idlestate); -extern int sysfs_get_idlestate_count(unsigned int cpu); +extern unsigned int sysfs_get_idlestate_count(unsigned int cpu); extern char *sysfs_get_cpuidle_governor(void); extern char *sysfs_get_cpuidle_driver(void); |