linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Oleksij Rempel <o.rempel@pengutronix.de>
To: Wolfram Sang <wsa+renesas@sang-engineering.com>
Cc: linux-mmc@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
	Oleksij Rempel <linux@rempel-privat.de>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Shawn Guo <shawnguo@kernel.org>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Fabio Estevam <festevam@gmail.com>,
	NXP Linux Team <linux-imx@nxp.com>,
	linux-i2c@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/7] i2c: imx: : use proper DMAENGINE API for termination
Date: Fri, 25 Jun 2021 14:06:01 +0200	[thread overview]
Message-ID: <20210625120601.vmwn4ct7mrnusijb@pengutronix.de> (raw)
In-Reply-To: <20210623095942.3325-3-wsa+renesas@sang-engineering.com>

Hello Wolfram,

On Wed, Jun 23, 2021 at 11:59:36AM +0200, Wolfram Sang wrote:
> dmaengine_terminate_all() is deprecated in favor of explicitly saying if
> it should be sync or async. Here, we want dmaengine_terminate_sync()
> because there is no other synchronization code in the driver to handle
> an async case.
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Reviewed-by: Oleksij Rempel <o.rempel@pengutronix.de

Thank you!

> ---
>  drivers/i2c/busses/i2c-imx.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c
> index dc5ca71906db..b224e82924d2 100644
> --- a/drivers/i2c/busses/i2c-imx.c
> +++ b/drivers/i2c/busses/i2c-imx.c
> @@ -423,7 +423,7 @@ static int i2c_imx_dma_xfer(struct imx_i2c_struct *i2c_imx,
>  	return 0;
>  
>  err_submit:
> -	dmaengine_terminate_all(dma->chan_using);
> +	dmaengine_terminate_sync(dma->chan_using);
>  err_desc:
>  	dma_unmap_single(chan_dev, dma->dma_buf,
>  			dma->dma_len, dma->dma_data_dir);
> @@ -899,7 +899,7 @@ static int i2c_imx_dma_write(struct imx_i2c_struct *i2c_imx,
>  				&i2c_imx->dma->cmd_complete,
>  				msecs_to_jiffies(DMA_TIMEOUT));
>  	if (time_left == 0) {
> -		dmaengine_terminate_all(dma->chan_using);
> +		dmaengine_terminate_sync(dma->chan_using);
>  		return -ETIMEDOUT;
>  	}
>  
> @@ -954,7 +954,7 @@ static int i2c_imx_dma_read(struct imx_i2c_struct *i2c_imx,
>  				&i2c_imx->dma->cmd_complete,
>  				msecs_to_jiffies(DMA_TIMEOUT));
>  	if (time_left == 0) {
> -		dmaengine_terminate_all(dma->chan_using);
> +		dmaengine_terminate_sync(dma->chan_using);
>  		return -ETIMEDOUT;
>  	}
>  
> -- 
> 2.30.2
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

  reply	other threads:[~2021-06-25 12:06 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-23  9:59 [PATCH 0/7] i2c: use proper DMAENGINE API for termination Wolfram Sang
2021-06-23  9:59 ` [PATCH 1/7] i2c: at91-master: : " Wolfram Sang
2021-07-13  9:07   ` Codrin.Ciubotariu
2021-08-11 13:24   ` Wolfram Sang
2021-08-11 13:34     ` Codrin.Ciubotariu
2021-06-23  9:59 ` [PATCH 2/7] i2c: imx: " Wolfram Sang
2021-06-25 12:06   ` Oleksij Rempel [this message]
2021-08-11 13:24   ` Wolfram Sang
2021-06-23  9:59 ` [PATCH 3/7] i2c: mxs: " Wolfram Sang
2021-08-11 13:24   ` Wolfram Sang
2021-06-23  9:59 ` [PATCH 4/7] i2c: qup: " Wolfram Sang
2021-08-11 13:24   ` Wolfram Sang
2021-06-23  9:59 ` [PATCH 5/7] i2c: rcar: " Wolfram Sang
2021-06-23 14:02   ` Geert Uytterhoeven
2021-06-23 14:08     ` Wolfram Sang
2021-06-23  9:59 ` [PATCH 6/7] i2c: sh_mobile: " Wolfram Sang
2021-08-11 13:24   ` Wolfram Sang
2021-06-23  9:59 ` [PATCH 7/7] i2c: stm32f7: " Wolfram Sang
2021-06-23 14:03   ` Wolfram Sang
2021-06-30 13:11     ` Alain Volmat
2021-06-30 13:48       ` Wolfram Sang
2021-08-11 13:26 ` [PATCH 0/7] i2c: " Wolfram Sang

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=20210625120601.vmwn4ct7mrnusijb@pengutronix.de \
    --to=o.rempel@pengutronix.de \
    --cc=festevam@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux@rempel-privat.de \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    --cc=wsa+renesas@sang-engineering.com \
    /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;
as well as URLs for NNTP newsgroup(s).