From: sashiko-bot@kernel.org
To: Frank.Li@oss.nxp.com, "Vignesh Raghavendra" <vigneshr@ti.com>,
"Tudor Ambarus" <tudor.ambarus@linaro.org>,
"Miquel Raynal" <miquel.raynal@bootlin.com>,
"Richard Weinberger" <richard@nod.at>,
"Kyungmin Park" <kyungmin.park@samsung.com>,
"Nicolas Ferre" <nicolas.ferre@microchip.com>,
"Alexandre Belloni" <alexandre.belloni@bootlin.com>,
"Claudiu Beznea" <claudiu.beznea@tuxon.dev>,
"Han Xu" <han.xu@nxp.com>,
"Keguang Zhang" <keguang.zhang@gmail.com>,
"Vladimir Zapolskiy" <vz@mleia.com>,
"Piotr Wojtaszczyk" <piotr.wojtaszczyk@timesys.com>,
"Maxime Coquelin" <mcoquelin.stm32@gmail.com>,
"Alexandre Torgue" <alexandre.torgue@foss.st.com>,
"Rosen Penev" <rosenp@gmail.com>, "Frank Li" <Frank.Li@nxp.com>,
"Wentao Liang" <vulab@iscas.ac.cn>,
"Rob Herring (Arm)" <robh@kernel.org>,
"Alok Tiwari" <alok.a.tiwari@oracle.com>,
"Chen Ni" <nichen@iscas.ac.cn>,
"Runyu Xiao" <runyu.xiao@seu.edu.cn>,
"Hemanth Selam" <hemanth.selam@gmail.com>,
"Pengpeng Hou" <pengpeng@iscas.ac.cn>,
"Uwe Kleine-König (The Capable Hub)"
<u.kleine-koenig@baylibre.com>,
"Triet Hoang" <triet.hoang.dev@gmail.com>,
"open list:HYPERBUS SUPPORT" <linux-mtd@lists.infradead.org>,
"open list:FREESCALE GPMI NAND DRIVER" <imx@lists.linux.dev>,
"moderated list:ARM/STM32 ARCHITECTURE"
<linux-stm32@st-md-mailman.stormreply.com>
Cc: vkoul@kernel.org, Frank.Li@kernel.org
Subject: Re: [PATCH 1/1] mtd: use dmaengine_desc_set_callback()
Date: Mon, 02 Nov 2026 18:21:00 +0000 [thread overview]
Message-ID: <sashiko-outbox-193928@kernel.org> (raw)
In-Reply-To: <20261102181406.3994422-1-Frank.Li@oss.nxp.com>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [High] mtd: implicit declaration of dmaengine_desc_set_callback() breaks build
- [Low] mtd: commit message inaccurately states change is across sound drivers
--
commit 32484e960f1ce7c6c67c27f2bc2a6a6370f61c59
Author: Frank Li <Frank.Li@nxp.com>
mtd: use dmaengine_desc_set_callback()
This commit replaces open-coded assignments to the callback and
callback_param fields of struct dma_async_tx_descriptor with calls to
dmaengine_desc_set_callback() across 14 MTD drivers.
> mtd: use dmaengine_desc_set_callback()
>
> 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 sound 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>
[Severity: Low]
This isn't a bug, but the commit message says "across sound drivers" when all
14 modified files are MTD drivers under drivers/mtd/. Should this say "across
MTD drivers" instead?
> diff --git a/drivers/mtd/hyperbus/hbmc-am654.c b/drivers/mtd/hyperbus/hbmc-am654.c
> index 8a14e908d0b53..56b265125c7e8 100644
> --- a/drivers/mtd/hyperbus/hbmc-am654.c
> +++ b/drivers/mtd/hyperbus/hbmc-am654.c
> @@ -100,8 +100,7 @@ static int am654_hbmc_dma_read(struct am654_hbmc_device_priv *priv, void *to,
> }
>
> reinit_completion(&priv->rx_dma_complete);
> - tx->callback = am654_hbmc_dma_callback;
> - tx->callback_param = priv;
> + dmaengine_desc_set_callback(tx, am654_hbmc_dma_callback, NULL, priv);
[Severity: High]
Does this break the build for these MTD drivers?
In include/linux/dmaengine.h, struct dma_async_tx_descriptor still defines the
callback fields directly:
dma_async_tx_callback callback;
dma_async_tx_callback_result callback_result;
void *callback_param;
and dmaengine_desc_set_callback() is neither declared nor defined anywhere in
include/linux/dmaengine.h or the kernel tree at this commit.
Building any of the 14 modified drivers fails with an implicit declaration of
function dmaengine_desc_set_callback() error in:
- drivers/mtd/hyperbus/hbmc-am654.c: am654_hbmc_dma_read()
- drivers/mtd/nand/onenand/onenand_omap2.c: omap2_onenand_dma_transfer()
- drivers/mtd/nand/qpic_common.c: qcom_submit_descs()
- drivers/mtd/nand/raw/atmel/nand-controller.c: atmel_nand_dma_transfer()
- drivers/mtd/nand/raw/cadence-nand-controller.c: cadence_nand_slave_dma_transfer()
- drivers/mtd/nand/raw/fsmc_nand.c: dma_xfer()
- drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c: gpmi_nfc_exec_op()
- drivers/mtd/nand/raw/intel-nand-controller.c: ebu_dma_start()
- drivers/mtd/nand/raw/loongson-nand-controller.c: loongson_nand_dma_transfer()
- drivers/mtd/nand/raw/lpc32xx_mlc.c: lpc32xx_xmit_dma()
- drivers/mtd/nand/raw/lpc32xx_slc.c: lpc32xx_xmit_dma()
- drivers/mtd/nand/raw/omap2.c: omap_nand_dma_transfer()
- drivers/mtd/nand/raw/sh_flctl.c: flctl_dma_fifo0_transfer()
- drivers/mtd/nand/raw/stm32_fmc2_nand.c: stm32_fmc2_nfc_xfer()
Is this commit missing a prerequisite patch that introduces
dmaengine_desc_set_callback() in include/linux/dmaengine.h?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261102181406.3994422-1-Frank.Li@oss.nxp.com?part=1
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
prev parent reply other threads:[~2026-11-02 18:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-02 18:13 [PATCH 1/1] mtd: use dmaengine_desc_set_callback() Frank.Li
2026-11-02 18:21 ` sashiko-bot [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=sashiko-outbox-193928@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=Frank.Li@kernel.org \
--cc=Frank.Li@nxp.com \
--cc=Frank.Li@oss.nxp.com \
--cc=alexandre.belloni@bootlin.com \
--cc=alexandre.torgue@foss.st.com \
--cc=alok.a.tiwari@oracle.com \
--cc=claudiu.beznea@tuxon.dev \
--cc=han.xu@nxp.com \
--cc=hemanth.selam@gmail.com \
--cc=imx@lists.linux.dev \
--cc=keguang.zhang@gmail.com \
--cc=kyungmin.park@samsung.com \
--cc=linux-mtd@lists.infradead.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=miquel.raynal@bootlin.com \
--cc=nichen@iscas.ac.cn \
--cc=nicolas.ferre@microchip.com \
--cc=pengpeng@iscas.ac.cn \
--cc=piotr.wojtaszczyk@timesys.com \
--cc=richard@nod.at \
--cc=robh@kernel.org \
--cc=rosenp@gmail.com \
--cc=runyu.xiao@seu.edu.cn \
--cc=sashiko-reviews@lists.linux.dev \
--cc=triet.hoang.dev@gmail.com \
--cc=tudor.ambarus@linaro.org \
--cc=u.kleine-koenig@baylibre.com \
--cc=vigneshr@ti.com \
--cc=vkoul@kernel.org \
--cc=vulab@iscas.ac.cn \
--cc=vz@mleia.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