From: Jonathan Cameron <jic23@kernel.org>
To: Matt Ranostay <matt.ranostay@konsulko.com>
Cc: Andy Shevchenko <andy.shevchenko@gmail.com>,
linux-iio <linux-iio@vger.kernel.org>
Subject: Re: [PATCH v2 3/3] iio: chemical: atlas-ezo-sensor: add support for O2 sensor
Date: Wed, 22 Jul 2020 14:39:02 +0100 [thread overview]
Message-ID: <20200722143902.3d00f01b@archlinux> (raw)
In-Reply-To: <CAJCx=g=+zunxptnoLva7VGXqkU0Kwn9xxkTjKeO0F1VeXwSTTw@mail.gmail.com>
On Tue, 21 Jul 2020 21:38:11 -0700
Matt Ranostay <matt.ranostay@konsulko.com> wrote:
> On Tue, Jul 21, 2020 at 11:46 AM Andy Shevchenko
> <andy.shevchenko@gmail.com> wrote:
> >
> > On Mon, Jul 20, 2020 at 10:05 AM Matt Ranostay
> > <matt.ranostay@konsulko.com> wrote:
> > >
> > > Add support for the Atlas EZO O2 chemical sensor which required
> > > some refactoring of the driver and parsing of i2c transfer.
> > >
> > > Sensor data is converted by the scaling value from percent to
> > > IIO_CONCENTRATION.
> >
> > ...
> >
> > > +static void atlas_ezo_sanitize(char *buf)
> > > +{
> > > + char *ptr = strchr(buf, '.');
> > > +
> > > + if (!ptr)
> > > + return;
> > > +
> > > + for (; *ptr; ptr++)
> > > + *ptr = *(ptr + 1);
> > > +}
> >
> > NIH of memmove()? Why?
>
> Mainly since I forgot that POSIX function. I'll fix it up when possible
>
> - Matt
I've dropped the series for now. Lets just have a v3 with these
bits tidied up. It will have to wait for the next cycle however as I'll
be doing what is probably the last pull for this cycle in a few minutes.
Thanks,
Jonathan
>
> >
> > And actually to avoid strlen() you may do it other way around, i.e
> > shift integer part one character right and return new buffer pointer.
> >
> >
> > if (!ptr)
> > return buf;
> >
> > memmove(buf + 1, buf, ptr - buf);
> > return buf + 1;
> >
> > --
> > With Best Regards,
> > Andy Shevchenko
next prev parent reply other threads:[~2020-07-22 13:39 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-20 7:03 [PATCH v2 0/3] iio: chemical: atlas-ezo-sensor: add support for O2 sensor Matt Ranostay
2020-07-20 7:03 ` [PATCH v2 1/3] iio: add IIO_MOD_O2 modifier Matt Ranostay
2020-07-20 7:03 ` [PATCH v2 2/3] dt-bindings: iio: chemical: add O2 EZO module documentation Matt Ranostay
2020-07-23 17:47 ` Rob Herring
2020-07-26 12:34 ` Jonathan Cameron
2020-07-20 7:03 ` [PATCH v2 3/3] iio: chemical: atlas-ezo-sensor: add support for O2 sensor Matt Ranostay
2020-07-21 18:46 ` Andy Shevchenko
2020-07-21 18:47 ` Andy Shevchenko
2020-07-22 4:38 ` Matt Ranostay
2020-07-22 13:39 ` Jonathan Cameron [this message]
2020-07-20 8:47 ` [PATCH v2 0/3] " Jonathan Cameron
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=20200722143902.3d00f01b@archlinux \
--to=jic23@kernel.org \
--cc=andy.shevchenko@gmail.com \
--cc=linux-iio@vger.kernel.org \
--cc=matt.ranostay@konsulko.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox