From: Frank.Li@oss.nxp.com
To: Dong Aisheng <aisheng.dong@nxp.com>,
Andi Shyti <andi.shyti@kernel.org>, Frank Li <Frank.Li@nxp.com>,
Sascha Hauer <s.hauer@pengutronix.de>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Fabio Estevam <festevam@gmail.com>,
linux-i2c@vger.kernel.org (open list:FREESCALE IMX LPI2C DRIVER),
imx@lists.linux.dev (open list:FREESCALE IMX LPI2C DRIVER),
linux-arm-kernel@lists.infradead.org (moderated
list:ARM/FREESCALE IMX / MXC / LAYERSCAPE ARM ARCHIT...),
linux-kernel@vger.kernel.org (open list)
Cc: vkoul@kernel.org, imx@lists.linux.dev
Subject: [PATCH 1/1] i2c: imx-lpi2c: remove dmaengine_desc_free()
Date: Tue, 29 Sep 2026 15:06:05 -0400 [thread overview]
Message-ID: <20260929190605.3516147-1-Frank.Li@oss.nxp.com> (raw)
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/i2c/busses/i2c-imx-lpi2c.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/i2c/busses/i2c-imx-lpi2c.c b/drivers/i2c/busses/i2c-imx-lpi2c.c
index 49aabef7f115c..d6f266e2d6bea 100644
--- a/drivers/i2c/busses/i2c-imx-lpi2c.c
+++ b/drivers/i2c/busses/i2c-imx-lpi2c.c
@@ -851,7 +851,6 @@ static int lpi2c_dma_rx_cmd_submit(struct lpi2c_imx_struct *lpi2c_imx)
submit_err_exit:
dma_unmap_single(txchan->device->dev, dma->dma_tx_addr,
dma->rx_cmd_buf_len, DMA_TO_DEVICE);
- dmaengine_desc_free(rx_cmd_desc);
return -EINVAL;
}
@@ -910,7 +909,6 @@ static int lpi2c_dma_submit(struct lpi2c_imx_struct *lpi2c_imx)
submit_err_exit:
lpi2c_dma_unmap(dma);
- dmaengine_desc_free(desc);
return -EINVAL;
}
--
2.43.0
next reply other threads:[~2026-09-29 19:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-29 19:06 Frank.Li [this message]
2026-10-08 8:09 ` Carlos Song
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=20260929190605.3516147-1-Frank.Li@oss.nxp.com \
--to=frank.li@oss.nxp.com \
--cc=Frank.Li@nxp.com \
--cc=aisheng.dong@nxp.com \
--cc=andi.shyti@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=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®