Skip to content

Properly fix sysfs_get_idlestate_count()

Prarit Bhargava linux-pm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2Revert "tools: cpupower: fix return checks for sysfs_get_idlestate_count()"tools/power/cpupower/utils/cpuidle-info.c+4 -40 replies
2/2Fix no idle state information return valuetools/power/cpupower/utils/helpers/sysfs.c+1 -11 reply

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchThomas Renninger
1/2
2/2A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] Properly fix sysfs_get_idlestate_count()

My previous commit 16b7c275c055 ("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".

Patch 1 reverts my recent change and patch 2 fixes the problem correctly.

Sorry 'bout that Thomas. I should have caught that the the first time.

Cc Thomas Renninger <[email protected]>
Cc Rafael J. Wysocki <[email protected]>

Prarit Bhargava (2):
Revert "tools: cpupower: fix return checks for
sysfs_get_idlestate_count()"
Fix no idle state information return value

 tools/power/cpupower/utils/cpuidle-info.c  |    8 ++++----
 tools/power/cpupower/utils/helpers/sysfs.c |    2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)
Signature · 1 line
1.7.9.3