From: Tudor Ambarus <tudor.ambarus@linaro.org>
To: "André Draszik" <andre.draszik@linaro.org>,
"Krzysztof Kozlowski" <krzk@kernel.org>,
"Alim Akhtar" <alim.akhtar@samsung.com>
Cc: Peter Griffin <peter.griffin@linaro.org>,
Will McVicker <willmcvicker@google.com>,
kernel-team@android.com, linux-kernel@vger.kernel.org,
linux-samsung-soc@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Subject: Re: [PATCH 3/3] firmware: exynos-acpm: convert to dev_err_probe() in client API
Date: Mon, 17 Mar 2025 11:11:01 +0000 [thread overview]
Message-ID: <75f49e65-5a8a-4a52-bed9-31be4a76d536@linaro.org> (raw)
In-Reply-To: <20250314-acpm-fixes-v1-3-ab03ca8e723f@linaro.org>
On 3/14/25 4:40 PM, André Draszik wrote:
> dev_err_probe() exists to simplify code and unify error messages by
> using its message template.
>
> Convert the remaining dev_err() in acpm_get_by_phandle() to
> dev_err_probe().
>
> Signed-off-by: André Draszik <andre.draszik@linaro.org>
> ---
> drivers/firmware/samsung/exynos-acpm.c | 10 ++++++----
> 1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/firmware/samsung/exynos-acpm.c b/drivers/firmware/samsung/exynos-acpm.c
> index 48f1e3cacaa709ae703115169df138b659ddae44..03f907a95c6acd66d89cd8af2f52e7c6dadf492a 100644
> --- a/drivers/firmware/samsung/exynos-acpm.c
> +++ b/drivers/firmware/samsung/exynos-acpm.c
> @@ -701,12 +701,14 @@ static const struct acpm_handle *acpm_get_by_phandle(struct device *dev,
>
> link = device_link_add(dev, &pdev->dev, DL_FLAG_AUTOREMOVE_SUPPLIER);
> if (!link) {
> - dev_err(&pdev->dev,
> - "Failed to create device link to consumer %s.\n",
> - dev_name(dev));
> + int ret = -EINVAL;
> +
> + dev_err_probe(&pdev->dev, ret,
> + "Failed to create device link to consumer %s.\n",
> + dev_name(dev));
> platform_device_put(pdev);
> module_put(pdev->dev.driver->owner);
> - return ERR_PTR(-EINVAL);
> + return ERR_PTR(ret);
> }
>
> return &acpm->handle;
>
The clients are indeed expected to call this method in their probe
method. Shall we make such assumption? I'm in the middle here, but I
don't mind if this gets queued:
Reviewed-by: Tudor Ambarus <tudor.ambarus@linaro.org>
next prev parent reply other threads:[~2025-03-17 11:11 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-14 16:40 [PATCH 0/3] firmware: exynos-acpm: read fix & reduce log verbosity André Draszik
2025-03-14 16:40 ` [PATCH 1/3] firmware: exynos-acpm: fix reading longer results André Draszik
2025-03-17 10:23 ` Tudor Ambarus
2025-03-14 16:40 ` [PATCH 2/3] firmware: exynos-acpm: silence EPROBE_DEFER error on boot André Draszik
2025-03-17 10:26 ` Tudor Ambarus
2025-03-17 10:48 ` Tudor Ambarus
2025-03-18 20:48 ` André Draszik
2025-03-14 16:40 ` [PATCH 3/3] firmware: exynos-acpm: convert to dev_err_probe() in client API André Draszik
2025-03-17 11:11 ` Tudor Ambarus [this message]
2025-03-18 19:23 ` Krzysztof Kozlowski
2025-03-18 20:37 ` André Draszik
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=75f49e65-5a8a-4a52-bed9-31be4a76d536@linaro.org \
--to=tudor.ambarus@linaro.org \
--cc=alim.akhtar@samsung.com \
--cc=andre.draszik@linaro.org \
--cc=kernel-team@android.com \
--cc=krzk@kernel.org \
--cc=krzysztof.kozlowski@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=peter.griffin@linaro.org \
--cc=willmcvicker@google.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®