From: DEEPAK VARMA <mh12gx2825@gmail.com>
To: Lars-Peter Clausen <lars@metafoo.de>
Cc: Rohit Sarkar <rohitsarkar5398@gmail.com>,
Stefano Brivio <sbrivio@redhat.com>,
outreachy-kernel@googlegroups.com, gregkh@linuxfoundation.org,
daniel.baluta@gmail.com, kieran.bingham@ideasonboard.com,
Michael.Hennerich@analog.com, jic23@kernel.org, knaack.h@gmx.de,
pmeerw@pmeerw.net, linux-iio@vger.kernel.org
Subject: Re: [Outreachy kernel] [PATCH 1/2] staging: iio: adc: ad7192: Reformat lines crossing 80 columns
Date: Wed, 18 Mar 2020 23:01:04 +0530 [thread overview]
Message-ID: <20200318173102.GA23740@deeUbuntu> (raw)
In-Reply-To: <1fe9df37-4d83-82e6-bd57-ecb4195447a5@metafoo.de>
On Wed, Mar 18, 2020 at 05:44:16PM +0100, Lars-Peter Clausen wrote:
> On 3/18/20 5:43 PM, DEEPAK VARMA wrote:
> > On Wed, Mar 18, 2020 at 09:52:41PM +0530, Rohit Sarkar wrote:
> > > On Wed, Mar 18, 2020 at 09:36:50PM +0530, DEEPAK VARMA wrote:
> > > > On Wed, Mar 18, 2020 at 09:31:58AM +0100, Stefano Brivio wrote:
> > > > > On Wed, 18 Mar 2020 09:56:59 +0530
> > > > > Deepak R Varma <mh12gx2825@gmail.com> wrote:
> > > > >
> > > > > > Macro arguments are computed at the time of macro invocation. This makes
> > > > > > the lines cross 80 column width. Add variables to perform the
> > > > > > calculations before hand and use these new variable in the macro calls
> > > > > > instead.
> > > > > >
> > > > > > Also re-indent enum members to address checkpatch warning / check messages.
> > > > > >
> > > > > > Signed-off-by: Deepak R Varma <mh12gx2825@gmail.com>
> > > > > > ---
> > > > > > drivers/staging/iio/adc/ad7192.c | 15 ++++++++-------
> > > > > > 1 file changed, 8 insertions(+), 7 deletions(-)
> > > > > >
> > > > > > diff --git a/drivers/staging/iio/adc/ad7192.c b/drivers/staging/iio/adc/ad7192.c
> > > > > > index bf3e2a9cc07f..0265f6607d75 100644
> > > > > > --- a/drivers/staging/iio/adc/ad7192.c
> > > > > > +++ b/drivers/staging/iio/adc/ad7192.c
> > > > > > @@ -156,8 +156,8 @@
> > > > > > */
> > > > > > enum {
> > > > > > - AD7192_SYSCALIB_ZERO_SCALE,
> > > > > > - AD7192_SYSCALIB_FULL_SCALE,
> > > > > > + AD7192_SYSCALIB_ZERO_SCALE,
> > > > > > + AD7192_SYSCALIB_FULL_SCALE,
> > > > > > };
> > > > > > struct ad7192_state {
> > > > > > @@ -477,17 +477,18 @@ static ssize_t ad7192_set(struct device *dev,
> > > > > > }
> > > > > > static void ad7192_get_available_filter_freq(struct ad7192_state *st,
> > > > > > - int *freq)
> > > > > > + int *freq)
> > > > > > {
> > > > > > unsigned int fadc;
> > > > > > + unsigned int sync3_filter, sync4_filter;
> > > > > > /* Formulas for filter at page 25 of the datasheet */
> > > > > > - fadc = DIV_ROUND_CLOSEST(st->fclk,
> > > > > > - AD7192_SYNC4_FILTER * AD7192_MODE_RATE(st->mode));
> > > > > > + sync4_filter = AD7192_SYNC4_FILTER * AD7192_MODE_RATE(st->mode);
> > > > >
> > > > > Have you read page 25 of the datasheet? Why is this called
> > > > > sync4_filter, with a 'y'?
> > > > >
> > > >
> > > > Sorry, I am not sure what you are referring to. Can you please elaborate
> > > > or point me to where the data sheet is located?
> > > >
> > > > Deepak.
> > >
> > > Hey Deepak,
> > > You can find the datasheet for ad7192 here https://pdf1.alldatasheet.com/datasheet-pdf/view/988287/AD/AD7192.html
> > >
> >
> > Thank you Rohit. I got it. I understand Stefano's comments now. I named
> > the variables with a 'y' to keep it similar to the macro
> > AD7192_SYNCn_FILTER. Let me know if the variable name looks odd and I
> > should rename it to sinc4_filter instead.
>
> Hi,
>
> Please send a patch to rename the macro to SINC as well. This is a typo in
> the macro.
>
> Thanks,
> - Lars
Sure. Will send a separate patch for the macro name correction in the same
pathset.
Deepak.
next prev parent reply other threads:[~2020-03-18 17:31 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-18 4:26 [PATCH 0/2] staging: iio: adc: General code reformatting / cleanup patchset Deepak R Varma
2020-03-18 4:26 ` [PATCH 1/2] staging: iio: adc: ad7192: Reformat lines crossing 80 columns Deepak R Varma
2020-03-18 6:00 ` Greg KH
2020-03-18 15:12 ` DEEPAK VARMA
2020-03-18 15:18 ` Greg KH
2020-03-18 8:31 ` [Outreachy kernel] " Stefano Brivio
2020-03-18 16:06 ` DEEPAK VARMA
2020-03-18 16:22 ` Rohit Sarkar
2020-03-18 16:43 ` DEEPAK VARMA
2020-03-18 16:44 ` Lars-Peter Clausen
2020-03-18 17:31 ` DEEPAK VARMA [this message]
2020-03-19 7:04 ` Ardelean, Alexandru
2020-03-18 4:28 ` [PATCH 2/2] staging: iio: adc: ad7280a: Add spaces around operators Deepak R Varma
2020-03-18 6:00 ` Greg KH
2020-03-18 15:09 ` DEEPAK VARMA
2020-03-18 15:12 ` Lars-Peter Clausen
2020-03-18 15:19 ` Greg KH
2020-03-18 16:23 ` DEEPAK VARMA
2020-03-18 16:27 ` Greg KH
2020-03-18 16:28 ` [Outreachy kernel] " Julia Lawall
2020-03-18 17:00 ` DEEPAK VARMA
2020-03-19 7:00 ` Ardelean, Alexandru
2020-03-19 7:03 ` Julia Lawall
2020-03-19 7:07 ` Ardelean, Alexandru
2020-03-19 16:16 ` DEEPAK VARMA
2020-03-20 7:13 ` Ardelean, Alexandru
2020-03-21 10:25 ` DEEPAK VARMA
2020-03-22 9:06 ` Ardelean, Alexandru
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=20200318173102.GA23740@deeUbuntu \
--to=mh12gx2825@gmail.com \
--cc=Michael.Hennerich@analog.com \
--cc=daniel.baluta@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=jic23@kernel.org \
--cc=kieran.bingham@ideasonboard.com \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=outreachy-kernel@googlegroups.com \
--cc=pmeerw@pmeerw.net \
--cc=rohitsarkar5398@gmail.com \
--cc=sbrivio@redhat.com \
/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: link
Be 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.