* [PATCH 00/13] PM: runtime: Convert pm_runtime_put_autosuspend() and friends to a void function
@ 2026-10-06 23:13 Brian Norris
2026-10-06 23:13 ` [PATCH 04/13] media: venus: Discard pm_runtime_put_autosuspend() return values Brian Norris
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Brian Norris @ 2026-10-06 23:13 UTC (permalink / raw)
To: Rafael J. Wysocki
Cc: linux-pm, Ulf Hansson, linux-kernel, Brian Norris,
Bryan O'Donoghue, Maíra Canal, Nuno Sá, Alex Elder,
Andy Shevchenko, Bard Liao, Bartosz Golaszewski, Bjorn Andersson,
Cezary Rojewski, Daniel Baluta, David Lechner, Dikshita Agarwal,
Geert Uytterhoeven, Greg Kroah-Hartman, Hadar Gat, Herbert Xu,
Jaroslav Kysela, Jessica Zhang, Johan Hovold, Jonathan Cameron,
Jyri Sarha, Kai Vehmanen, Liam Girdwood, Liam Girdwood,
Linus Walleij, Maarten Lankhorst, Magnus Damm, Marek Vasut,
Mark Brown, Mauro Carvalho Chehab, Maxime Ripard, Melissa Wen,
Neil Armstrong, Olivia Mackall, Peter Ujfalusi,
Pierre-Louis Bossart, Rui Miguel Silva, Srinivas Kandagatla,
Takashi Iwai, Thomas Zimmermann, Tomi Valkeinen, Vijendar Mukunda,
Vikash Garodia, dri-devel, greybus-dev, linux-arm-msm,
linux-crypto, linux-gpio, linux-iio, linux-media,
linux-renesas-soc, linux-sound, linux-spi, linux-staging,
sound-open-firmware
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 any of the other async __pm_runtime_suspend() and
__pm_runtime_idle() APIs:
pm_runtime_put_autosuspend()
pm_request_idle()
pm_request_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.
Nobody outside KUnit tests checks pm_request_idle() or
pm_request_autosuspend() return codes, but there are a number of
pm_runtime_put_autosuspend() callers that check its return code. Thus,
this series largely deals with pm_runtime_put_autosuspend().
Patches 1-11 are independent of each other, and similarly to the last
series, I expect the respective maintainers can pick them up. We can
apply patch 12 later. Patch 13 is also independent, but included in this
topic for completeness. It can be applied any time.
This touches a lot of trees/maintainers, so I tried to keep CC's only
for the relevant patch(es), plus the cover letter. I hope that's not too
noisy.
- Brian
Brian Norris (13):
hwrng: cctrng: Discard pm_runtime_put_autosuspend() return value
drm: Discard pm_runtime_put_autosuspend() return values
iio: Discard pm_runtime_put_autosuspend() return values
media: venus: Discard pm_runtime_put_autosuspend() return values
pinctrl: qcom: lpass-lpi: Discard pm_runtime_put_autosuspend() return
values
spi: ti-qspi: Discard pm_runtime_put_autosuspend() return value
greybus: Discard pm_runtime_put_autosuspend() return value
ALSA: hda: Discard pm_runtime_put_autosuspend() return value
ASoC: codecs: lpass: Discard pm_runtime_put_autosuspend() return
values
ASoC: intel: atom: Discard pm_runtime_put_autosuspend() return value
ASoC: SOF: Discard pm_runtime_put_autosuspend() return values
PM: runtime: Drop pm_runtime_put_autosuspend() return code
PM: runtime: Drop pm_request_{idle,autosuspend}() return codes
drivers/base/power/runtime-test.c | 8 ---
drivers/char/hw_random/cctrng.c | 6 +-
drivers/gpu/drm/panel/panel-simple.c | 8 +--
drivers/gpu/drm/tidss/tidss_drv.c | 7 +--
drivers/gpu/drm/v3d/v3d_drv.h | 4 +-
drivers/iio/accel/bmc150-accel-core.c | 14 ++---
drivers/iio/accel/fxls8962af-core.c | 11 +---
drivers/iio/accel/kxcjk-1013.c | 15 ++---
drivers/iio/accel/mma8452.c | 15 +++--
drivers/iio/accel/mma9551_core.c | 15 +++--
drivers/iio/adc/rcar-gyroadc.c | 4 +-
drivers/iio/adc/ti-ads1015.c | 8 +--
drivers/iio/chemical/atlas-sensor.c | 4 +-
.../common/hid-sensors/hid-sensor-trigger.c | 14 ++---
drivers/iio/gyro/bmg160_core.c | 17 +++--
drivers/iio/gyro/fxas21002c_core.c | 12 ++--
drivers/iio/imu/kmx61.c | 17 +++--
drivers/iio/light/apds9960.c | 2 +-
drivers/iio/light/isl29028.c | 15 +----
drivers/iio/light/pa12203001.c | 3 +-
drivers/iio/light/rpr0521.c | 15 +++--
drivers/iio/light/tsl2583.c | 27 ++------
drivers/iio/light/us5182d.c | 3 +-
drivers/media/platform/qcom/venus/vdec.c | 10 ++-
drivers/media/platform/qcom/venus/venc.c | 10 ++-
drivers/pinctrl/qcom/pinctrl-lpass-lpi.c | 16 +++--
drivers/spi/spi-ti-qspi.c | 6 +-
drivers/staging/greybus/power_supply.c | 8 +--
include/linux/greybus/bundle.h | 12 +---
include/linux/pm_runtime.h | 63 +++----------------
include/sound/hdaudio.h | 8 +--
sound/hda/core/device.c | 13 ++--
sound/soc/codecs/lpass-rx-macro.c | 4 +-
sound/soc/codecs/lpass-tx-macro.c | 4 +-
sound/soc/codecs/lpass-va-macro.c | 17 ++---
sound/soc/codecs/lpass-wsa-macro.c | 8 +--
sound/soc/intel/atom/sst/sst.h | 2 +-
sound/soc/intel/atom/sst/sst_drv_interface.c | 4 +-
sound/soc/intel/atom/sst/sst_pvt.c | 9 +--
sound/soc/sof/control.c | 6 +-
sound/soc/sof/sof-client-ipc-flood-test.c | 5 +-
.../soc/sof/sof-client-ipc-kernel-injector.c | 4 +-
sound/soc/sof/sof-client-ipc-msg-injector.c | 6 +-
sound/soc/sof/sof-client-probes.c | 18 ++----
44 files changed, 152 insertions(+), 325 deletions(-)
--
2.56.0.360.g66cac248cb-goog
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 04/13] media: venus: Discard pm_runtime_put_autosuspend() return values
2026-10-06 23:13 [PATCH 00/13] PM: runtime: Convert pm_runtime_put_autosuspend() and friends to a void function Brian Norris
@ 2026-10-06 23:13 ` Brian Norris
[not found] ` <6ac5ff76.95c05185.2f709d.b73b@mx.google.com>
2026-10-10 8:42 ` (subset) [PATCH 00/13] " Bartosz Golaszewski
2 siblings, 0 replies; 4+ messages in thread
From: Brian Norris @ 2026-10-06 23:13 UTC (permalink / raw)
To: Rafael J. Wysocki
Cc: linux-pm, Ulf Hansson, linux-kernel, Brian Norris,
Bryan O'Donoghue, Dikshita Agarwal, Mauro Carvalho Chehab,
Vikash Garodia, linux-arm-msm, linux-media
Propagating the pm_runtime_put_autosuspend() return value to callers 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.
Accordingly, update the Venus vdec and venc drivers to simply discard
the return value of pm_runtime_put_autosuspend().
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>
---
This patch is independent of the rest of the series, except for the end
(changing the return type). I expect it can be applied by individual
maintainers, and we pick up the end once the dust is settled.
drivers/media/platform/qcom/venus/vdec.c | 10 ++++------
drivers/media/platform/qcom/venus/venc.c | 10 ++++------
2 files changed, 8 insertions(+), 12 deletions(-)
diff --git a/drivers/media/platform/qcom/venus/vdec.c b/drivers/media/platform/qcom/venus/vdec.c
index 6a43ea191da1..35c1b6ec1f9f 100644
--- a/drivers/media/platform/qcom/venus/vdec.c
+++ b/drivers/media/platform/qcom/venus/vdec.c
@@ -644,12 +644,12 @@ static int vdec_pm_put(struct venus_inst *inst, bool autosuspend)
{
struct venus_core *core = inst->core;
struct device *dev = core->dev_dec;
- int ret;
+ int ret = 0;
mutex_lock(&core->pm_lock);
if (autosuspend)
- ret = pm_runtime_put_autosuspend(dev);
+ pm_runtime_put_autosuspend(dev);
else
ret = pm_runtime_put_sync(dev);
@@ -671,7 +671,7 @@ static int vdec_pm_get_put(struct venus_inst *inst)
if (ret < 0)
goto error;
- ret = pm_runtime_put_autosuspend(dev);
+ pm_runtime_put_autosuspend(dev);
}
error:
@@ -1200,9 +1200,7 @@ static int vdec_start_streaming(struct vb2_queue *q, unsigned int count)
if (ret)
goto put_power;
- ret = vdec_pm_put(inst, true);
- if (ret)
- goto error;
+ vdec_pm_put(inst, true);
ret = vdec_start_output(inst);
}
diff --git a/drivers/media/platform/qcom/venus/venc.c b/drivers/media/platform/qcom/venus/venc.c
index 79acf7c1ec9a..3c7c24dd7159 100644
--- a/drivers/media/platform/qcom/venus/venc.c
+++ b/drivers/media/platform/qcom/venus/venc.c
@@ -617,12 +617,12 @@ static int venc_pm_put(struct venus_inst *inst, bool autosuspend)
{
struct venus_core *core = inst->core;
struct device *dev = core->dev_enc;
- int ret;
+ int ret = 0;
mutex_lock(&core->pm_lock);
if (autosuspend)
- ret = pm_runtime_put_autosuspend(dev);
+ pm_runtime_put_autosuspend(dev);
else
ret = pm_runtime_put_sync(dev);
@@ -644,7 +644,7 @@ static int venc_pm_get_put(struct venus_inst *inst)
if (ret < 0)
goto error;
- ret = pm_runtime_put_autosuspend(dev);
+ pm_runtime_put_autosuspend(dev);
}
error:
@@ -1275,9 +1275,7 @@ static int venc_start_streaming(struct vb2_queue *q, unsigned int count)
if (ret)
goto put_power;
- ret = venc_pm_put(inst, true);
- if (ret)
- goto error;
+ venc_pm_put(inst, true);
ret = venc_set_properties(inst);
if (ret)
--
2.56.0.360.g66cac248cb-goog
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [00/13] PM: runtime: Convert pm_runtime_put_autosuspend() and friends to a void function
[not found] ` <6ac5ff76.95c05185.2f709d.b73b@mx.google.com>
@ 2026-10-08 0:39 ` Brian Norris
0 siblings, 0 replies; 4+ messages in thread
From: Brian Norris @ 2026-10-08 0:39 UTC (permalink / raw)
To: linux-media; +Cc: Linux Media CI
On Wed, Oct 07, 2026 at 01:14:46AM -0700, Patchwork Integration wrote:
> Applying: hwrng: cctrng: Discard pm_runtime_put_autosuspend() return value
> Applying: drm: Discard pm_runtime_put_autosuspend() return values
> Applying: iio: Discard pm_runtime_put_autosuspend() return values
> Patch failed at 0003 iio: Discard pm_runtime_put_autosuspend() return values
> error: patch failed: drivers/iio/adc/rcar-gyroadc.c:199
> error: drivers/iio/adc/rcar-gyroadc.c: patch does not apply
> error: patch failed: drivers/iio/light/isl29028.c:395
> error: drivers/iio/light/isl29028.c: patch does not apply
> error: patch failed: drivers/iio/light/tsl2583.c:640
> error: drivers/iio/light/tsl2583.c: patch does not apply
> hint: Use 'git am --show-current-patch=diff' to see the failed patch
> hint: When you have resolved this problem, run "git am --continue".
> hint: If you prefer to skip this patch, run "git am --skip" instead.
> hint: To restore the original branch and stop patching, run "git am --abort".
> hint: Disable this message with "git config advice.mergeConflict false"
My bad, I was based on the linux-pm -next tree, and not proper
linux-next. On the bright side, some of these conflicts are from others
removing the return-code checks during refactoring!
I've rebased, and I'll send v2 at some point, after giving other
subsystems a bit to look (and possibly apply) other parts of the series.
Brian
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: (subset) [PATCH 00/13] PM: runtime: Convert pm_runtime_put_autosuspend() and friends to a void function
2026-10-06 23:13 [PATCH 00/13] PM: runtime: Convert pm_runtime_put_autosuspend() and friends to a void function Brian Norris
2026-10-06 23:13 ` [PATCH 04/13] media: venus: Discard pm_runtime_put_autosuspend() return values Brian Norris
[not found] ` <6ac5ff76.95c05185.2f709d.b73b@mx.google.com>
@ 2026-10-10 8:42 ` Bartosz Golaszewski
2 siblings, 0 replies; 4+ messages in thread
From: Bartosz Golaszewski @ 2026-10-10 8:42 UTC (permalink / raw)
To: Rafael J. Wysocki, Brian Norris
Cc: Bartosz Golaszewski, linux-pm, Ulf Hansson, linux-kernel,
Bryan O'Donoghue, Maíra Canal, Nuno Sá, Alex Elder,
Andy Shevchenko, Bard Liao, Bartosz Golaszewski, Bjorn Andersson,
Cezary Rojewski, Daniel Baluta, David Lechner, Dikshita Agarwal,
Geert Uytterhoeven, Greg Kroah-Hartman, Hadar Gat, Herbert Xu,
Jaroslav Kysela, Jessica Zhang, Johan Hovold, Jonathan Cameron,
Jyri Sarha, Kai Vehmanen, Liam Girdwood, Liam Girdwood,
Linus Walleij, Maarten Lankhorst, Magnus Damm, Marek Vasut,
Mark Brown, Mauro Carvalho Chehab, Maxime Ripard, Melissa Wen,
Neil Armstrong, Olivia Mackall, Peter Ujfalusi,
Pierre-Louis Bossart, Rui Miguel Silva, Srinivas Kandagatla,
Takashi Iwai, Thomas Zimmermann, Tomi Valkeinen, Vijendar Mukunda,
Vikash Garodia, dri-devel, greybus-dev, linux-arm-msm,
linux-crypto, linux-gpio, linux-iio, linux-media,
linux-renesas-soc, linux-sound, linux-spi, linux-staging,
sound-open-firmware
On Tue, 06 Oct 2026 16:13:28 -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.
>
> [...]
Applied, thanks!
[05/13] pinctrl: qcom: lpass-lpi: Discard pm_runtime_put_autosuspend() return values
https://git.kernel.org/brgl/c/9bcd1725b0cc7954525e3d0d02fecaec7c7aab33
Best regards,
--
Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-10-10 8:42 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-06 23:13 [PATCH 00/13] PM: runtime: Convert pm_runtime_put_autosuspend() and friends to a void function Brian Norris
2026-10-06 23:13 ` [PATCH 04/13] media: venus: Discard pm_runtime_put_autosuspend() return values Brian Norris
[not found] ` <6ac5ff76.95c05185.2f709d.b73b@mx.google.com>
2026-10-08 0:39 ` [00/13] PM: runtime: Convert pm_runtime_put_autosuspend() and friends to a void function Brian Norris
2026-10-10 8:42 ` (subset) [PATCH 00/13] " Bartosz Golaszewski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox