From: Jonathan Cameron <jic23@kernel.org>
To: "Sa, Nuno" <Nuno.Sa@analog.com>
Cc: Rohit Sarkar <rohitsarkar5398@gmail.com>,
"linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>,
Hartmut Knaack <knaack.h@gmx.de>,
Lars-Peter Clausen <lars@metafoo.de>,
Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Bogdan, Dragos" <Dragos.Bogdan@analog.com>
Subject: Re: [PATCH] iio: temperature: ltc2983: remove redundant comparison to bool
Date: Sat, 28 Mar 2020 17:54:21 +0000 [thread overview]
Message-ID: <20200328175421.605c7eae@archlinux> (raw)
In-Reply-To: <BN6PR03MB3347A202426BE1F409B3A68599CD0@BN6PR03MB3347.namprd03.prod.outlook.com>
On Sat, 28 Mar 2020 09:43:58 +0000
"Sa, Nuno" <Nuno.Sa@analog.com> wrote:
> > -----Original Message-----
> > From: Rohit Sarkar <rohitsarkar5398@gmail.com>
> > Sent: Samstag, 28. März 2020 07:53
> > To: linux-iio@vger.kernel.org
> > Cc: Sa, Nuno <Nuno.Sa@analog.com>; rohitsarkar5398@gmail.com;
> > jic23@kernel.org; Hartmut Knaack <knaack.h@gmx.de>; Lars-Peter Clausen
> > <lars@metafoo.de>; Peter Meerwald-Stadler <pmeerw@pmeerw.net>; linux-
> > iio@vger.kernel.org; linux-kernel@vger.kernel.org; Bogdan, Dragos
> > <Dragos.Bogdan@analog.com>
> > Subject: [PATCH] iio: temperature: ltc2983: remove redundant comparison to
> > bool
> >
> >
> > Remove redundant comparison to a boolean variable.
> >
> > Fixes coccinelle warning:
> > drivers/iio/temperature//ltc2983.c:393:20-32: WARNING: Comparison to
> > bool
> > drivers/iio/temperature//ltc2983.c:394:20-32: WARNING: Comparison to
> > bool
> >
> > Signed-off-by: Rohit Sarkar <rohitsarkar5398@gmail.com>
> > ---
> > drivers/iio/temperature/ltc2983.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/iio/temperature/ltc2983.c
> > b/drivers/iio/temperature/ltc2983.c
> > index d39c0d6b77f1..8976e8d59826 100644
> > --- a/drivers/iio/temperature/ltc2983.c
> > +++ b/drivers/iio/temperature/ltc2983.c
> > @@ -390,8 +390,8 @@ static struct ltc2983_custom_sensor
> > *__ltc2983_custom_sensor_new(
> > * For custom steinhart, the full u32 is taken. For all the others
> > * the MSB is discarded.
> > */
> > - const u8 n_size = (is_steinhart == true) ? 4 : 3;
> > - const u8 e_size = (is_steinhart == true) ? sizeof(u32) : sizeof(u64);
> > + const u8 n_size = is_steinhart ? 4 : 3;
> > + const u8 e_size = is_steinhart ? sizeof(u32) : sizeof(u64);
> >
> > n_entries = of_property_count_elems_of_size(np, propname, e_size);
> > /* n_entries must be an even number */
> > --
>
> Acked-by: Nuno Sá <nuno.sa@analog.com>
>
Applied to the togreg branch of iio.git and pushed out as testing for the
autobuilders to play with it.
Thanks,
Jonathan
> Thanks,
> Nuno Sá
>
prev parent reply other threads:[~2020-03-28 17:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-28 6:53 [PATCH] iio: temperature: ltc2983: remove redundant comparison to bool Rohit Sarkar
2020-03-28 9:43 ` Sa, Nuno
2020-03-28 17:54 ` Jonathan Cameron [this message]
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=20200328175421.605c7eae@archlinux \
--to=jic23@kernel.org \
--cc=Dragos.Bogdan@analog.com \
--cc=Nuno.Sa@analog.com \
--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 \
--cc=rohitsarkar5398@gmail.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;
as well as URLs for NNTP newsgroup(s).