Linux Tegra architecture development
 help / color / mirror / Atom feed
From: Jon Hunter <jonathanh@nvidia.com>
To: Rosen Penev <rosenp@gmail.com>
Cc: dmaengine@vger.kernel.org, Laxman Dewangan <ldewangan@nvidia.com>,
	Vinod Koul <vkoul@kernel.org>, Frank Li <Frank.Li@kernel.org>,
	Thierry Reding <thierry.reding@kernel.org>,
	"open list:TEGRA ARCHITECTURE SUPPORT"
	<linux-tegra@vger.kernel.org>,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCHv4] dmaengine: tegra210-adma: use platform to ioremap
Date: Wed, 1 Jul 2026 15:25:55 +0100	[thread overview]
Message-ID: <d0db11b7-2f48-481d-b284-402d19da69a4@nvidia.com> (raw)
In-Reply-To: <CAKxU2N-GX5grrSm75mfAUqDXiXcQ0xMUX5Sbd7CLvELpF=QNTw@mail.gmail.com>



On 30/06/2026 22:06, Rosen Penev wrote:
> On Tue, Jun 30, 2026 at 5:17 AM Jon Hunter <jonathanh@nvidia.com> wrote:
>>
>>
>> On 30/06/2026 01:31, Rosen Penev wrote:
>>> On Wed, Jun 10, 2026 at 1:43 AM Jon Hunter <jonathanh@nvidia.com> wrote:
>>>>
>>>>
>>>> On 09/06/2026 22:25, Rosen Penev wrote:
>>>>> Simpler to call devm_platform_ioremap_resource() as it returns multiple
>>>>> error messages for whichever part fails.
>>>>>
>>>>> Signed-off-by: Rosen Penev <rosenp@gmail.com>
>>>>> ---
>>>>>     v4: rebase and reword commit message
>>>>>     v3: change subject
>>>>>     v2: reword commit message
>>>>>     drivers/dma/tegra210-adma.c | 12 +++---------
>>>>>     1 file changed, 3 insertions(+), 9 deletions(-)
>>>>>
>>>>> diff --git a/drivers/dma/tegra210-adma.c b/drivers/dma/tegra210-adma.c
>>>>> index ceaee1e33e68..21a381d022cf 100644
>>>>> --- a/drivers/dma/tegra210-adma.c
>>>>> +++ b/drivers/dma/tegra210-adma.c
>>>>> @@ -1087,15 +1087,9 @@ static int tegra_adma_probe(struct platform_device *pdev)
>>>>>                 }
>>>>>         } else {
>>>>>                 /* If no 'page' property found, then reg DT binding would be legacy */
>>>>> -             res_base = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>>>>> -             if (res_base) {
>>>>> -                     tdma->base_addr = devm_ioremap_resource(&pdev->dev, res_base);
>>>>> -                     if (IS_ERR(tdma->base_addr))
>>>>> -                             return PTR_ERR(tdma->base_addr);
>>>>> -             } else {
>>>>> -                     return dev_err_probe(&pdev->dev, -ENODEV,
>>>>> -                                          "failed to get memory resource\n");
>>>>> -             }
>>>>> +             tdma->base_addr = devm_platform_ioremap_resource(pdev, 0);
>>>>> +             if (IS_ERR(tdma->base_addr))
>>>>> +                     return PTR_ERR(tdma->base_addr);
>>>>
>>>> The dev_err_probe() was purposely added to assist debug. Please don't
>>>> drop this.
>>> If you're talking about the memory resource error,
>>> devm_platform_ioremap_resource() prints
>>>
>>> ret = dev_err_probe(dev, -EINVAL, "invalid resource %pR\n", res);
>>
>> Well technically it is devm_ioremap_resource() that prints the above
>> which was not obvious. So clarifying that in the commit message would be
>> good.
> I mentioned it returns multiple error messages.

Yes you did. OK, then this is fine with me.

Thanks
Jon

-- 
nvpublic


  reply	other threads:[~2026-07-01 14:26 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-09 21:25 [PATCHv4] dmaengine: tegra210-adma: use platform to ioremap Rosen Penev
2026-06-10  1:42 ` Frank Li
2026-06-10  8:43 ` Jon Hunter
2026-06-30  0:31   ` Rosen Penev
2026-06-30 12:17     ` Jon Hunter
2026-06-30 21:06       ` Rosen Penev
2026-07-01 14:25         ` Jon Hunter [this message]
2026-07-01 14:27 ` Jon Hunter
2026-07-02 15:32 ` Vinod Koul

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=d0db11b7-2f48-481d-b284-402d19da69a4@nvidia.com \
    --to=jonathanh@nvidia.com \
    --cc=Frank.Li@kernel.org \
    --cc=dmaengine@vger.kernel.org \
    --cc=ldewangan@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=rosenp@gmail.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