From: Himanshu Jha <himanshujha199640@gmail.com> To: Dan Carpenter <dan.carpenter@oracle.com> Cc: 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, jic23@kernel.org Subject: Re: [PATCH 2/4] staging: iio: accel: Remove unnecessary comments and add suitable suffix Date: Tue, 13 Feb 2018 01:16:05 +0530 [thread overview] Message-ID: <20180212194604.GB15335@himanshu-Vostro-3559> (raw) In-Reply-To: <20180212145731.kws25sjinzqq6ax6@mwanda> 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. -- Thanks Himanshu Jha _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
WARNING: multiple messages have this Message-ID (diff)
From: Himanshu Jha <himanshujha199640@gmail.com> To: Dan Carpenter <dan.carpenter@oracle.com> Cc: 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, jic23@kernel.org Subject: Re: [PATCH 2/4] staging: iio: accel: Remove unnecessary comments and add suitable suffix Date: Tue, 13 Feb 2018 01:16:05 +0530 [thread overview] Message-ID: <20180212194604.GB15335@himanshu-Vostro-3559> (raw) In-Reply-To: <20180212145731.kws25sjinzqq6ax6@mwanda> 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. -- Thanks Himanshu Jha
next prev parent reply other threads:[~2018-02-12 19:46 UTC|newest] Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-02-12 11:54 [PATCH 0/4] staging: iio: accel: adis16201 driver cleanup Himanshu Jha 2018-02-12 11:54 ` Himanshu Jha 2018-02-12 11:54 ` [PATCH 1/4] staging: iio: accel: adis16201: Use SPDX identifier Himanshu Jha 2018-02-12 11:54 ` Himanshu Jha 2018-02-12 11:54 ` [PATCH 2/4] staging: iio: accel: Remove unnecessary comments and add suitable suffix Himanshu Jha 2018-02-12 11:54 ` Himanshu Jha 2018-02-12 12:53 ` Dan Carpenter 2018-02-12 12:53 ` Dan Carpenter 2018-02-12 14:35 ` Himanshu Jha 2018-02-12 14:35 ` Himanshu Jha 2018-02-12 14:57 ` Dan Carpenter 2018-02-12 14:57 ` Dan Carpenter 2018-02-12 19:46 ` Himanshu Jha [this message] 2018-02-12 19:46 ` Himanshu Jha 2018-02-17 12:19 ` Jonathan Cameron 2018-02-17 12:19 ` Jonathan Cameron 2018-02-17 12:16 ` Jonathan Cameron 2018-02-17 12:16 ` Jonathan Cameron 2018-02-12 11:54 ` [PATCH 3/4] staging: iio: accel: Use sign_extend32 and adjust a switch statement Himanshu Jha 2018-02-12 11:54 ` Himanshu Jha 2018-02-12 13:10 ` Dan Carpenter 2018-02-12 13:10 ` Dan Carpenter 2018-02-17 12:23 ` Jonathan Cameron 2018-02-17 12:23 ` Jonathan Cameron 2018-02-17 17:24 ` Dan Carpenter 2018-02-17 17:24 ` Dan Carpenter 2018-02-12 11:54 ` [PATCH 4/4] staging: iio: accel: Move adis16201 driver out of staging Himanshu Jha 2018-02-12 11:54 ` Himanshu Jha 2018-02-12 13:18 ` Dan Carpenter 2018-02-12 13:18 ` Dan Carpenter 2018-02-12 14:41 ` Himanshu Jha 2018-02-12 14:41 ` Himanshu Jha 2018-02-12 14:45 ` Dan Carpenter 2018-02-12 14:45 ` Dan Carpenter 2018-02-17 12:26 ` Jonathan Cameron 2018-02-17 12:26 ` Jonathan Cameron 2018-02-12 14:10 ` Philippe Ombredanne 2018-02-12 14:10 ` Philippe Ombredanne 2018-02-12 14:37 ` Himanshu Jha 2018-02-12 14:37 ` Himanshu Jha 2018-02-12 22:18 ` Philippe Ombredanne
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=20180212194604.GB15335@himanshu-Vostro-3559 \ --to=himanshujha199640@gmail.com \ --cc=21cnbao@gmail.com \ --cc=Michael.Hennerich@analog.com \ --cc=dan.carpenter@oracle.com \ --cc=devel@driverdev.osuosl.org \ --cc=gregkh@linuxfoundation.org \ --cc=jic23@kernel.org \ --cc=knaack.h@gmx.de \ --cc=lars@metafoo.de \ --cc=linux-iio@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=pmeerw@pmeerw.net \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.