From: Brian Norris <briannorris@chromium.org>
To: Jonathan Cameron <jic23@kernel.org>
Cc: linux-iio@vger.kernel.org, "Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
"David Lechner" <dlechner@baylibre.com>,
"Jonathan Cameron" <jonathan.cameron@oss.qualcomm.com>
Subject: Re: [PATCH v3 1/2] iio: gyro: fxas21002c: Discard pm_runtime_put_autosuspend() return values
Date: Mon, 26 Oct 2026 10:42:09 -0700 [thread overview]
Message-ID: <at-Q8f-BKoExUH0e@google.com> (raw)
In-Reply-To: <20261026032051.1004536-2-jic23@kernel.org>
On Mon, Oct 26, 2026 at 03:20:50AM +0000, Jonathan Cameron wrote:
> From: Brian Norris <briannorris@chromium.org>
>
> This 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.
>
> With the driver modified to discard the pm_runtime_put_autosuspend()
> return value, it becomes simple to use PM_RUNTIME_ACQUIRE() and
> guard(mutex)() to simpify two locations. At the remaining location
> simply dicusard the return value.
>
> 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@chromium.org>
> Signed-off-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>
>
> ---
>
> Brian, given this tweaked your patch a fair bit, please let me know
> if you are fine with this. Hopefully I didn't mess anything up!
Fine with me. Not sure if it's appropriate for "my own" patch, but:
Reviewed-by: Brian Norris <briannorris@chromium.org>
next prev parent reply other threads:[~2026-10-26 17:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-26 3:20 [PATCH v3 0/2] iio: fxas210002c: Discard pm_runtime_put_autosuspend() return and related cleanup Jonathan Cameron
2026-10-26 3:20 ` [PATCH v3 1/2] iio: gyro: fxas21002c: Discard pm_runtime_put_autosuspend() return values Jonathan Cameron
2026-10-26 9:54 ` Andy Shevchenko
2026-10-26 17:42 ` Brian Norris [this message]
2026-10-26 3:20 ` [PATCH v3 2/2] iio: gyro: fxs210002c: Use guard(mutex)() for remaining simple cases Jonathan Cameron
2026-10-26 9:56 ` Andy Shevchenko
2026-10-26 17:48 ` Brian Norris
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=at-Q8f-BKoExUH0e@google.com \
--to=briannorris@chromium.org \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=jonathan.cameron@oss.qualcomm.com \
--cc=linux-iio@vger.kernel.org \
--cc=nuno.sa@analog.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox