]> www.infradead.org Git - users/jedix/linux-maple.git/commit
PM: runtime: Convert pm_runtime_blocked() to static inline
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 27 Feb 2025 10:47:33 +0000 (11:47 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 3 Mar 2025 13:35:07 +0000 (14:35 +0100)
commit1476bb20eec33bd68b67c7bb7a5d62063af8148d
tree298c5de61bae671f0d922d864c598f6e1a0f61d6
parentcb88c229fe77ea16cef2b9c8154cf44d331818a6
PM: runtime: Convert pm_runtime_blocked() to static inline

The comment in pm_runtime_blocked() is acutally wrong: power.last_status
is not a bit field.  Its data type is an enum and so one can reasonably
assume that partial updates of it will not be observed.

Accordingly, pm_runtime_blocked() can be converted to a static inline
function and the related locking overhead can be eliminated, so long
as it is only used in system suspend/resume code paths because
power.last_status is not expected to be updated concurrently while
that code is running.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Link: https://patch.msgid.link/1923449.tdWV9SEqCh@rjwysocki.net
drivers/base/power/runtime.c
include/linux/pm_runtime.h