Linux IIO development
 help / color / mirror / Atom feed
From: Slawomir Stepien <sst@poczta.fm>
To: Lars-Peter Clausen <lars@metafoo.de>
Cc: linux-iio@vger.kernel.org, Michael.Hennerich@analog.com,
	jic23@kernel.org, knaack.h@gmx.de, pmeerw@pmeerw.net,
	gregkh@linuxfoundation.org, devel@driverdev.osuosl.org
Subject: Re: [PATCH 1/2] staging: iio: cdc: ad7150: use pointer to shorten the line length
Date: Thu, 4 Oct 2018 19:04:30 +0200	[thread overview]
Message-ID: <20181004170430.GG24866@x220.localdomain> (raw)
In-Reply-To: <4549c428-bf12-8e5b-0556-f953b22da89c@metafoo.de>

On paź 04, 2018 17:21, Lars-Peter Clausen wrote:
> On 10/01/2018 09:33 PM, Slawomir Stepien wrote:
> >  drivers/staging/iio/cdc/ad7150.c | 5 +++--
> >  1 file changed, 3 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/staging/iio/cdc/ad7150.c b/drivers/staging/iio/cdc/ad7150.c
> > index d16084d7068c..5b5b766a0405 100644
> > --- a/drivers/staging/iio/cdc/ad7150.c
> > +++ b/drivers/staging/iio/cdc/ad7150.c
> > @@ -102,18 +102,19 @@ static int ad7150_read_raw(struct iio_dev *indio_dev,
> >  {
> >  	int ret;
> >  	struct ad7150_chip_info *chip = iio_priv(indio_dev);
> > +	const int *channel = &chan->channel;
> 
> Instead of taking a pointer, just take the value of the channel index and
> use that. The generated code should be very similar but its a bit nicer to read.

OK. I've been thinking about that for a moment, but in the end decided to go
with the pointer. I don't mind the value. I'll prepare v2. Thank you.

-- 
Slawomir Stepien

  reply	other threads:[~2018-10-04 17:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-01 19:32 [PATCH 0/2] Fix style problems in ad7150 driver Slawomir Stepien
2018-10-01 19:33 ` [PATCH 1/2] staging: iio: cdc: ad7150: use pointer to shorten the line length Slawomir Stepien
2018-10-04 15:21   ` Lars-Peter Clausen
2018-10-04 17:04     ` Slawomir Stepien [this message]
2018-10-01 19:33 ` [PATCH 2/2] staging: iio: cdc: ad7150: fix misaligned lines Slawomir Stepien

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=20181004170430.GG24866@x220.localdomain \
    --to=sst@poczta.fm \
    --cc=Michael.Hennerich@analog.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=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: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox