Linux I2C development
 help / color / mirror / Atom feed
From: Carlos Song <carlos.song@oss.nxp.com>
To: Frank.Li@oss.nxp.com, 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>,
	"open list:FREESCALE IMX LPI2C DRIVER"
	<linux-i2c@vger.kernel.org>,
	"open list:FREESCALE IMX LPI2C DRIVER" <imx@lists.linux.dev>,
	"moderated list:ARM/FREESCALE IMX / MXC / LAYERSCAPE ARM
	ARCHIT..." <linux-arm-kernel@lists.infradead.org>,
	open list <linux-kernel@vger.kernel.org>
Cc: vkoul@kernel.org
Subject: Re: [PATCH 1/1] i2c: imx-lpi2c: remove dmaengine_desc_free()
Date: Thu, 8 Oct 2026 16:09:12 +0800	[thread overview]
Message-ID: <ccde4ec9-ec40-4715-93a0-3801c57809ee@oss.nxp.com> (raw)
In-Reply-To: <20260929190605.3516147-1-Frank.Li@oss.nxp.com>







> 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;
>  }
>  

Hi, Frank

LGTM.

Reviewed-by: Carlos Song <carlos.song@nxp.com>

-- 
Best Regards,
Carlos


      reply	other threads:[~2026-10-08  8:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-29 19:06 [PATCH 1/1] i2c: imx-lpi2c: remove dmaengine_desc_free() Frank.Li
2026-10-08  8:09 ` Carlos Song [this message]

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=ccde4ec9-ec40-4715-93a0-3801c57809ee@oss.nxp.com \
    --to=carlos.song@oss.nxp.com \
    --cc=Frank.Li@nxp.com \
    --cc=Frank.Li@oss.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