From: Dave Jiang <dave.jiang@intel.com>
To: Frank.Li@oss.nxp.com, Jon Mason <jdmason@kudzu.us>,
Allen Hubbe <allenbh@gmail.com>,
Matt Porter <mporter@kernel.crashing.org>,
Alexandre Bounine <alex.bou9@gmail.com>,
Frank Li <Frank.Li@nxp.com>,
Andrew Morton <akpm@linux-foundation.org>,
James Kim <james010kim@gmail.com>,
Dan Carpenter <error27@gmail.com>,
"open list:NTB DRIVER CORE" <ntb@lists.linux.dev>,
open list <linux-kernel@vger.kernel.org>
Cc: imx@lists.linux.dev, vkoul@kernel.org
Subject: Re: [PATCH 1/1] ntb: use dmaengine_desc_set_callback()
Date: Mon, 2 Nov 2026 16:42:29 -0700 [thread overview]
Message-ID: <84b07585-6dec-45c5-ba5a-784d0da7a961@intel.com> (raw)
In-Reply-To: <20261102195748.4092882-1-Frank.Li@oss.nxp.com>
On 11/2/26 12:57 PM, Frank.Li@oss.nxp.com wrote:
> 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 across ntb drivers.
>
> No functional change intended. Prepare to make struct
> dma_async_tx_descriptor private to the DMA engine.
>
> Signed-off-by: Frank Li <Frank.Li@nxp.com>
For the NTB bits:
Acked-by: Dave Jiang <dave.jiang@intel.com>
> ---
> drivers/ntb/ntb_transport.c | 6 ++----
> drivers/ntb/test/ntb_perf.c | 3 +--
> drivers/rapidio/devices/rio_mport_cdev.c | 3 +--
> 3 files changed, 4 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/ntb/ntb_transport.c b/drivers/ntb/ntb_transport.c
> index f9caa1a653c5b..370196ecf8f9d 100644
> --- a/drivers/ntb/ntb_transport.c
> +++ b/drivers/ntb/ntb_transport.c
> @@ -1557,8 +1557,7 @@ static int ntb_async_rx_submit(struct ntb_queue_entry *entry, void *offset)
> if (!txd)
> goto err_get_unmap;
>
> - txd->callback_result = ntb_rx_copy_callback;
> - txd->callback_param = entry;
> + dmaengine_desc_set_callback(txd, NULL, ntb_rx_copy_callback, entry);
> dma_set_unmap(txd, unmap);
>
> cookie = dmaengine_submit(txd);
> @@ -1889,8 +1888,7 @@ static int ntb_async_tx_submit(struct ntb_transport_qp *qp,
> if (!txd)
> goto err_get_unmap;
>
> - txd->callback_result = ntb_tx_copy_callback;
> - txd->callback_param = entry;
> + dmaengine_desc_set_callback(txd, NULL, ntb_tx_copy_callback, entry);
> dma_set_unmap(txd, unmap);
>
> cookie = dmaengine_submit(txd);
> diff --git a/drivers/ntb/test/ntb_perf.c b/drivers/ntb/test/ntb_perf.c
> index dfd175f79e8f0..862b3dffa2b17 100644
> --- a/drivers/ntb/test/ntb_perf.c
> +++ b/drivers/ntb/test/ntb_perf.c
> @@ -834,8 +834,7 @@ static int perf_copy_chunk(struct perf_thread *pthr,
> goto err_free_resource;
> }
>
> - tx->callback = perf_dma_copy_callback;
> - tx->callback_param = pthr;
> + dmaengine_desc_set_callback(tx, perf_dma_copy_callback, NULL, pthr);
> dma_set_unmap(tx, unmap);
>
> ret = dma_submit_error(dmaengine_submit(tx));
> diff --git a/drivers/rapidio/devices/rio_mport_cdev.c b/drivers/rapidio/devices/rio_mport_cdev.c
> index 40d2953a9a7f9..585e3f9ff29ca 100644
> --- a/drivers/rapidio/devices/rio_mport_cdev.c
> +++ b/drivers/rapidio/devices/rio_mport_cdev.c
> @@ -717,8 +717,7 @@ static int do_dma_request(struct mport_dma_req *req,
> goto err_out;
> }
>
> - tx->callback = dma_xfer_callback;
> - tx->callback_param = req;
> + dmaengine_desc_set_callback(tx, dma_xfer_callback, NULL, req);
>
> req->status = DMA_IN_PROGRESS;
> kref_get(&req->refcount);
prev parent reply other threads:[~2026-11-02 23:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-02 19:57 Frank.Li
2026-11-02 23:42 ` Dave Jiang [this message]
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=84b07585-6dec-45c5-ba5a-784d0da7a961@intel.com \
--to=dave.jiang@intel.com \
--cc=Frank.Li@nxp.com \
--cc=Frank.Li@oss.nxp.com \
--cc=akpm@linux-foundation.org \
--cc=alex.bou9@gmail.com \
--cc=allenbh@gmail.com \
--cc=error27@gmail.com \
--cc=imx@lists.linux.dev \
--cc=james010kim@gmail.com \
--cc=jdmason@kudzu.us \
--cc=linux-kernel@vger.kernel.org \
--cc=mporter@kernel.crashing.org \
--cc=ntb@lists.linux.dev \
--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®