Re: [PATCH v2 12/17] iio: imu: kmx61: Discard pm_runtime_put_autosuspend() return values
From: Jonathan Cameron
Date: Sun Oct 25 2026 - 21:14:15 EST
On Wed, 21 Oct 2026 16:57:13 -0700
Brian Norris <briannorris@xxxxxxxxxxxx> wrote:
> The kmx61 driver propagates the return value of
> pm_runtime_put_autosuspend(), which is not particularly useful.
>
> Returning an error code from pm_runtime_put_autosuspend() merely means
> that it has not queued up a timer or work item to check whether or not
> the device can be suspended and there are many perfectly valid
> situations in which that can happen, like after writing "on" to the
> device's runtime PM "control" attribute in sysfs for one example.
>
> For this reason, modify this driver to simply discard the
> pm_runtime_put_autosuspend() return value.
>
> Note: kmx61_set_power_state() is a possible inlining candidate, but it
> performs some non-trivial logic on the {acc,mag}_ps fields, so I leave
> it alone.
>
> This will facilitate a planned change of the
> pm_runtime_put_autosuspend() return type to void in the future, similar
> to commit 3afd8df02433 ("PM: runtime: Change pm_runtime_put() return
> type to void").
>
> Signed-off-by: Brian Norris <briannorris@xxxxxxxxxxxx>
Agreed with your analysis that inlining this one hits some non
obvious complexity. So applied - maybe as step one of of
cleaning this up more generally.
Thanks,
Jonathan