Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp1079167pxv; Fri, 25 Jun 2021 05:07:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyd4IM7r8raWb+KqrBk38KlJhsswBs6QxkxXx/flde2pSdpn8dgEFmBmVYERX/YRTtWWPNx X-Received: by 2002:adf:ea07:: with SMTP id q7mr10676548wrm.153.1624622875655; Fri, 25 Jun 2021 05:07:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624622875; cv=none; d=google.com; s=arc-20160816; b=R1CgXt8ODSlOcbsVjzKlXLmF7hIQq9uVhUdadJRhPDrbx+5WocBySB5F9MUe0AmYNg b5zVhShG842/EKIUpVtfft3dXaY2vrfY5ngwzjFGfw7eA8aNY+ux1P9VC9r2VCuzOczs hjJXcEMG8zN/Wadh7qbIjZNWjyYsnUTr1Rljk4VJskewZi6v9iSG6RAwcSGPELOENuTW lBbSrZ5fuU3xEGfxZ/MGl3v6NvJCwqvRRxVnufd52rn0Lg9AjVvQOLioINWH6VostBbA Zy1TDLcPUYYlfxLP0BkEWCvJ1PFZst2hnFkRHmpwv8KCmyQPnRxWZcabVRE+7HJrk6+D Gi2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=KXL7AJ1GbysTXh/ChcfgxTfw8ayuTCqDgXCIfoR420I=; b=Huxeds6cE66LdQO9DSaAS9kHd5/t+K+BxJg61NQRIFTqxR3PzKpgA2Gr8q9xLqpGw0 0spmH2/KcPjjyKjJ9gVJXRrYmejSPvC+UoO/2UW181QliD7HXG10NkYjCEk3WxS462cP YJZgp9OVSrJ0Xwr8PStsQmYFH453gIP6ldeu6G+rPSGBUZjOjEZndBZDVqjs2jfbMDF1 VT0ZGAeW2mdJCFdcckFknD4c7w7i9GFwxLCyggxw/oCMJap7GKWy7T51utpk9LDeOTaf jKK8FjR81UJwb38OdPKyM9VcrmJypF3l/fz+SfK129l31nXC8bNLo9fSHmBA+eARreYT vKmg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jl20si5569823ejc.421.2021.06.25.05.07.31; Fri, 25 Jun 2021 05:07:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230151AbhFYMIe (ORCPT + 99 others); Fri, 25 Jun 2021 08:08:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53388 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230132AbhFYMIe (ORCPT ); Fri, 25 Jun 2021 08:08:34 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8BB9DC061766 for ; Fri, 25 Jun 2021 05:06:13 -0700 (PDT) Received: from pty.hi.pengutronix.de ([2001:67c:670:100:1d::c5]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lwkav-00082P-Tq; Fri, 25 Jun 2021 14:06:01 +0200 Received: from ore by pty.hi.pengutronix.de with local (Exim 4.89) (envelope-from ) id 1lwkav-0007Xd-3u; Fri, 25 Jun 2021 14:06:01 +0200 Date: Fri, 25 Jun 2021 14:06:01 +0200 From: Oleksij Rempel To: Wolfram Sang Cc: linux-mmc@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Oleksij Rempel , Pengutronix Kernel Team , Shawn Guo , Sascha Hauer , Fabio Estevam , NXP Linux Team , 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 Message-ID: <20210625120601.vmwn4ct7mrnusijb@pengutronix.de> References: <20210623095942.3325-1-wsa+renesas@sang-engineering.com> <20210623095942.3325-3-wsa+renesas@sang-engineering.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210623095942.3325-3-wsa+renesas@sang-engineering.com> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-IRC: #ptxdist @freenode X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-Uptime: 14:03:03 up 205 days, 2:09, 48 users, load average: 0.18, 0.21, 0.09 User-Agent: NeoMutt/20170113 (1.7.2) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c5 X-SA-Exim-Mail-From: ore@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Reviewed-by: Oleksij Rempel --- > 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 |