Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2276300pxk; Sat, 5 Sep 2020 15:51:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxL1qw9Wy7UF4RaDiESsVfkCb05yXuk1TpanWD40ru7Fz3mrOwjJdeaZ5UA2PT0XY6rbhKi X-Received: by 2002:a17:906:f150:: with SMTP id gw16mr13508547ejb.528.1599346264804; Sat, 05 Sep 2020 15:51:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599346264; cv=none; d=google.com; s=arc-20160816; b=c9sjcHaDp5pRp7jbzPWLZbVoernr857+vPuWiWiVKrvrYWyLPvnhAUL+/J2MSQKXBE XS3V5Ryl8TOgQ2pDOslqyVuXi6qf6UihhSEqdv9isM5LqFdTofPpJORkTio7006ZEcE0 n3gLPWz+2Sjy2tz2z27G2BIzigrNcelje2IIjP6O/8/PHzd1rvCn1hv/0JIUfD/ov1Fz yQepZUlBd59gpHyPHjoL9K+R8SAmlzxTixfFKguwpU+khtBgcwYWuyroNrRWgVwxvYRh /LSF4tNClf9glNC84jFYZKB096CbZRHIZ+ImY1RrZegPw2RY4KBlFOxJPoLF/uAV6RE9 EySg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=EAFVpT5Oi9HE9bS7dhJMsaituncyV2Nu+lXdBeInJ6Y=; b=i7QxLcWRyYgi9sakuvgbnq5TFkYhVDgqlIO+UiwzVvvxxhIGrALp7KA5eCabonWPkZ pq1428AZoJa4C88l/ZGukqLcGUf9+Z2rY1f25Sg0DfqbbW0BKTFcp+abtZhqTtaVBT48 MoTWIefbIJcTk630rVdKZo+e38I855+cCnt2a7DB2YOAjElYRY8aIL9nSb9zmte+YW4A kMZq5sRMSPskKXpnudboSRAE9GynGQbleXn6k3GRTQ/E+HkF9CDSI16hvF287NQbVyKP SCSj1pPsL9mAQ6CdEDnmdRAU8RUK1TvbBcwAc8H69XB+ubUrfwlGjkef8RIQk7el1heb MnOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rere.qmqm.pl header.s=1 header.b=YldgAUJe; 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 m16si6979305edr.280.2020.09.05.15.50.42; Sat, 05 Sep 2020 15:51:04 -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=@rere.qmqm.pl header.s=1 header.b=YldgAUJe; 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 S1728791AbgIEWtc (ORCPT + 99 others); Sat, 5 Sep 2020 18:49:32 -0400 Received: from rere.qmqm.pl ([91.227.64.183]:53086 "EHLO rere.qmqm.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728103AbgIEWtb (ORCPT ); Sat, 5 Sep 2020 18:49:31 -0400 Received: from remote.user (localhost [127.0.0.1]) by rere.qmqm.pl (Postfix) with ESMTPSA id 4BkV8722snz2F; Sun, 6 Sep 2020 00:48:39 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=rere.qmqm.pl; s=1; t=1599346119; bh=Y4MUi4D1LdGhtlmzuiUdmRhEvW5C8rA1H02gFCm/sKo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=YldgAUJeGbeXOHWoL0Rg8hcwOjmg5lO5MdBiLPVqb1S/lRXDtTkgkT1InAEI1Io1t BzfkrpipNjuY3NAsQmKHWd5wLFz6gbZshpo5b3PBbi5H0JLf7IiUTC3anaJPtkOneK dj0Mtf19O6pHNudn75GWvLJfrRUrNwpSfN637IiBVmvbQhPipV98zn4sRrAG+eTkJG p0Crdd3dSMDgKKH7AbbLM4znxNVUqhC5PsrViKA/ViMAhJ9FqFepkzRguE2ChJcyD/ wN7o7mNNrKFqHI2ffnNkN1J5V8tEnn2rAcwXrQ2u60INk42eW4io71KICPXXiN9Zwy 419LlthIC7ARg== X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.102.4 at mail Date: Sun, 6 Sep 2020 00:49:28 +0200 From: =?iso-8859-2?Q?Micha=B3_Miros=B3aw?= To: Dmitry Osipenko 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 Subject: Re: [PATCH v4 16/31] i2c: tegra: Remove "dma" variable from tegra_i2c_xfer_msg() Message-ID: <20200905224928.GE18554@qmqm.qmqm.pl> References: <20200905204151.25343-1-digetx@gmail.com> <20200905204151.25343-17-digetx@gmail.com> <20200905222323.GC18554@qmqm.qmqm.pl> <7587704b-7bc1-d6a9-19b4-befcbcbce26c@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <7587704b-7bc1-d6a9-19b4-befcbcbce26c@gmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Sep 06, 2020 at 01:36:20AM +0300, Dmitry Osipenko wrote: > 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. If it could be changed in some callee, then indeed it is better. In this case I would include this information in the commit msg. Best Regards, Michał Mirosław