From: Jonathan Cameron <jic23@kernel.org>
To: "Andrew F. Davis" <afd@ti.com>
Cc: Hartmut Knaack <knaack.h@gmx.de>,
Lars-Peter Clausen <lars@metafoo.de>,
Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
<linux-iio@vger.kernel.org>
Subject: Re: [PATCH] iio: dac: mcp4725: Remove unneeded conversions to bool
Date: Sun, 10 Dec 2017 18:32:27 +0000 [thread overview]
Message-ID: <20171210183227.0ea17cef@archlinux> (raw)
In-Reply-To: <20171205191201.21572-1-afd@ti.com>
On Tue, 5 Dec 2017 13:12:01 -0600
"Andrew F. Davis" <afd@ti.com> wrote:
> Found with scripts/coccinelle/misc/boolconv.cocci.
>
> Signed-off-by: Andrew F. Davis <afd@ti.com>
Applied to the togreg branch of iio.git and pushed out as testing
for the autobuilders to play with it.
Thanks,
Jonathan
> ---
> drivers/iio/dac/mcp4725.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iio/dac/mcp4725.c b/drivers/iio/dac/mcp4725.c
> index afa856d10c26..8b5aad4c32d9 100644
> --- a/drivers/iio/dac/mcp4725.c
> +++ b/drivers/iio/dac/mcp4725.c
> @@ -476,7 +476,7 @@ static int mcp4725_probe(struct i2c_client *client,
> goto err_disable_vref_reg;
> }
> pd = (inbuf[0] >> 1) & 0x3;
> - data->powerdown = pd > 0 ? true : false;
> + data->powerdown = pd > 0;
> data->powerdown_mode = pd ? pd - 1 : 2; /* largest resistor to gnd */
> data->dac_value = (inbuf[1] << 4) | (inbuf[2] >> 4);
> if (data->id == MCP4726)
next prev parent reply other threads:[~2017-12-10 18:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-05 19:12 [PATCH] iio: dac: mcp4725: Remove unneeded conversions to bool Andrew F. Davis
2017-12-10 18:32 ` Jonathan Cameron [this message]
-- strict thread matches above, loose matches on Subject: below --
2016-07-01 14:33 Andrew F. Davis
2016-07-01 15:03 ` Peter Meerwald-Stadler
2016-07-01 15:18 ` Andrew F. Davis
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=20171210183227.0ea17cef@archlinux \
--to=jic23@kernel.org \
--cc=afd@ti.com \
--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;
as well as URLs for NNTP newsgroup(s).