linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] dmaengine: Add cleanup to simple code
@ 2025-10-03 16:26 Frank Li
  2025-10-03 16:26 ` [PATCH v2 1/2] dmaengine: Add cleanup FREE defines for dma_async_tx_descriptor Frank Li
  2025-10-03 16:26 ` [PATCH v2 2/2] i2c: lpi2c: Use cleanup helper for dma_async_tx_descriptor error handling Frank Li
  0 siblings, 2 replies; 11+ messages in thread
From: Frank Li @ 2025-10-03 16:26 UTC (permalink / raw)
  To: Vinod Koul, Dong Aisheng, Andi Shyti, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam
  Cc: dmaengine, linux-kernel, linux-i2c, imx, linux-arm-kernel,
	carlos.song, Frank Li

start_dma()
{
        struct dma_async_tx_descriptor *rx_cmd_desc __free(dma_async_tx_descriptor) = NULL;
        ...
        cookie = dmaengine_submit(rx_cmd_desc);
        if (dma_submit_error(cookie))
                return dma_submit_error(cookie);
        ...
        retain_and_null_ptr(rx_cmd_desc);

        return 0;
}

To: Vinod Koul <vkoul@kernel.org>
To: Dong Aisheng <aisheng.dong@nxp.com>
To: Andi Shyti <andi.shyti@kernel.org>
To: Shawn Guo <shawnguo@kernel.org>
To: Sascha Hauer <s.hauer@pengutronix.de>
To: Pengutronix Kernel Team <kernel@pengutronix.de>
To: Fabio Estevam <festevam@gmail.com>
Cc: dmaengine@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: linux-i2c@vger.kernel.org
Cc: imx@lists.linux.dev
Cc: linux-arm-kernel@lists.infradead.org
Cc: carlos.song@nxp.com

Signed-off-by: Frank Li <Frank.Li@nxp.com>
---
Changes in v2:
- fix reduntant empty line remove
- fix goto branch in i2c
- Link to v1: https://lore.kernel.org/r/20251002-dma_chan_free-v1-0-4dbf116c2b19@nxp.com

---
Frank Li (2):
      dmaengine: Add cleanup FREE defines for dma_async_tx_descriptor
      i2c: lpi2c: Use cleanup helper for dma_async_tx_descriptor error handling

 drivers/i2c/busses/i2c-imx-lpi2c.c | 11 +++--------
 include/linux/dmaengine.h          |  3 +++
 2 files changed, 6 insertions(+), 8 deletions(-)
---
base-commit: 019ffdd87705bcef1ca5cf9bfdd2b358ce190ab5
change-id: 20251001-dma_chan_free-0392f4004d9e

Best regards,
--
Frank Li <Frank.Li@nxp.com>



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2025-12-16 15:02 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-03 16:26 [PATCH v2 0/2] dmaengine: Add cleanup to simple code Frank Li
2025-10-03 16:26 ` [PATCH v2 1/2] dmaengine: Add cleanup FREE defines for dma_async_tx_descriptor Frank Li
2025-12-03 22:19   ` Frank Li
2025-12-03 22:48   ` Dave Jiang
2025-12-04  1:30     ` Frank Li
2025-12-04 15:07       ` Dave Jiang
2025-12-16 15:01         ` Vinod Koul
2025-10-03 16:26 ` [PATCH v2 2/2] i2c: lpi2c: Use cleanup helper for dma_async_tx_descriptor error handling Frank Li
2025-12-03 22:52   ` Dave Jiang
2025-12-04  1:27     ` Frank Li
2025-12-04 15:09       ` Dave Jiang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).