]> git.baikalelectronics.ru Git - kernel.git/commit
Revert "tools: cpupower: fix return checks for sysfs_get_idlestate_count()"
authorPrarit Bhargava <prarit@redhat.com>
Sun, 14 Dec 2014 14:06:37 +0000 (09:06 -0500)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sun, 14 Dec 2014 21:14:16 +0000 (22:14 +0100)
commitbbfee650f719184201115e6c8c51e12c8c5d49b8
tree7839c0d9dfaf0146ae3b426cf036d1e3b8d9656c
parenta9cfd44a2730769d9e7c946039752ddae2a39ce8
Revert "tools: cpupower: fix return checks for sysfs_get_idlestate_count()"

This reverts commit a9cfd44a2730769d9e7c946039752ddae2a39ce8.

My previous commit a9cfd44a2730 ("tools: cpupower: fix return checks for
sysfs_get_idlestate_count()") was not correct.  After looking
at the changelog for cpupower I noticed that Thomas had changed the return of
sysfs_get_idlestate_count() to an unsigned int to simplify the code.  The
problem is really that both he (in his original change) and I (in my new
change) missed the obvious that sysfs_get_idlestate_count()
can't return -ENODEV.  It should just return 0 for "no c-states".

Fixes: a9cfd44a2730 (tools: cpupower: fix return checks for ...)
Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
tools/power/cpupower/utils/cpuidle-info.c