spi: ingenic: remove dmaengine_desc_free()
Subsystems (2)
PATCH 1/1 spi: ingenic: remove dmaengine_desc_free()
From: Frank Li <[email protected]>
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.
--- drivers/spi/spi-ingenic.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/spi/spi-ingenic.c +1 -4
@@ -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); }
Signature · 1 line
2.43.0
Mark Brown
maintainerQuoted 1 line · On Tue, 29 Sep 2026 15:06:20 -0400, [email protected] 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