Linux Tegra architecture development
 help / color / mirror / Atom feed
From: Mikko Perttunen <mperttunen@nvidia.com>
To: thierry.reding@gmail.com, airlied@gmail.com, simona@ffwll.ch,
	Akhilesh Patil <akhilesh@ee.iitb.ac.in>
Cc: dri-devel@lists.freedesktop.org, linux-tegra@vger.kernel.org,
	linux-kernel@vger.kernel.org, akhileshpatilvnit@gmail.com,
	skhan@linuxfoundation.org
Subject: Re: [PATCH] gpu: host1x: use dev_err_probe() in probe path
Date: Fri, 22 Aug 2025 12:18:38 +0900	[thread overview]
Message-ID: <6346652.lOV4Wx5bFT@senjougahara> (raw)
In-Reply-To: <aIbBFQqgZalOMc6r@bhairav-test.ee.iitb.ac.in>

On Monday, July 28, 2025 9:15 AM 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@ee.iitb.ac.in>
> ---
>  drivers/gpu/host1x/dev.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/host1x/dev.c b/drivers/gpu/host1x/dev.c
> index 1f93e5e276c0..e6f3cbeb9ae5 100644
> --- a/drivers/gpu/host1x/dev.c
> +++ b/drivers/gpu/host1x/dev.c
> @@ -587,11 +587,7 @@ 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;
> +		return dev_err_probe(&pdev->dev, err, "failed to get clock: 
%d\n", err);

AIUI, dev_err_probe already prints err, so we don't need to repeat it in the 
message. With that, PTR_ERR(host->clk) can also be inlined into the 
dev_err_probe call.

Cheers,
Mikko

>  	}
> 
>  	err = host1x_get_resets(host);





  reply	other threads:[~2025-08-22  3:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-28  0:15 [PATCH] gpu: host1x: use dev_err_probe() in probe path Akhilesh Patil
2025-08-22  3:18 ` Mikko Perttunen [this message]
2025-08-22  6:00   ` Akhilesh Patil
2025-08-22  6:14 ` [PATCH v2] " Akhilesh Patil
2025-08-26  6:30   ` Mikko Perttunen

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=6346652.lOV4Wx5bFT@senjougahara \
    --to=mperttunen@nvidia.com \
    --cc=airlied@gmail.com \
    --cc=akhilesh@ee.iitb.ac.in \
    --cc=akhileshpatilvnit@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=simona@ffwll.ch \
    --cc=skhan@linuxfoundation.org \
    --cc=thierry.reding@gmail.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