From: Jonathan Cameron <jic23@jic23.retrosnub.co.uk>
To: Anderson Reis <andersonreisrosa@gmail.com>
Cc: knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net,
matt.ranostay@konsulko.com, linux-iio@vger.kernel.org,
linux-kernel@vger.kernel.org, kernel-usp@googlegroups.com,
Anderson Reis <anderson.reis.rosa@usp.com>,
Lucas Oshiro <lucasseikioshiro@gmail.com>
Subject: Re: [PATCH v2 3/4] iio:potentiostat:lmp91000: invert if statement
Date: Sat, 9 Mar 2019 18:48:09 +0000 [thread overview]
Message-ID: <20190309184809.3bbe694a@archlinux> (raw)
In-Reply-To: <20190309184615.54feca1d@archlinux>
On Sat, 9 Mar 2019 18:46:15 +0000
Jonathan Cameron <jic23@kernel.org> wrote:
> On Fri, 8 Mar 2019 16:46:54 -0300
> Anderson Reis <andersonreisrosa@gmail.com> wrote:
>
> > Invert if statement arms in line 214, in order to make the code cleaner,
> > solve these checkpatch.pl CHECKs:
> >
> > - lmp9100.c:214: CHECK: braces {} should be used on all arms of this statement
> > - lmp9100.c:216: CHECK: Unbalanced braces around else statement
> >
> > Signed-off-by: Lucas Oshiro <lucasseikioshiro@gmail.com>
> > Signed-off-by: Anderson Reis <andersonreisrosa@gmail.com>
> Applied.
>
> Thanks,
>
> Jonathan
>
> > ---
> > drivers/iio/potentiostat/lmp91000.c | 5 ++---
> > 1 file changed, 2 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/iio/potentiostat/lmp91000.c b/drivers/iio/potentiostat/lmp91000.c
> > index c45cfb632649..1de17924e154 100644
> > --- a/drivers/iio/potentiostat/lmp91000.c
> > +++ b/drivers/iio/potentiostat/lmp91000.c
> > @@ -211,12 +211,11 @@ static int lmp91000_read_config(struct lmp91000_data *data)
> >
> > ret = of_property_read_u32(np, "ti,tia-gain-ohm", &val);
> > if (ret) {
> > - if (of_property_read_bool(np, "ti,external-tia-resistor"))
> > - val = 0;
> > - else {
> > + if (!of_property_read_bool(np, "ti,external-tia-resistor"))
Spoke too soon. You didn't build test this. Missing {
Fixed up.
Jonathan
> > dev_err(dev, "no ti,tia-gain-ohm defined");
> > return ret;
> > }
> > + val = 0;
> > }
> >
> > ret = -EINVAL;
>
next prev parent reply other threads:[~2019-03-16 16:14 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-08 19:46 [PATCH v2 0/4] iio:potentiostat:lmp91000: Adjust codestyle, and minor cleanup changes Anderson Reis
2019-03-08 19:46 ` [PATCH v2 1/4] iio:potentiostat:lmp91000: remove unnecessary parentheses Anderson Reis
2019-03-08 21:04 ` Tomasz Duszynski
[not found] ` <CAJut9009qPt50o4CDNpkZ=NQVetivYHJMi2pY_DrDUk=WN=XMw@mail.gmail.com>
2019-03-09 18:44 ` Jonathan Cameron
2019-03-08 19:46 ` [PATCH v2 2/4] iio:potentiostat:lmp91000: reduce line width and remove blank line Anderson Reis
2019-03-09 18:45 ` Jonathan Cameron
2019-03-08 19:46 ` [PATCH v2 3/4] iio:potentiostat:lmp91000: invert if statement Anderson Reis
2019-03-09 18:46 ` Jonathan Cameron
2019-03-09 18:48 ` Jonathan Cameron [this message]
2019-03-08 19:46 ` [PATCH v2 4/4] iio:potentiostat:lmp91000: change dev_err message Anderson Reis
2019-03-09 18:49 ` 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=20190309184809.3bbe694a@archlinux \
--to=jic23@jic23.retrosnub.co.uk \
--cc=anderson.reis.rosa@usp.com \
--cc=andersonreisrosa@gmail.com \
--cc=kernel-usp@googlegroups.com \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lucasseikioshiro@gmail.com \
--cc=matt.ranostay@konsulko.com \
--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