From: sashiko-bot@kernel.org
To: "Rosen Penev" <rosenp@gmail.com>
Cc: dlemoal@kernel.org, cassel@kernel.org, linux-ide@vger.kernel.org
Subject: Re: [PATCH] ata: pata_pxa: use devres for DMA channel management
Date: Mon, 20 Jul 2026 02:01:48 +0000 [thread overview]
Message-ID: <20260720020148.7A2DA1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260720015014.1912040-1-rosenp@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The commit message falsely claims that `ata_host_activate()` registers a managed host detach and that the patch preserves the previous teardown ordering.
--
--- Patch [1]: [PATCH] ata: pata_pxa: use devres for DMA channel management ---
commit d581effc5d41a82779ae2b411de235a8efbfb017
Author: Rosen Penev <rosenp@gmail.com>
ata: pata_pxa: use devres for DMA channel management
Convert the DMA channel request to devm_dma_request_chan() so the
channel is released automatically on device teardown. This removes
the explicit dma_release_channel() calls in the probe error paths
and in pxa_ata_remove().
> Devres releases in LIFO order, so the managed host detach registered
> by ata_host_activate() runs before the DMA channel is released, which
> preserves the previous teardown ordering.
[Severity: Medium]
Is this description accurate regarding the managed host detach and teardown
ordering?
Looking at ata_host_activate(), it does not appear to register a managed
host detach.
Additionally, pxa_ata_remove() retains the explicit call to
ata_host_detach():
> diff --git a/drivers/ata/pata_pxa.c b/drivers/ata/pata_pxa.c
> --- a/drivers/ata/pata_pxa.c
> +++ b/drivers/ata/pata_pxa.c
[ ... ]
> @@ -280,33 +280,26 @@ static int pxa_ata_probe(struct platform_device *pdev)
[ ... ]
> static void pxa_ata_remove(struct platform_device *pdev)
> {
> struct ata_host *host = platform_get_drvdata(pdev);
> - struct pata_pxa_data *data = host->ports[0]->private_data;
> -
> - dma_release_channel(data->dma_chan);
>
> ata_host_detach(host);
> }
Because devres cleanup executes after pxa_ata_remove() returns, the DMA
channel is now released after the host is explicitly detached. This reverses
the previous teardown ordering, which released the DMA channel before the
host detach. Could the commit message be more precise about the actual
teardown sequence?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260720015014.1912040-1-rosenp@gmail.com?part=1
next prev parent reply other threads:[~2026-07-20 2:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-20 1:50 [PATCH] ata: pata_pxa: use devres for DMA channel management Rosen Penev
2026-07-20 2:01 ` sashiko-bot [this message]
2026-07-20 23:58 ` Damien Le Moal
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=20260720020148.7A2DA1F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=cassel@kernel.org \
--cc=dlemoal@kernel.org \
--cc=linux-ide@vger.kernel.org \
--cc=rosenp@gmail.com \
--cc=sashiko-reviews@lists.linux.dev \
/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