mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Frank.Li@oss.nxp.com
To: Herbert Xu <herbert@gondor.apana.org.au>,
	 "David S. Miller" <davem@davemloft.net>
Cc: linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org,
	 dmaengine@vger.kernel.org, imx@lists.linux.dev,
	vkoul@kernel.org,  Frank Li <Frank.Li@nxp.com>
Subject: [PATCH v2 1/7] async_tx: use dmaengine_desc_set_callback()
Date: Tue, 03 Nov 2026 14:52:32 -0500	[thread overview]
Message-ID: <20261103-async_tx_dma-v2-1-3afc7c59362c@nxp.com> (raw)
In-Reply-To: <20261103-async_tx_dma-v2-0-3afc7c59362c@nxp.com>

From: Frank Li <Frank.Li@nxp.com>

Replace open-coded assignments to callback and callback_param fields
of struct dma_async_tx_descriptor with calls to the
dmaengine_desc_set_callback() helper.

No functional change intended.

Signed-off-by: Frank Li <Frank.Li@nxp.com>
---
 crypto/async_tx/async_tx.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/crypto/async_tx/async_tx.c b/crypto/async_tx/async_tx.c
index ad72057a5e0d7..67e811945339b 100644
--- a/crypto/async_tx/async_tx.c
+++ b/crypto/async_tx/async_tx.c
@@ -92,8 +92,7 @@ async_tx_channel_switch(struct dma_async_tx_descriptor *depend_tx,
 		intr_tx = NULL;
 
 	if (intr_tx) {
-		intr_tx->callback = NULL;
-		intr_tx->callback_param = NULL;
+		dmaengine_desc_set_callback(intr_tx, NULL, NULL, NULL);
 		/* safe to chain outside the lock since we know we are
 		 * not submitted yet
 		 */
@@ -145,8 +144,7 @@ async_tx_submit(struct dma_chan *chan, struct dma_async_tx_descriptor *tx,
 {
 	struct dma_async_tx_descriptor *depend_tx = submit->depend_tx;
 
-	tx->callback = submit->cb_fn;
-	tx->callback_param = submit->cb_param;
+	dmaengine_desc_set_callback(tx, submit->cb_fn, NULL, submit->cb_param);
 
 	if (depend_tx) {
 		enum submit_disposition s;

-- 
2.43.0


  reply	other threads:[~2026-11-03 19:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-03 19:52 [PATCH v2 0/7] async_tx: use DMA Engine APIs Frank.Li
2026-11-03 19:52 ` Frank.Li [this message]
2026-11-03 19:52 ` [PATCH v2 2/7] async_tx: replace direct ->device_prep*() calls with standard DMA engine API Frank.Li
2026-11-03 19:52 ` [PATCH v2 3/7] async_tx: use dmaengine_get_dma_device() instead of chan->device->dev Frank.Li
2026-11-03 19:52 ` [PATCH v2 4/7] async_tx: use dmaengine_prep_dma_(pq|pq_val|interrupt|xor) instead of direct callback Frank.Li
2026-11-03 19:52 ` [PATCH v2 5/7] async_tx: convert to dmaengine_is_*_aligned() helpers Frank.Li
2026-11-03 19:52 ` [PATCH v2 6/7] async_tx: replace open-coded cap_mask accesses with dmaengine_has_cap() Frank.Li
2026-11-03 19:52 ` [PATCH v2 7/7] async_tx: Mark as Deprecated in Kconfig Frank.Li

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=20261103-async_tx_dma-v2-1-3afc7c59362c@nxp.com \
    --to=frank.li@oss.nxp.com \
    --cc=Frank.Li@nxp.com \
    --cc=davem@davemloft.net \
    --cc=dmaengine@vger.kernel.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=imx@lists.linux.dev \
    --cc=linux-crypto@vger.kernel.org \
    --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®