From: Frank Li <Frank.Li@nxp.com>
To: Vinod Koul <vkoul@kernel.org>,
Dong Aisheng <aisheng.dong@nxp.com>,
Andi Shyti <andi.shyti@kernel.org>,
Shawn Guo <shawnguo@kernel.org>,
Sascha Hauer <s.hauer@pengutronix.de>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Fabio Estevam <festevam@gmail.com>
Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-i2c@vger.kernel.org, imx@lists.linux.dev,
linux-arm-kernel@lists.infradead.org, carlos.song@nxp.com,
Frank Li <Frank.Li@nxp.com>
Subject: [PATCH 0/2] dmaengine: Add cleanup to simple code
Date: Thu, 02 Oct 2025 15:49:40 -0400 [thread overview]
Message-ID: <20251002-dma_chan_free-v1-0-4dbf116c2b19@nxp.com> (raw)
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>
---
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 | 4 +++-
2 files changed, 6 insertions(+), 9 deletions(-)
---
base-commit: 019ffdd87705bcef1ca5cf9bfdd2b358ce190ab5
change-id: 20251001-dma_chan_free-0392f4004d9e
Best regards,
--
Frank Li <Frank.Li@nxp.com>
next reply other threads:[~2025-10-02 19:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-02 19:49 Frank Li [this message]
2025-10-02 19:49 ` [PATCH 1/2] dmaengine: Add cleanup FREE defines for dma_async_tx_descriptor Frank Li
2025-10-02 19:49 ` [PATCH 2/2] i2c: lpi2c: Use cleanup helper for dma_async_tx_descriptor error handling Frank Li
2025-10-02 20:10 ` Christophe JAILLET
2025-10-02 20:51 ` Frank Li
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251002-dma_chan_free-v1-0-4dbf116c2b19@nxp.com \
--to=frank.li@nxp.com \
--cc=aisheng.dong@nxp.com \
--cc=andi.shyti@kernel.org \
--cc=carlos.song@nxp.com \
--cc=dmaengine@vger.kernel.org \
--cc=festevam@gmail.com \
--cc=imx@lists.linux.dev \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
--cc=vkoul@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®