From: "Rafael J. Wysocki" <rafael@kernel.org>
To: Linux PM <linux-pm@vger.kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Ulf Hansson <ulf.hansson@linaro.org>,
Brian Norris <briannorris@chromium.org>,
Tiffany Lin <tiffany.lin@mediatek.com>,
Andrew-CT Chen <andrew-ct.chen@mediatek.com>,
Yunfei Dong <yunfei.dong@mediatek.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Matthias Brugger <matthias.bgg@gmail.com>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
linux-media@vger.kernel.org, linux-mediatek@lists.infradead.org
Subject: [PATCH v1 07/23] media: mediatek: vcodec: Discard pm_runtime_put() return value
Date: Mon, 22 Dec 2025 21:06:16 +0100 [thread overview]
Message-ID: <3690736.iIbC2pHGDl@rafael.j.wysocki> (raw)
In-Reply-To: <6245770.lOV4Wx5bFT@rafael.j.wysocki>
From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Printing error messages on pm_runtime_put() returning negative values
is not particularly useful.
Returning an error code from pm_runtime_put() merely means that it has
not queued up a 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 devices' runtime PM "control"
attribute in sysfs for one example.
Accordingly, update mtk_vcodec_enc_pw_off() and mtk_vcodec_dec_pw_off()
to simply discard the return value of pm_runtime_put().
This will facilitate a planned change of the pm_runtime_put() return
type to void in the future.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
This patch is part of a series, but it doesn't depend on anything else
in that series. The last patch in the series depends on it.
It can be applied by itself and if you decide to do so, please let me
know.
Otherwise, an ACK or equivalent will be appreciated, but also the lack
of specific criticism will be eventually regarded as consent.
---
drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_pm.c | 6 +-----
drivers/media/platform/mediatek/vcodec/encoder/mtk_vcodec_enc_pm.c | 6 +-----
2 files changed, 2 insertions(+), 10 deletions(-)
--- a/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_pm.c
+++ b/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_pm.c
@@ -67,11 +67,7 @@ static int mtk_vcodec_dec_pw_on(struct m
static void mtk_vcodec_dec_pw_off(struct mtk_vcodec_pm *pm)
{
- int ret;
-
- ret = pm_runtime_put(pm->dev);
- if (ret && ret != -EAGAIN)
- dev_err(pm->dev, "pm_runtime_put fail %d", ret);
+ pm_runtime_put(pm->dev);
}
static void mtk_vcodec_dec_clock_on(struct mtk_vcodec_pm *pm)
--- a/drivers/media/platform/mediatek/vcodec/encoder/mtk_vcodec_enc_pm.c
+++ b/drivers/media/platform/mediatek/vcodec/encoder/mtk_vcodec_enc_pm.c
@@ -71,11 +71,7 @@ int mtk_vcodec_enc_pw_on(struct mtk_vcod
void mtk_vcodec_enc_pw_off(struct mtk_vcodec_pm *pm)
{
- int ret;
-
- ret = pm_runtime_put(pm->dev);
- if (ret && ret != -EAGAIN)
- dev_err(pm->dev, "pm_runtime_put fail %d", ret);
+ pm_runtime_put(pm->dev);
}
void mtk_vcodec_enc_clock_on(struct mtk_vcodec_pm *pm)
parent reply other threads:[~2025-12-22 20:38 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <6245770.lOV4Wx5bFT@rafael.j.wysocki>]
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=3690736.iIbC2pHGDl@rafael.j.wysocki \
--to=rafael@kernel.org \
--cc=andrew-ct.chen@mediatek.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=briannorris@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-pm@vger.kernel.org \
--cc=matthias.bgg@gmail.com \
--cc=mchehab@kernel.org \
--cc=tiffany.lin@mediatek.com \
--cc=ulf.hansson@linaro.org \
--cc=yunfei.dong@mediatek.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