From: Frank Li <Frank.li@nxp.com>
To: Sheetal <sheetal@nvidia.com>
Cc: Jon Hunter <jonathanh@nvidia.com>, Vinod Koul <vkoul@kernel.org>,
Thierry Reding <thierry.reding@kernel.org>,
Laxman Dewangan <ldewangan@nvidia.com>,
Frank Li <Frank.Li@kernel.org>, Mohan Kumar <mkumard@nvidia.com>,
dmaengine@vger.kernel.org, linux-tegra@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4] dmaengine: tegra210-adma: Add error logging on failure paths
Date: Wed, 6 May 2026 15:09:09 -0400 [thread overview]
Message-ID: <afuR1RqFyX_rx6pj@lizhi-Precision-Tower-5810> (raw)
In-Reply-To: <20260413064545.2157410-1-sheetal@nvidia.com>
On Mon, Apr 13, 2026 at 06:45:45AM +0000, Sheetal wrote:
> Add dev_err/dev_err_probe logging across failure paths to improve
> debuggability of DMA errors during runtime and probe.
>
> Use return dev_err_probe() pattern consistently in the probe function,
> and dev_err in non-probe functions. Also convert existing dev_err calls
> in probe to dev_err_probe for consistency.
>
> Signed-off-by: Sheetal <sheetal@nvidia.com>
> ---
...
>
> @@ -1141,12 +1157,16 @@ static int tegra_adma_probe(struct platform_device *pdev)
> pm_runtime_enable(&pdev->dev);
>
> ret = pm_runtime_resume_and_get(&pdev->dev);
Change to use ACQUIRE(pm_runtime_active, pm), so rpm_disable can be removed
> - if (ret < 0)
> + if (ret < 0) {
> + dev_err_probe(&pdev->dev, ret, "runtime PM resume failed\n");
> goto rpm_disable;
> + }
>
> ret = tegra_adma_init(tdma);
> - if (ret)
> + if (ret) {
> + dev_err_probe(&pdev->dev, ret, "failed to initialize ADMA\n");
> goto rpm_put;
> + }
>
> dma_cap_set(DMA_SLAVE, tdma->dma_dev.cap_mask);
> dma_cap_set(DMA_PRIVATE, tdma->dma_dev.cap_mask);
> @@ -1172,14 +1192,14 @@ static int tegra_adma_probe(struct platform_device *pdev)
>
> ret = dma_async_device_register(&tdma->dma_dev);
the preferred pattern is
return dev_err_probe();
Before do that, I suggest
change to use dmaenginem_async_device_register(), so label dma_remove
can be removed.
Frank
> if (ret < 0) {
> - dev_err(&pdev->dev, "ADMA registration failed: %d\n", ret);
> + dev_err_probe(&pdev->dev, ret, "ADMA registration failed\n");
> goto rpm_put;
> }
>
> ret = of_dma_controller_register(pdev->dev.of_node,
> tegra_dma_of_xlate, tdma);
> if (ret < 0) {
> - dev_err(&pdev->dev, "ADMA OF registration failed %d\n", ret);
> + dev_err_probe(&pdev->dev, ret, "ADMA OF registration failed\n");
> goto dma_remove;
> }
>
> --
> 2.17.1
>
prev parent reply other threads:[~2026-05-06 19:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-13 6:45 Sheetal
2026-05-05 7:38 ` Mohan Kumar D
2026-05-06 19:09 ` Frank Li [this message]
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=afuR1RqFyX_rx6pj@lizhi-Precision-Tower-5810 \
--to=frank.li@nxp.com \
--cc=Frank.Li@kernel.org \
--cc=dmaengine@vger.kernel.org \
--cc=jonathanh@nvidia.com \
--cc=ldewangan@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=mkumard@nvidia.com \
--cc=sheetal@nvidia.com \
--cc=thierry.reding@kernel.org \
--cc=vkoul@kernel.org \
/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®