From: Jonathan Cameron <jic23@kernel.org>
To: Lars-Peter Clausen <lars@metafoo.de>
Cc: linux-iio@vger.kernel.org
Subject: Re: [PATCH 3/4] iio: Don't compare boolean values to true/false
Date: Fri, 19 Oct 2012 16:27:46 +0100 [thread overview]
Message-ID: <50817172.9060006@kernel.org> (raw)
In-Reply-To: <1350571399-17723-3-git-send-email-lars@metafoo.de>
On 10/18/2012 03:43 PM, Lars-Peter Clausen wrote:
> Fixes the following warnings from coccicheck:
> drivers/iio/inkern.c:81:6-14: WARNING: Comparison to bool
> drivers/iio/dac/ad5686.c:191:5-11: WARNING: Comparison to bool
>
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Another 'exciting patch'. I guess it fills the time whilst on a train
under the sea though... hohum. Land soon and back to mindless websurfing...
> ---
> drivers/iio/dac/ad5686.c | 2 +-
> drivers/iio/inkern.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/iio/dac/ad5686.c b/drivers/iio/dac/ad5686.c
> index 6948d75..bc92ff9 100644
> --- a/drivers/iio/dac/ad5686.c
> +++ b/drivers/iio/dac/ad5686.c
> @@ -188,7 +188,7 @@ static ssize_t ad5686_write_dac_powerdown(struct iio_dev *indio_dev,
> if (ret)
> return ret;
>
> - if (readin == true)
> + if (readin)
> st->pwr_down_mask |= (0x3 << (chan->channel * 2));
> else
> st->pwr_down_mask &= ~(0x3 << (chan->channel * 2));
> diff --git a/drivers/iio/inkern.c b/drivers/iio/inkern.c
> index f2b78d4..5230a33 100644
> --- a/drivers/iio/inkern.c
> +++ b/drivers/iio/inkern.c
> @@ -78,7 +78,7 @@ int iio_map_array_unregister(struct iio_dev *indio_dev,
> found_it = true;
> break;
> }
> - if (found_it == false) {
> + if (!found_it) {
> ret = -ENODEV;
> goto error_ret;
> }
>
next prev parent reply other threads:[~2012-10-19 17:42 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-18 14:43 [PATCH 1/4] staging:iio: Don't compare boolean values with true/false Lars-Peter Clausen
2012-10-18 14:43 ` [PATCH 2/4] staging:iio:lpc32xx_adc: Use resource_size instead of opencoding it Lars-Peter Clausen
2012-10-18 16:16 ` Roland Stigge
2012-10-19 15:26 ` Jonathan Cameron
2012-10-18 14:43 ` [PATCH 3/4] iio: Don't compare boolean values to true/false Lars-Peter Clausen
2012-10-19 15:27 ` Jonathan Cameron [this message]
2012-10-18 14:43 ` [PATCH 4/4] iio: at91_adc: Use devm_kcalloc to allocate arrays Lars-Peter Clausen
2012-10-19 8:54 ` Maxime Ripard
2012-10-19 15:32 ` Jonathan Cameron
2012-10-19 15:24 ` [PATCH 1/4] staging:iio: Don't compare boolean values with true/false Jonathan Cameron
2012-10-19 17:55 ` Lars-Peter Clausen
2012-10-19 17:59 ` 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=50817172.9060006@kernel.org \
--to=jic23@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
/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).