Re: [PATCH v2 00/17] iio: Stop looking at pm_runtime_put_autosuspend() return codes

From: Andy Shevchenko

Date: Thu Oct 22 2026 - 03:02:10 EST


On Wed, Oct 21, 2026 at 04:57:01PM -0700, Brian Norris wrote:
> Similar to this effort:
>
> Subject: [PATCH v1 00/23] PM: runtime: Convert pm_runtime_put() to a void function
> https://lore.kernel.org/all/6245770.lOV4Wx5bFT@rafael.j.wysocki/
>
> i.e., commit 3afd8df02433 ("PM: runtime: Change pm_runtime_put() return
> type to void") and friends.
>
> As with pm_runtime_put(), there is very little value in return-code
> checking for pm_runtime_put_autosuspend().
>
> Checking the return code is more likely to produce a race condition
> (fighting with user space writing "on" to the "control" attribute) than
> to tell a consumer useful info.
>
> Because the IIO subsystem has the bulk of drivers that inspect
> pm_runtime_put_autosuspend(), and because those drivers have a lot of
> other issues touching the same code (which Jonathan suggested [1] I
> fix -- I fix some, but not all), I'm sending an IIO-specific series
> under a v2 label (since many of the changes are still borrowed from the
> earlier series).

After three patches I stopped because it seems more works needs in each of
the individual drivers. Yes, the series can be applied as is in exchange for
a bigger additional churn in the future. My preference is to see everything
settled down in a single step.

--
With Best Regards,
Andy Shevchenko