mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Frank.Li@oss.nxp.com
To: Viresh Kumar <vireshk@kernel.org>,
	Damien Le Moal <dlemoal@kernel.org>,
	Niklas Cassel <cassel@kernel.org>,
	linux-ide@vger.kernel.org (open list:LIBATA PATA ARASAN COMPACT
	FLASH CONTROLLER), linux-kernel@vger.kernel.org (open list)
Cc: imx@lists.linux.dev, vkoul@kernel.org, Frank Li <Frank.Li@nxp.com>
Subject: [PATCH 1/1] ata: use dmaengine_desc_set_callback()
Date: Mon,  2 Nov 2026 11:31:40 -0500	[thread overview]
Message-ID: <20261102163141.3812536-1-Frank.Li@oss.nxp.com> (raw)

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. Prepare make to struct
dma_async_tx_descriptor private to the DMA engine.

Signed-off-by: Frank Li <Frank.Li@nxp.com>
---
 drivers/ata/pata_arasan_cf.c | 3 +--
 drivers/ata/pata_ep93xx.c    | 3 +--
 drivers/ata/pata_pxa.c       | 3 +--
 drivers/ata/sata_dwc_460ex.c | 3 +--
 4 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/ata/pata_arasan_cf.c b/drivers/ata/pata_arasan_cf.c
index a652a1b57338c..5bdfe46182472 100644
--- a/drivers/ata/pata_arasan_cf.c
+++ b/drivers/ata/pata_arasan_cf.c
@@ -406,8 +406,7 @@ dma_xfer(struct arasan_cf_dev *acdev, dma_addr_t src, dma_addr_t dest, u32 len)
 		return -EAGAIN;
 	}
 
-	tx->callback = dma_callback;
-	tx->callback_param = acdev;
+	dmaengine_desc_set_callback(tx, dma_callback, NULL, acdev);
 	cookie = dmaengine_submit(tx);
 
 	ret = dma_submit_error(cookie);
diff --git a/drivers/ata/pata_ep93xx.c b/drivers/ata/pata_ep93xx.c
index 339ee5e43e9f3..9371c7499b208 100644
--- a/drivers/ata/pata_ep93xx.c
+++ b/drivers/ata/pata_ep93xx.c
@@ -727,8 +727,7 @@ static void ep93xx_pata_dma_start(struct ata_queued_cmd *qc)
 		dev_err(qc->ap->dev, "failed to prepare slave for sg dma\n");
 		return;
 	}
-	txd->callback = NULL;
-	txd->callback_param = NULL;
+	dmaengine_desc_set_callback(txd, NULL, NULL, NULL);
 
 	if (dmaengine_submit(txd) < 0) {
 		dev_err(qc->ap->dev, "failed to submit dma transfer\n");
diff --git a/drivers/ata/pata_pxa.c b/drivers/ata/pata_pxa.c
index a694f6a178e31..04bba37c583bd 100644
--- a/drivers/ata/pata_pxa.c
+++ b/drivers/ata/pata_pxa.c
@@ -60,8 +60,7 @@ static enum ata_completion_errors pxa_qc_prep(struct ata_queued_cmd *qc)
 		ata_dev_err(qc->dev, "prep_slave_sg() failed\n");
 		return AC_ERR_OK;
 	}
-	tx->callback = pxa_ata_dma_irq;
-	tx->callback_param = pd;
+	dmaengine_desc_set_callback(tx, pxa_ata_dma_irq, NULL, pd);
 	pd->dma_cookie = dmaengine_submit(tx);
 
 	return AC_ERR_OK;
diff --git a/drivers/ata/sata_dwc_460ex.c b/drivers/ata/sata_dwc_460ex.c
index aa816a1a4c541..93a7651ec672d 100644
--- a/drivers/ata/sata_dwc_460ex.c
+++ b/drivers/ata/sata_dwc_460ex.c
@@ -347,8 +347,7 @@ static struct dma_async_tx_descriptor *dma_dwc_xfer_setup(struct ata_queued_cmd
 	if (!desc)
 		return NULL;
 
-	desc->callback = dma_dwc_xfer_done;
-	desc->callback_param = hsdev;
+	dmaengine_desc_set_callback(desc, dma_dwc_xfer_done, NULL, hsdev);
 
 	dev_dbg(hsdev->dev, "%s sg: 0x%p, count: %d addr: %pa\n", __func__,
 		qc->sg, qc->n_elem, &hsdev->dmadr);
-- 
2.43.0


                 reply	other threads:[~2026-11-02 16:31 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=20261102163141.3812536-1-Frank.Li@oss.nxp.com \
    --to=frank.li@oss.nxp.com \
    --cc=Frank.Li@nxp.com \
    --cc=cassel@kernel.org \
    --cc=dlemoal@kernel.org \
    --cc=imx@lists.linux.dev \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vireshk@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®