Skip to contentSkip to conversation

spi: ingenic: remove dmaengine_desc_free()

PATCH In review [email protected] 2 participants 2 messages Sep 29 – Sep 30

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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
index 7ce4fe965cac1..a0a047510611e 100644
@@ -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
maintainer
#1 lore raw
Quoted 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