From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Frank.Li@oss.nxp.com
Cc: Mark Brown <broonie@kernel.org>,
Nicolas Ferre <nicolas.ferre@microchip.com>,
Alexandre Belloni <alexandre.belloni@bootlin.com>,
Claudiu Beznea <claudiu.beznea@tuxon.dev>,
Radu Pirea <radu_nicolae.pirea@upb.ro>,
CL Wang <cl634@andestech.com>,
Ryan Wanner <ryan.wanner@microchip.com>,
Florian Fainelli <florian.fainelli@broadcom.com>,
Ray Jui <rjui@broadcom.com>,
Scott Branden <sbranden@broadcom.com>,
Broadcom internal kernel review list
<bcm-kernel-feedback-list@broadcom.com>,
Vladimir Oltean <olteanv@gmail.com>, Frank Li <Frank.Li@nxp.com>,
Sascha Hauer <s.hauer@pengutronix.de>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Fabio Estevam <festevam@gmail.com>, Han Xu <han.xu@nxp.com>,
Haibo Chen <haibo.chen@nxp.com>,
Linus Walleij <linusw@kernel.org>,
Daniel Mack <daniel@zonque.org>,
Haojian Zhuang <haojian.zhuang@gmail.com>,
Robert Jarzmik <robert.jarzmik@free.fr>,
Heiko Stuebner <heiko@sntech.de>,
Fabrizio Castro <fabrizio.castro.jz@renesas.com>,
Andi Shyti <andi.shyti@kernel.org>,
Tudor Ambarus <tudor.ambarus@linaro.org>,
Krzysztof Kozlowski <krzk@kernel.org>,
Peter Griffin <peter.griffin@linaro.org>,
Alim Akhtar <alim.akhtar@samsung.com>,
Yixun Lan <dlan@kernel.org>,
Troy Mitchell <troy.mitchell@linux.spacemit.com>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
Alexandre Torgue <alexandre.torgue@foss.st.com>,
Alain Volmat <alain.volmat@foss.st.com>,
Chen-Yu Tsai <wens@kernel.org>,
Jernej Skrabec <jernej.skrabec@gmail.com>,
Samuel Holland <samuel@sholland.org>,
Laxman Dewangan <ldewangan@nvidia.com>,
Thierry Reding <thierry.reding@kernel.org>,
Jonathan Hunter <jonathanh@nvidia.com>,
Sowjanya Komatineni <skomatineni@nvidia.com>,
Kunihiko Hayashi <hayashi.kunihiko@socionext.com>,
Masami Hiramatsu <mhiramat@kernel.org>,
"open list:SPI SUBSYSTEM" <linux-spi@vger.kernel.org>,
"moderated list:ARM/Microchip (AT91) SoC support"
<linux-arm-kernel@lists.infradead.org>,
open list <linux-kernel@vger.kernel.org>,
"moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE"
<linux-rpi-kernel@lists.infradead.org>,
"open list:FREESCALE DSPI DRIVER" <imx@lists.linux.dev>,
"open list:ARM/QUALCOMM MAILING LIST"
<linux-arm-msm@vger.kernel.org>,
"open list:ARM/Rockchip SoC support"
<linux-rockchip@lists.infradead.org>,
"open list:RENESAS RZ/V2H(P) RSPI DRIVER"
<linux-renesas-soc@vger.kernel.org>,
"open list:SAMSUNG SPI DRIVERS"
<linux-samsung-soc@vger.kernel.org>,
"open list:RISC-V SPACEMIT SoC Support"
<linux-riscv@lists.infradead.org>,
"open list:RISC-V SPACEMIT SoC Support"
<spacemit@lists.linux.dev>,
"moderated list:ARM/STM32 ARCHITECTURE"
<linux-stm32@st-md-mailman.stormreply.com>,
"open list:ARM/Allwinner sunXi SoC support"
<linux-sunxi@lists.linux.dev>,
"open list:TEGRA ARCHITECTURE SUPPORT"
<linux-tegra@vger.kernel.org>,
Mukesh Kumar Savaliya <mukesh.savaliya@oss.qualcomm.com>,
Wolfram Sang <wsa+renesas@sang-engineering.com>,
Thierry Reding <treding@nvidia.com>
Subject: Re: [PATCH v2 1/1] spi: use dmaengine_desc_set_callback()
Date: Wed, 4 Nov 2026 18:57:14 +0200 [thread overview]
Message-ID: <autj6pr_bPaul3w0@ashevche-desk.local> (raw)
In-Reply-To: <20261104152253.3279052-1-Frank.Li@oss.nxp.com>
On Wed, Nov 04, 2026 at 10:22:45AM -0500, Frank.Li@oss.nxp.com wrote:
>
> 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 SPI bus drivers.
>
> No functional change intended. Prepare make to struct
> dma_async_tx_descriptor private to the DMA engine.
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> # dw, pxa2xx, topcliff-pch
(Note, you forgot to add the list of the drivers to the Rb trailers of other reviewers)
> drivers/spi/spi-dw-dma.c | 6 ++----
> drivers/spi/spi-pxa2xx-dma.c | 3 +--
> drivers/spi/spi-topcliff-pch.c | 6 ++----
> --- a/drivers/spi/spi-dw-dma.c
> +++ b/drivers/spi/spi-dw-dma.c
> @@ -397,8 +397,7 @@ static int dw_spi_dma_submit_tx(struct dw_spi *dws, struct scatterlist *sgl,
> if (!txdesc)
> return -ENOMEM;
>
> - txdesc->callback = dw_spi_dma_tx_done;
> - txdesc->callback_param = dws;
> + dmaengine_desc_set_callback(txdesc, dw_spi_dma_tx_done, NULL, dws);
>
> cookie = dmaengine_submit(txdesc);
> ret = dma_submit_error(cookie);
> @@ -498,8 +497,7 @@ static int dw_spi_dma_submit_rx(struct dw_spi *dws, struct scatterlist *sgl,
> if (!rxdesc)
> return -ENOMEM;
>
> - rxdesc->callback = dw_spi_dma_rx_done;
> - rxdesc->callback_param = dws;
> + dmaengine_desc_set_callback(rxdesc, dw_spi_dma_rx_done, NULL, dws);
>
> cookie = dmaengine_submit(rxdesc);
> ret = dma_submit_error(cookie);
> --- a/drivers/spi/spi-pxa2xx-dma.c
> +++ b/drivers/spi/spi-pxa2xx-dma.c
> @@ -154,8 +154,7 @@ int pxa2xx_spi_dma_prepare(struct driver_data *drv_data,
> }
>
> /* We are ready when RX completes */
> - rx_desc->callback = pxa2xx_spi_dma_callback;
> - rx_desc->callback_param = drv_data;
> + dmaengine_desc_set_callback(rx_desc, pxa2xx_spi_dma_callback, NULL, drv_data);
>
> dmaengine_submit(rx_desc);
> dmaengine_submit(tx_desc);
> --- a/drivers/spi/spi-topcliff-pch.c
> +++ b/drivers/spi/spi-topcliff-pch.c
> @@ -1022,8 +1022,7 @@ static void pch_spi_handle_dma(struct pch_spi_data *data, int *bpw)
> return;
> }
> dma_sync_sg_for_device(&data->host->dev, sg, num, DMA_FROM_DEVICE);
> - desc_rx->callback = pch_dma_rx_complete;
> - desc_rx->callback_param = data;
> + dmaengine_desc_set_callback(desc_rx, pch_dma_rx_complete, NULL, data);
> dma->nent = num;
> dma->desc_rx = desc_rx;
>
> @@ -1084,8 +1083,7 @@ static void pch_spi_handle_dma(struct pch_spi_data *data, int *bpw)
> return;
> }
> dma_sync_sg_for_device(&data->host->dev, sg, num, DMA_TO_DEVICE);
> - desc_tx->callback = NULL;
> - desc_tx->callback_param = data;
> + dmaengine_desc_set_callback(desc_tx, NULL, NULL, data);
Yeah, data can be replaced by NULL as has been already mentioned.
> dma->nent = num;
> dma->desc_tx = desc_tx;
>
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2026-11-04 16:57 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-04 15:22 Frank.Li
2026-11-04 16:57 ` Andy Shevchenko [this message]
2026-11-04 17:02 ` Krzysztof Kozlowski
2026-11-04 17:08 ` Krzysztof Kozlowski
2026-11-04 17:23 ` Andy Shevchenko
2026-11-04 17:27 ` Krzysztof Kozlowski
2026-11-04 20:41 ` Andy Shevchenko
2026-11-04 22:54 ` Krzysztof Kozlowski
2026-11-04 17:25 ` Krzysztof Kozlowski
2026-11-04 20:44 ` Andy Shevchenko
2026-11-04 23:02 ` Krzysztof Kozlowski
2026-11-04 18:18 ` Florian Fainelli
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=autj6pr_bPaul3w0@ashevche-desk.local \
--to=andriy.shevchenko@linux.intel.com \
--cc=Frank.Li@nxp.com \
--cc=Frank.Li@oss.nxp.com \
--cc=alain.volmat@foss.st.com \
--cc=alexandre.belloni@bootlin.com \
--cc=alexandre.torgue@foss.st.com \
--cc=alim.akhtar@samsung.com \
--cc=andi.shyti@kernel.org \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=broonie@kernel.org \
--cc=cl634@andestech.com \
--cc=claudiu.beznea@tuxon.dev \
--cc=daniel@zonque.org \
--cc=dlan@kernel.org \
--cc=fabrizio.castro.jz@renesas.com \
--cc=festevam@gmail.com \
--cc=florian.fainelli@broadcom.com \
--cc=haibo.chen@nxp.com \
--cc=han.xu@nxp.com \
--cc=haojian.zhuang@gmail.com \
--cc=hayashi.kunihiko@socionext.com \
--cc=heiko@sntech.de \
--cc=imx@lists.linux.dev \
--cc=jernej.skrabec@gmail.com \
--cc=jonathanh@nvidia.com \
--cc=kernel@pengutronix.de \
--cc=krzk@kernel.org \
--cc=ldewangan@nvidia.com \
--cc=linusw@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=linux-rpi-kernel@lists.infradead.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=linux-sunxi@lists.linux.dev \
--cc=linux-tegra@vger.kernel.org \
--cc=mcoquelin.stm32@gmail.com \
--cc=mhiramat@kernel.org \
--cc=mukesh.savaliya@oss.qualcomm.com \
--cc=nicolas.ferre@microchip.com \
--cc=olteanv@gmail.com \
--cc=peter.griffin@linaro.org \
--cc=radu_nicolae.pirea@upb.ro \
--cc=rjui@broadcom.com \
--cc=robert.jarzmik@free.fr \
--cc=ryan.wanner@microchip.com \
--cc=s.hauer@pengutronix.de \
--cc=samuel@sholland.org \
--cc=sbranden@broadcom.com \
--cc=skomatineni@nvidia.com \
--cc=spacemit@lists.linux.dev \
--cc=thierry.reding@kernel.org \
--cc=treding@nvidia.com \
--cc=troy.mitchell@linux.spacemit.com \
--cc=tudor.ambarus@linaro.org \
--cc=wens@kernel.org \
--cc=wsa+renesas@sang-engineering.com \
/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®