Received: by 10.223.185.116 with SMTP id b49csp1737612wrg; Sat, 17 Feb 2018 04:20:11 -0800 (PST) X-Google-Smtp-Source: AH8x226QGhm1zG3WUiPy5aMKvsS0lOPNO+7iSswBJ2JqO4z7S3m+2tPb/TYLvU06mkB8BC3OvZ8q X-Received: by 10.99.174.69 with SMTP id e5mr7662821pgp.269.1518870011210; Sat, 17 Feb 2018 04:20:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518870011; cv=none; d=google.com; s=arc-20160816; b=gCFSakMCkX3SJwjvPhbsfDYIq2K4o/KOlDHGZWjl+Z3sLeI9WLFc6FvliU3VneN3hv LDQgCn3lrmR4YpM7RJZ6Kq7FjDxgCrKW3qFz6jNKZGEBv+o5o4GlNo1cyRzuPi1st0bS VDDjaywIFAL/VKE5ixeRgvd73rX/UAuIlYibnIJ007eSqFtgdbURz0ltlcPOzYyjSFBx vdtdGe/2a3cQh9EOArGVQSLyV/cUYRanbwtYg1QkUTYXDsSkSOc+nY+ZY4Q1OyDaj4Xo 4v+ddJe4ax0vsVz/Sxi2IItzNr9BHmXiD3GaLwfYSMLvVqRckTq+g3/p20Jf0XdoS6YZ m9kg== 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:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dmarc-filter:arc-authentication-results; bh=HWXRgRZ9hSFTmQ7rcWKJqy24z+MIF2ATwO29Z3lvJkU=; b=sC8DGn1xT1yaXXqbIaxmvuuVa28L3UuO83x+TKVzewtJBQWb9xhHlrJjTi3yh0Ass5 Ih/dQN5SEYkptBlNIfvCm5WXfdH5ep8Qqh8Bc1nwH2+c7fi+qQyffaul9+i2iZcrOKKT Qp/HigUKUDpASYrVuAqt4H5JTBXBY5o5wPMuiLT56DvM9ylKu1Mng19YU3NHv3lev81O PROya9dcLP1XS1enrc1XSwzzDulNZ48bs53o2XezCBoVhg8Hisu7Sp+mr/h30+tNp87k VIsD1u+hyfCi+DJKb/crQkWv71VVqt3/o65rnH3tEf2B9pi3E7KbOsi/EA+PxiBHuZhl 0VeA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i1-v6si1263612plt.158.2018.02.17.04.19.56; Sat, 17 Feb 2018 04:20:11 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751056AbeBQMTT (ORCPT + 99 others); Sat, 17 Feb 2018 07:19:19 -0500 Received: from mail.kernel.org ([198.145.29.99]:45368 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750980AbeBQMTS (ORCPT ); Sat, 17 Feb 2018 07:19:18 -0500 Received: from archlinux (cpc91196-cmbg18-2-0-cust659.5-4.cable.virginm.net [81.96.234.148]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A534E217C1; Sat, 17 Feb 2018 12:19:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A534E217C1 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=jic23@kernel.org Date: Sat, 17 Feb 2018 12:19:12 +0000 From: Jonathan Cameron To: Himanshu Jha Cc: Dan Carpenter , devel@driverdev.osuosl.org, lars@metafoo.de, Michael.Hennerich@analog.com, linux-iio@vger.kernel.org, gregkh@linuxfoundation.org, 21cnbao@gmail.com, linux-kernel@vger.kernel.org, pmeerw@pmeerw.net, knaack.h@gmx.de Subject: Re: [PATCH 2/4] staging: iio: accel: Remove unnecessary comments and add suitable suffix Message-ID: <20180217121912.6b7cb5ae@archlinux> In-Reply-To: <20180212194604.GB15335@himanshu-Vostro-3559> References: <1518436499-8584-1-git-send-email-himanshujha199640@gmail.com> <1518436499-8584-3-git-send-email-himanshujha199640@gmail.com> <20180212125312.cjo76spuu6agjawc@mwanda> <20180212143522.GA12142@himanshu-Vostro-3559> <20180212145731.kws25sjinzqq6ax6@mwanda> <20180212194604.GB15335@himanshu-Vostro-3559> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 13 Feb 2018 01:16:05 +0530 Himanshu Jha wrote: > On Mon, Feb 12, 2018 at 05:57:31PM +0300, Dan Carpenter wrote: > > On Mon, Feb 12, 2018 at 08:05:22PM +0530, Himanshu Jha wrote: > > > But these should be done when we have *more* instances. > > > > > > For eg: > > > I added a tab space in function static int adis16201_read_raw() argument > > > to match open parentheses in this patch. But I also added tabs while > > > removing and adding suitable suffix to the macros. So, should it also be > > > done in a separate patch ? > > > > If you're changing a line of code and you fix a white space issue on > > that same line, then that's fine. If it's just in the same function, > > then do it in a separate patch. In other words, adding tabs when you're > > moving around macros is fine, but adding it to the arguments is > > unrelated. > > I will try and divide my patches next time :) > > > This patch was honestly pretty tricky to review. > > I am sorry for that. Might be easy for IIO reviewers ;) > > > Jonathan assumes reviewers have the datasheet in front of them and I > > assume that that they don't. He's probably right... But especially > > comments like this: > > > > *val2 = 220000; /* 1.22 mV */ > > They are pretty obvious as you can see from the return statements > just below that which is : > > return IIO_VAL_INT_PLUS_MICRO; > > These comments are obvious because we know 'val1' will be responsible > for Integer part(1.0) and 'val2' for the Micro part(220000 * 10^-6 = 0.22). > Isn't it ? > > Although I am new to IIO please correct if I'm wrong. > The oddity here is that the base units (here mV) are inconsistent due to some ancient attempts to align with other subsystems. Dan is perhaps correct in that the comment might be helpful for that reason. If so I would prefer to see it made clear what is going on. /* Voltage base units are mV hence 1.22 mV */ Also should definitely have it's own line rather than being associated with just the val2 line like it currently is. Jonathan