From: Luca Ceresoli <luca.ceresoli@bootlin.com>
To: "Xichao Zhao" <zhao.xichao@vivo.com>,
"Uwe Kleine-König" <u.kleine-koenig@baylibre.com>
Cc: thierry.reding@gmail.com, jonathanh@nvidia.com,
skomatineni@nvidia.com, mchehab@kernel.org,
gregkh@linuxfoundation.org, linux-media@vger.kernel.org,
linux-tegra@vger.kernel.org, linux-staging@lists.linux.dev,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: media: tegra-video: Remove the use of dev_err_probe()
Date: Tue, 19 Aug 2025 12:28:30 +0200 [thread overview]
Message-ID: <20250819122830.3d4874ed@booty> (raw)
In-Reply-To: <20250819092330.550046-1-zhao.xichao@vivo.com>
Hello Xichao, Uwe,
+Uwe, author of 2f3cfd2f4b7c ("driver core: Make dev_err_probe() silent
for -ENOMEM").
On Tue, 19 Aug 2025 17:23:30 +0800
Xichao Zhao <zhao.xichao@vivo.com> wrote:
> The dev_err_probe() doesn't do anything when error is '-ENOMEM'. Therefore,
> remove the useless call to dev_err_probe(), and just return the value instead.
>
> Signed-off-by: Xichao Zhao <zhao.xichao@vivo.com>
> ---
> drivers/staging/media/tegra-video/tegra20.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/media/tegra-video/tegra20.c b/drivers/staging/media/tegra-video/tegra20.c
> index 7b8f8f810b35..ee65e89c119c 100644
> --- a/drivers/staging/media/tegra-video/tegra20.c
> +++ b/drivers/staging/media/tegra-video/tegra20.c
> @@ -255,7 +255,7 @@ static int tegra20_channel_host1x_syncpt_init(struct tegra_vi_channel *chan)
>
> out_sp = host1x_syncpt_request(&vi->client, HOST1X_SYNCPT_CLIENT_MANAGED);
> if (!out_sp)
> - return dev_err_probe(vi->dev, -ENOMEM, "failed to request syncpoint\n");
> + return -ENOMEM;
Thanks for your patch!
Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
About dev_err_probe(), I wonder whether it should mention the -ENOMEM
exception in kerneldoc. Is it part of the API "contract" it provides?
It would be good to clarify that, because there are other users of
dev_err_probe(..., -ENOMEM, ...). I counted 80 with a trivial git grep.
Luca
--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2025-08-19 10:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-19 9:23 Xichao Zhao
2025-08-19 10:28 ` Luca Ceresoli [this message]
2025-08-19 10:57 ` 赵西超
2025-08-19 11:13 ` Uwe Kleine-König
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=20250819122830.3d4874ed@booty \
--to=luca.ceresoli@bootlin.com \
--cc=gregkh@linuxfoundation.org \
--cc=jonathanh@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=linux-tegra@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=skomatineni@nvidia.com \
--cc=thierry.reding@gmail.com \
--cc=u.kleine-koenig@baylibre.com \
--cc=zhao.xichao@vivo.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
all inboxes | Powered by JetHome®