[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <3902554.kQq0lBPeGt@senjougahara>
Date: Tue, 26 Aug 2025 15:30:18 +0900
From: Mikko Perttunen <mperttunen@...dia.com>
To: thierry.reding@...il.com, airlied@...il.com, simona@...ll.ch,
Akhilesh Patil <akhilesh@...iitb.ac.in>
Cc: dri-devel@...ts.freedesktop.org, linux-tegra@...r.kernel.org,
linux-kernel@...r.kernel.org, akhileshpatilvnit@...il.com,
skhan@...uxfoundation.org
Subject: Re: [PATCH v2] gpu: host1x: use dev_err_probe() in probe path
On Friday, August 22, 2025 3:14 PM Akhilesh Patil wrote:
> Use dev_err_probe() helper as recommended by core driver model in
> drivers/base/core.c to handle deferred probe error. Improve code
> consistency and debuggability using standard helper.
>
> Signed-off-by: Akhilesh Patil <akhilesh@...iitb.ac.in>
> ---
> V1 -> V2: addressed review comments as below.
> * inline - err = PTR_ERR(host->clk) inside dev_err_probe()
> * avoid printing err, as dev_err_probe() prints it internally.
> * rebase and compile test with v6.17-rc2
>
> drivers/gpu/host1x/dev.c | 10 ++--------
> 1 file changed, 2 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/gpu/host1x/dev.c b/drivers/gpu/host1x/dev.c
> index 1f93e5e276c0..c586c242f2c2 100644
> --- a/drivers/gpu/host1x/dev.c
> +++ b/drivers/gpu/host1x/dev.c
> @@ -585,14 +585,8 @@ static int host1x_probe(struct platform_device *pdev)
> }
>
> host->clk = devm_clk_get(&pdev->dev, NULL);
> - if (IS_ERR(host->clk)) {
> - err = PTR_ERR(host->clk);
> -
> - if (err != -EPROBE_DEFER)
> - dev_err(&pdev->dev, "failed to get clock: %d\n",
err);
> -
> - return err;
> - }
> + if (IS_ERR(host->clk))
> + return dev_err_probe(&pdev->dev, PTR_ERR(host->clk), "failed
to get
> clock\n");
>
> err = host1x_get_resets(host);
> if (err)
Thanks!
Tested-by: Mikko Perttunen <mperttunen@...dia.com>
Acked-by: Mikko Perttunen <mperttunen@...dia.com>
Powered by blists - more mailing lists