* [PATCH 1/1] spi: ingenic: remove dmaengine_desc_free()
@ 2026-09-29 19:06 Frank.Li
2026-09-29 22:21 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Frank.Li @ 2026-09-29 19:06 UTC (permalink / raw)
To: Mark Brown, open list:SPI SUBSYSTEM, open list; +Cc: vkoul, imx, Frank Li
From: Frank Li <Frank.Li@nxp.com>
dmaengine_desc_free() is designed for DMA_CTRL_REUSE. If DMA_CTRL_REUSE
is not set, dmaengine_desc_free() will return -EPERM.
if (!dmaengine_desc_test_reuse(desc))
return -EPERM;
So calling dmaengine_desc_free() does nothing.
dmaengine_terminate_(a)sync() will free all already allocated descriptors.
Signed-off-by: Frank Li <Frank.Li@nxp.com>
---
drivers/spi/spi-ingenic.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/spi/spi-ingenic.c b/drivers/spi/spi-ingenic.c
index 7ce4fe965cac1..a0a047510611e 100644
--- a/drivers/spi/spi-ingenic.c
+++ b/drivers/spi/spi-ingenic.c
@@ -164,10 +164,8 @@ spi_ingenic_prepare_dma(struct spi_controller *ctlr, struct dma_chan *chan,
cookie = dmaengine_submit(desc);
ret = dma_submit_error(cookie);
- if (ret) {
- dmaengine_desc_free(desc);
+ if (ret)
return ERR_PTR(ret);
- }
return desc;
}
@@ -186,7 +184,6 @@ static int spi_ingenic_dma_tx(struct spi_controller *ctlr,
&xfer->tx_sg, DMA_MEM_TO_DEV, bits);
if (IS_ERR(tx_desc)) {
dmaengine_terminate_async(ctlr->dma_rx);
- dmaengine_desc_free(rx_desc);
return PTR_ERR(tx_desc);
}
--
2.43.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH 1/1] spi: ingenic: remove dmaengine_desc_free()
2026-09-29 19:06 [PATCH 1/1] spi: ingenic: remove dmaengine_desc_free() Frank.Li
@ 2026-09-29 22:21 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2026-09-29 22:21 UTC (permalink / raw)
To: linux-spi, linux-kernel, Frank.Li; +Cc: vkoul, imx, Frank Li
On Tue, 29 Sep 2026 15:06:20 -0400, Frank.Li@oss.nxp.com wrote:
> spi: ingenic: remove dmaengine_desc_free()
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-7.4
Thanks!
[1/1] spi: ingenic: remove dmaengine_desc_free()
https://git.kernel.org/broonie/spi/c/69338914b1d9
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-09-30 16:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-29 19:06 [PATCH 1/1] spi: ingenic: remove dmaengine_desc_free() Frank.Li
2026-09-29 22:21 ` Mark Brown
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®