Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2272767pxk; Sat, 5 Sep 2020 15:39:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxf1ZmPBuHVqFg/ZPfg8B/uL/OCHEP9cG+b7Sdsouce9GWvbecgT5+et92ClfAWf2Qr4d9/ X-Received: by 2002:a05:6402:326:: with SMTP id q6mr15213426edw.216.1599345572211; Sat, 05 Sep 2020 15:39:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599345572; cv=none; d=google.com; s=arc-20160816; b=AyALEqFSDFWAYLUQZOQXiopXi/tkquy+u5ihUEfSYs6blByf1lNzqTtuiBlIfN26x1 HRf15k1Qa50E+4zOpU+xFTCAHXtTC6Z4qqfWI0MqPYnwOELh0qgqhXioflWVfg4PTEeo +g0WyKNLNVLhVpNxcxqUulhw0HTQfYr80zwYkn3nkBiFPUxIDHbSUXhhDbaD6AvkfPfZ dJchV8SqC8pRhBhDKA0JBuwImgu3kyEc7niASXwyj+d3sjwrHduNAEhk5e6qGBwUN1Wm nO8OISvSc5MH1VioMrxAYbrgFMcUAt0PqK65lq/NE7QnjShhh5l++apphceuOGU3o0tX 7P0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=wIgbCe+me6m/O/hCjjtMhyNJ1DzGS8TtOXQnp4EnPpc=; b=z3rF3lOVpaYeH3ovFn3oxNJHCFHAj5HwUMcuj3pFuXa9JApu+rYEhY6dDc1pV3XStZ wdup+w+GC8HmfhVlwt6KVMk5K2p9HrmqzlClBIynufmQWdAP/lRqLLe+qSdyjZktX1T2 0cqTTMVIYglkeME7z51S1S6+WSIU11FNYqxKgulV16w2YJrqFpdS5LhvetaOGjBy3QRr iOaQfRw/BqEkD/QfsB9o2jaGEjcu36+bc302DarfTyv1NJWmK2XPbmm48PqKwfmdKTPp 8pl9f7woZNA6L0Cmc1cPSP50VKfHm1Xt76KZwIBOm5Pmd/gZ2EGrkTmCbCotmNDLvNBN lbew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=hul0flwE; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y3si5352670ejm.396.2020.09.05.15.39.09; Sat, 05 Sep 2020 15:39:32 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=hul0flwE; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728779AbgIEWg2 (ORCPT + 99 others); Sat, 5 Sep 2020 18:36:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44654 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728727AbgIEWgZ (ORCPT ); Sat, 5 Sep 2020 18:36:25 -0400 Received: from mail-lj1-x241.google.com (mail-lj1-x241.google.com [IPv6:2a00:1450:4864:20::241]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6FA80C061244; Sat, 5 Sep 2020 15:36:23 -0700 (PDT) Received: by mail-lj1-x241.google.com with SMTP id a15so12008238ljk.2; Sat, 05 Sep 2020 15:36:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=wIgbCe+me6m/O/hCjjtMhyNJ1DzGS8TtOXQnp4EnPpc=; b=hul0flwEwmUqgO6VhLHCqWqaMDOs5epAdmW0VnRXtDVG2gCUXITZGAGhxiKSOzLAFw ZJ97VfqEmdxTCuBMu8sO4ccIrWQIzeJy0JT7yPfY8xDCFCKbS9IFy5fTXTYsM8Fp0gif H98FTbzD2DloduoJWVtyiAzeyxdZ2WRSVuo5GApziIAouaWn9ODvgbVmVmpAP41Lpzex 14tULhyaO7eakDwuYzEZyTKh7hYnLBA0xJjre9rcROUNeeEWa+mk2PDyoXjUdjYTg1z2 yTxKxVEJum8skaAScAyO4IWCCCbkvj8UU7wk6BnaABue2EJ/jaXKxUsAuHfwA1jQ9ks5 818Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=wIgbCe+me6m/O/hCjjtMhyNJ1DzGS8TtOXQnp4EnPpc=; b=hqTtbTqYSjw1u5QaKctdPMDBfcN3kh4qu32ZYbIdlnZ3VpY5x3Jrpi4a3in9+cz/07 BF9gwpMNK4SYaH0ZsJi7SMNVKfR5lEme5Ej3U2r4cJxeTN7AHA97oxmXqVMkJtnAnyFc hurB3B4Q8+mqWvO5Nb1O2dCsbVqMGBbveMmwsFW+mTV4Abnd1rv5Fxixl8jignYUHRyM 1EQudsNF9BtWJFIBSzm3fNf4R4n5bxDw7s0PqVYyIB0WK3bIlF97ryZIX/TuU7Uj2t7a W14VHGWIJ54xx3wMX5sbQ04o0ypz+cca2P7ozWDBici1nOTdBTbRpRSbcmR4SGTvRlH7 PBnA== X-Gm-Message-State: AOAM531rIt2CJkQLE0o1EOKdxS7IhAUl8bW0cfsDBfxUwcWcbVOzrQBx rudUCsq6aa8zUdHe9l56Y6syZTtWYwY= X-Received: by 2002:a05:651c:1032:: with SMTP id w18mr7029893ljm.238.1599345381770; Sat, 05 Sep 2020 15:36:21 -0700 (PDT) Received: from [192.168.2.145] (109-252-170-211.dynamic.spd-mgts.ru. [109.252.170.211]) by smtp.googlemail.com with ESMTPSA id v18sm2856633ljd.51.2020.09.05.15.36.20 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 05 Sep 2020 15:36:21 -0700 (PDT) Subject: Re: [PATCH v4 16/31] i2c: tegra: Remove "dma" variable from tegra_i2c_xfer_msg() To: =?UTF-8?B?TWljaGHFgiBNaXJvc8WCYXc=?= Cc: Thierry Reding , Jonathan Hunter , Laxman Dewangan , Wolfram Sang , Andy Shevchenko , linux-i2c@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org References: <20200905204151.25343-1-digetx@gmail.com> <20200905204151.25343-17-digetx@gmail.com> <20200905222323.GC18554@qmqm.qmqm.pl> From: Dmitry Osipenko Message-ID: <7587704b-7bc1-d6a9-19b4-befcbcbce26c@gmail.com> Date: Sun, 6 Sep 2020 01:36:20 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20200905222323.GC18554@qmqm.qmqm.pl> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 06.09.2020 01:23, Michał Mirosław пишет: > On Sat, Sep 05, 2020 at 11:41:36PM +0300, Dmitry Osipenko wrote: >> The "dma" variable of tegra_i2c_xfer_msg() function doesn't bring much in >> regards to readability and generation of the code, hence let's remove it >> to clean up code a tad. > [...] >> --- a/drivers/i2c/busses/i2c-tegra.c >> +++ b/drivers/i2c/busses/i2c-tegra.c > [...] >> + if (i2c_dev->is_curr_dma_xfer) { > [...] > > In this case I like the previous code better: just because there are > less letters to read. :-) Besides readability, I also don't like much that the is_curr_dma_xfer is initialized in tegra_i2c_xfer_msg() and then could be overridden by tegra_i2c_config_fifo_trig(). In a result the "dma" variable confuses me since it's not instantly obvious why it's set after tegra_i2c_config_fifo_trig(). Looking at the final result, I think it's better to have the variable removed. It makes code more consistent, IMO.