summaryrefslogtreecommitdiff
path: root/tools/perf/examples/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2025-12-22 21:36:25 +0100
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2026-02-23 14:08:17 +0100
commit3afd8df024339c7da1a5a0302f3987866dd16e40 (patch)
tree2c3826b5ba54824abba65ac9adf32b39229ccc04 /tools/perf/examples/git@git.tavy.me:linux.git
parent7a73801fdaf8aee90d23ba77976082a48d156a21 (diff)
PM: runtime: Change pm_runtime_put() return type to void
The primary role of pm_runtime_put() is to decrement the runtime PM usage counter of the given device. It always does that regardless of the value returned by it later. In addition, if the runtime PM usage counter after decrementation turns out to be zero, a work item is queued up to check whether or not the device can be suspended. This is not guaranteed to succeed though and even if it is successful, the device may still not be suspended going forward. There are multiple valid reasons why pm_runtime_put() may not decide to queue up the work item mentioned above, including, but not limited to, the case when user space has written "on" to the device's runtime PM "control" file in sysfs. In all of those cases, pm_runtime_put() returns a negative error code (even though the device's runtime PM usage counter has been successfully decremented by it) which is very confusing. In fact, its return value should only be used for debug purposes and care should be taken when doing it even in that case. Accordingly, to avoid the confusion mentioned above, change the return type of pm_runtime_put() to void. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org> Reviewed-by: Brian Norris <briannorris@chromium.org> Link: https://patch.msgid.link/14387202.RDIVbhacDa@rafael.j.wysocki
Diffstat (limited to 'tools/perf/examples/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions