* [PATCH 1/1] mfd: stm32-timers: use dmaengine_desc_set_callback()
@ 2026-11-02 17:46 Frank.Li
2026-11-02 17:52 ` sashiko-bot
0 siblings, 1 reply; 4+ messages in thread
From: Frank.Li @ 2026-11-02 17:46 UTC (permalink / raw)
To: Fabrice Gasnier, Lee Jones, Maxime Coquelin, Alexandre Torgue,
open list:MULTIFUNCTION DEVICES (MFD),
moderated list:ARM/STM32 ARCHITECTURE,
moderated list:ARM/STM32 ARCHITECTURE, open list
Cc: imx, vkoul, Frank Li
From: Frank Li <Frank.Li@nxp.com>
Replace open-coded assignments to callback and callback_param fields
of struct dma_async_tx_descriptor with a call 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/mfd/stm32-timers.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/mfd/stm32-timers.c b/drivers/mfd/stm32-timers.c
index b3dbc02aaf798..4f344f2a5a26c 100644
--- a/drivers/mfd/stm32-timers.c
+++ b/drivers/mfd/stm32-timers.c
@@ -102,8 +102,7 @@ int stm32_timers_dma_burst_read(struct device *dev, u32 *buf,
goto unmap;
}
- desc->callback = stm32_timers_dma_done;
- desc->callback_param = dma;
+ dmaengine_desc_set_callback(desc, stm32_timers_dma_done, NULL, dma);
cookie = dmaengine_submit(desc);
ret = dma_submit_error(cookie);
if (ret)
--
2.43.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] mfd: stm32-timers: use dmaengine_desc_set_callback()
2026-11-02 17:46 [PATCH 1/1] mfd: stm32-timers: use dmaengine_desc_set_callback() Frank.Li
@ 2026-11-02 17:52 ` sashiko-bot
2026-11-02 20:48 ` Frank Li
2026-11-03 8:59 ` Lee Jones
0 siblings, 2 replies; 4+ messages in thread
From: sashiko-bot @ 2026-11-02 17:52 UTC (permalink / raw)
To: Frank.Li, open list:MULTIFUNCTION DEVICES (MFD); +Cc: imx, Frank.Li, lee
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Low] mfd: stm32-timers: call to undeclared dmaengine_desc_set_callback() breaks build
- [Low] mfd: stm32-timers: uncapitalized commit subject description after prefix
--
commit 90e59ce1010cceb53a7009d41c5cc59f1c853e30
Author: Frank Li <Frank.Li@nxp.com>
mfd: stm32-timers: use dmaengine_desc_set_callback()
This commit replaces open-coded assignments to the callback and callback_param
fields of struct dma_async_tx_descriptor in stm32_timers_dma_burst_read() with
a call to dmaengine_desc_set_callback().
> mfd: stm32-timers: use dmaengine_desc_set_callback()
>
> Replace open-coded assignments to callback and callback_param fields
> of struct dma_async_tx_descriptor with a call 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>
[Severity: Low]
This isn't a bug, but MFD subsystem conventions expect the commit subject
description after the prefix to be capitalized:
mfd: stm32-timers: Use dmaengine_desc_set_callback()
> diff --git a/drivers/mfd/stm32-timers.c b/drivers/mfd/stm32-timers.c
> index b3dbc02aaf798..4f344f2a5a26c 100644
> --- a/drivers/mfd/stm32-timers.c
> +++ b/drivers/mfd/stm32-timers.c
> @@ -102,8 +102,7 @@ int stm32_timers_dma_burst_read(struct device *dev, u32 *buf,
> goto unmap;
> }
>
> - desc->callback = stm32_timers_dma_done;
> - desc->callback_param = dma;
> + dmaengine_desc_set_callback(desc, stm32_timers_dma_done, NULL, dma);
[Severity: Low]
Does this break the build when CONFIG_MFD_STM32_TIMERS is enabled?
In drivers/mfd/stm32-timers.c, stm32_timers_dma_burst_read() calls
dmaengine_desc_set_callback(), but include/linux/dmaengine.h does not declare
or define dmaengine_desc_set_callback() in this tree:
include/linux/dmaengine.h:
struct dma_async_tx_descriptor {
dma_cookie_t cookie;
enum dma_ctrl_flags flags; /* not a 'long' to pack with cookie */
dma_addr_t phys;
struct dma_chan *chan;
dma_cookie_t (*tx_submit)(struct dma_async_tx_descriptor *tx);
int (*desc_free)(struct dma_async_tx_descriptor *tx);
dma_async_tx_callback callback;
dma_async_tx_callback_result callback_result;
void *callback_param;
...
};
Is this patch missing a prerequisite commit that introduces the
dmaengine_desc_set_callback() helper?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261102174656.3939832-1-Frank.Li@oss.nxp.com?part=1
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] mfd: stm32-timers: use dmaengine_desc_set_callback()
2026-11-02 17:52 ` sashiko-bot
@ 2026-11-02 20:48 ` Frank Li
2026-11-03 8:59 ` Lee Jones
1 sibling, 0 replies; 4+ messages in thread
From: Frank Li @ 2026-11-02 20:48 UTC (permalink / raw)
To: sashiko-reviews; +Cc: open list:MULTIFUNCTION DEVICES (MFD), imx, Frank.Li, lee
On Mon, Nov 02, 2026 at 05:52:16PM +0000, sashiko-bot@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
> - [Low] mfd: stm32-timers: call to undeclared dmaengine_desc_set_callback() breaks build
> - [Low] mfd: stm32-timers: uncapitalized commit subject description after prefix
> --
>
> commit 90e59ce1010cceb53a7009d41c5cc59f1c853e30
> Author: Frank Li <Frank.Li@nxp.com>
>
> mfd: stm32-timers: use dmaengine_desc_set_callback()
>
> This commit replaces open-coded assignments to the callback and callback_param
> fields of struct dma_async_tx_descriptor in stm32_timers_dma_burst_read() with
> a call to dmaengine_desc_set_callback().
>
> > mfd: stm32-timers: use dmaengine_desc_set_callback()
> >
> > Replace open-coded assignments to callback and callback_param fields
> > of struct dma_async_tx_descriptor with a call 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>
>
> [Severity: Low]
> This isn't a bug, but MFD subsystem conventions expect the commit subject
> description after the prefix to be capitalized:
>
> mfd: stm32-timers: Use dmaengine_desc_set_callback()
>
> > diff --git a/drivers/mfd/stm32-timers.c b/drivers/mfd/stm32-timers.c
> > index b3dbc02aaf798..4f344f2a5a26c 100644
> > --- a/drivers/mfd/stm32-timers.c
> > +++ b/drivers/mfd/stm32-timers.c
> > @@ -102,8 +102,7 @@ int stm32_timers_dma_burst_read(struct device *dev, u32 *buf,
> > goto unmap;
> > }
> >
> > - desc->callback = stm32_timers_dma_done;
> > - desc->callback_param = dma;
> > + dmaengine_desc_set_callback(desc, stm32_timers_dma_done, NULL, dma);
>
> [Severity: Low]
> Does this break the build when CONFIG_MFD_STM32_TIMERS is enabled?
>
> In drivers/mfd/stm32-timers.c, stm32_timers_dma_burst_read() calls
> dmaengine_desc_set_callback(), but include/linux/dmaengine.h does not declare
> or define dmaengine_desc_set_callback() in this tree:
>
> include/linux/dmaengine.h:
> struct dma_async_tx_descriptor {
> dma_cookie_t cookie;
> enum dma_ctrl_flags flags; /* not a 'long' to pack with cookie */
> dma_addr_t phys;
> struct dma_chan *chan;
> dma_cookie_t (*tx_submit)(struct dma_async_tx_descriptor *tx);
> int (*desc_free)(struct dma_async_tx_descriptor *tx);
> dma_async_tx_callback callback;
> dma_async_tx_callback_result callback_result;
> void *callback_param;
> ...
> };
>
> Is this patch missing a prerequisite commit that introduces the
> dmaengine_desc_set_callback() helper?
Already in v7.4-rc1.
Frank
>
> --
> Sashiko AI review · https://sashiko.dev/#/patchset/20261102174656.3939832-1-Frank.Li@oss.nxp.com?part=1
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] mfd: stm32-timers: use dmaengine_desc_set_callback()
2026-11-02 17:52 ` sashiko-bot
2026-11-02 20:48 ` Frank Li
@ 2026-11-03 8:59 ` Lee Jones
1 sibling, 0 replies; 4+ messages in thread
From: Lee Jones @ 2026-11-03 8:59 UTC (permalink / raw)
To: sashiko-reviews
Cc: Frank.Li, open list:MULTIFUNCTION DEVICES (MFD), imx, Frank.Li
Note that this is the first I've seen of this patch.
You may need to [RESEND] it.
On Mon, 02 Nov 2026, sashiko-bot@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
> - [Low] mfd: stm32-timers: call to undeclared dmaengine_desc_set_callback() breaks build
> - [Low] mfd: stm32-timers: uncapitalized commit subject description after prefix
> --
>
> commit 90e59ce1010cceb53a7009d41c5cc59f1c853e30
> Author: Frank Li <Frank.Li@nxp.com>
>
> mfd: stm32-timers: use dmaengine_desc_set_callback()
>
> This commit replaces open-coded assignments to the callback and callback_param
> fields of struct dma_async_tx_descriptor in stm32_timers_dma_burst_read() with
> a call to dmaengine_desc_set_callback().
>
> > mfd: stm32-timers: use dmaengine_desc_set_callback()
> >
> > Replace open-coded assignments to callback and callback_param fields
> > of struct dma_async_tx_descriptor with a call 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>
>
> [Severity: Low]
> This isn't a bug, but MFD subsystem conventions expect the commit subject
> description after the prefix to be capitalized:
>
> mfd: stm32-timers: Use dmaengine_desc_set_callback()
>
> > diff --git a/drivers/mfd/stm32-timers.c b/drivers/mfd/stm32-timers.c
> > index b3dbc02aaf798..4f344f2a5a26c 100644
> > --- a/drivers/mfd/stm32-timers.c
> > +++ b/drivers/mfd/stm32-timers.c
> > @@ -102,8 +102,7 @@ int stm32_timers_dma_burst_read(struct device *dev, u32 *buf,
> > goto unmap;
> > }
> >
> > - desc->callback = stm32_timers_dma_done;
> > - desc->callback_param = dma;
> > + dmaengine_desc_set_callback(desc, stm32_timers_dma_done, NULL, dma);
>
> [Severity: Low]
> Does this break the build when CONFIG_MFD_STM32_TIMERS is enabled?
>
> In drivers/mfd/stm32-timers.c, stm32_timers_dma_burst_read() calls
> dmaengine_desc_set_callback(), but include/linux/dmaengine.h does not declare
> or define dmaengine_desc_set_callback() in this tree:
>
> include/linux/dmaengine.h:
> struct dma_async_tx_descriptor {
> dma_cookie_t cookie;
> enum dma_ctrl_flags flags; /* not a 'long' to pack with cookie */
> dma_addr_t phys;
> struct dma_chan *chan;
> dma_cookie_t (*tx_submit)(struct dma_async_tx_descriptor *tx);
> int (*desc_free)(struct dma_async_tx_descriptor *tx);
> dma_async_tx_callback callback;
> dma_async_tx_callback_result callback_result;
> void *callback_param;
> ...
> };
>
> Is this patch missing a prerequisite commit that introduces the
> dmaengine_desc_set_callback() helper?
>
> --
> Sashiko AI review · https://sashiko.dev/#/patchset/20261102174656.3939832-1-Frank.Li@oss.nxp.com?part=1
--
Lee Jones
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-11-03 8:59 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-02 17:46 [PATCH 1/1] mfd: stm32-timers: use dmaengine_desc_set_callback() Frank.Li
2026-11-02 17:52 ` sashiko-bot
2026-11-02 20:48 ` Frank Li
2026-11-03 8:59 ` Lee Jones
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.