From: Frank.Li@oss.nxp.com
To: Vinod Koul <vkoul@kernel.org>, Frank Li <Frank.Li@kernel.org>,
dmaengine@vger.kernel.org (open list:DMA GENERIC OFFLOAD ENGINE
SUBSYSTEM), linux-kernel@vger.kernel.org (open list)
Cc: imx@lists.linux.dev, Frank Li <Frank.Li@nxp.com>
Subject: [PATCH 1/1] dmaengine: dmatest: use dmaengine_submit() and dmaengine_desc_set_callback()
Date: Wed, 14 Oct 2026 10:53:33 -0400 [thread overview]
Message-ID: <20261014145334.1449465-1-Frank.Li@oss.nxp.com> (raw)
From: Frank Li <Frank.Li@nxp.com>
Direct assignment to tx->callback and tx->callback_param bypasses the
dmaengine descriptor API. Replace them with dmaengine_desc_set_callback()
and replace the tx->tx_submit() call with dmaengine_submit(), which are
the proper interfaces for dmaengine clients.
Prepare to make struct dma_async_tx_descriptor private.
Signed-off-by: Frank Li <Frank.Li@nxp.com>
---
base on https://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine.git/ next
---
drivers/dma/dmatest.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/dma/dmatest.c b/drivers/dma/dmatest.c
index 2ae3469397f37..3f0b7e15abf05 100644
--- a/drivers/dma/dmatest.c
+++ b/drivers/dma/dmatest.c
@@ -822,11 +822,11 @@ static int dmatest_func(void *data)
}
done->done = false;
- if (!params->polled) {
- tx->callback = dmatest_callback;
- tx->callback_param = done;
- }
- cookie = tx->tx_submit(tx);
+ if (!params->polled)
+ dmaengine_desc_set_callback(tx, dmatest_callback, NULL,
+ done);
+
+ cookie = dmaengine_submit(tx);
if (dma_submit_error(cookie)) {
result("submit error", total_tests, src->off,
--
2.43.0
reply other threads:[~2026-10-14 14:53 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20261014145334.1449465-1-Frank.Li@oss.nxp.com \
--to=frank.li@oss.nxp.com \
--cc=Frank.Li@kernel.org \
--cc=Frank.Li@nxp.com \
--cc=dmaengine@vger.kernel.org \
--cc=imx@lists.linux.dev \
--cc=linux-kernel@vger.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®