[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAPDyKFqeibF4JAzYZgimUgRN0Lj9K8qSdorxx6DA=j_c5PE9bw@mail.gmail.com>
Date: Thu, 31 Oct 2024 11:42:12 +0100
From: Ulf Hansson <ulf.hansson@...aro.org>
To: Dario Binacchi <dario.binacchi@...rulasolutions.com>
Cc: linux-kernel@...r.kernel.org, linux-amarula@...rulasolutions.com,
Michael Trimarchi <michael@...rulasolutions.com>, Marco Felsch <m.felsch@...gutronix.de>,
Fabio Estevam <festevam@...il.com>, Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>,
Pengutronix Kernel Team <kernel@...gutronix.de>, Sascha Hauer <s.hauer@...gutronix.de>,
Shawn Guo <shawnguo@...nel.org>, Shengjiu Wang <shengjiu.wang@....com>,
Uwe Kleine-König <u.kleine-koenig@...gutronix.de>,
imx@...ts.linux.dev, linux-arm-kernel@...ts.infradead.org,
linux-pm@...r.kernel.org
Subject: Re: [PATCH v2] pmdomain: imx: gpcv2: replace dev_err() with dev_err_probe()
On Fri, 25 Oct 2024 at 18:04, Dario Binacchi
<dario.binacchi@...rulasolutions.com> wrote:
>
> The patch standardizes the probe() code by replacing the two occurrences
> of dev_err() with dev_err_probe(). Indeed, dev_err_probe() was used in all
> other error paths of the probe() function.
> Note that dev_err_probe() has advantages even if the error code is not
> EPROBE_DEFER, such as the symbolic output of the error code. Therefore,
> it should generally be preferred over dev_err().
>
> Co-developed-by: Michael Trimarchi <michael@...rulasolutions.com>
> Signed-off-by: Michael Trimarchi <michael@...rulasolutions.com>
> Signed-off-by: Dario Binacchi <dario.binacchi@...rulasolutions.com>
> Reviewed-by: Marco Felsch <m.felsch@...gutronix.de>
Applied for next, thanks!
Kind regards
Uffe
>
> ---
>
> Changes in v2:
> - Improve the commit message.
> - Add 'Reviewed-by' tag of Marco Felsch.
>
> drivers/pmdomain/imx/gpcv2.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/pmdomain/imx/gpcv2.c b/drivers/pmdomain/imx/gpcv2.c
> index 963d61c5af6d..6e6ecbf2e152 100644
> --- a/drivers/pmdomain/imx/gpcv2.c
> +++ b/drivers/pmdomain/imx/gpcv2.c
> @@ -1356,7 +1356,7 @@ static int imx_pgc_domain_probe(struct platform_device *pdev)
>
> ret = pm_genpd_init(&domain->genpd, NULL, true);
> if (ret) {
> - dev_err(domain->dev, "Failed to init power domain\n");
> + dev_err_probe(domain->dev, ret, "Failed to init power domain\n");
> goto out_domain_unmap;
> }
>
> @@ -1367,7 +1367,7 @@ static int imx_pgc_domain_probe(struct platform_device *pdev)
> ret = of_genpd_add_provider_simple(domain->dev->of_node,
> &domain->genpd);
> if (ret) {
> - dev_err(domain->dev, "Failed to add genpd provider\n");
> + dev_err_probe(domain->dev, ret, "Failed to add genpd provider\n");
> goto out_genpd_remove;
> }
>
> --
> 2.43.0
>
Powered by blists - more mailing lists