From: Jonathan Cameron <jic23@kernel.org>
To: Melissa Wen <melissa.srw@gmail.com>
Cc: Lars-Peter Clausen <lars@metafoo.de>,
Michael Hennerich <Michael.Hennerich@analog.com>,
Stefan Popa <stefan.popa@analog.com>,
Hartmut Knaack <knaack.h@gmx.de>,
Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-iio@vger.kernel.org, devel@driverdev.osuosl.org,
linux-kernel@vger.kernel.org, kernel-usp@googlegroups.com
Subject: Re: [PATCH] staging: iio: frequency: ad9834: Remove unnecessary parentheses
Date: Sun, 7 Apr 2019 11:43:05 +0100 [thread overview]
Message-ID: <20190407114305.324a794e@archlinux> (raw)
In-Reply-To: <20190402201854.du6x75rkcm2ijmsc@smtp.gmail.com>
On Tue, 2 Apr 2019 17:18:54 -0300
Melissa Wen <melissa.srw@gmail.com> wrote:
> Remove unneeded parentheses around the arguments of ||. This reduces
> clutter and code behave in the same way. Change suggested by
> checkpatch.pl.
>
> CHECK: Unnecessary parentheses around 'st->devid == ID_AD9833'
> CHECK: Unnecessary parentheses around 'st->devid == ID_AD9837'
>
> Signed-off-by: Melissa Wen <melissa.srw@gmail.com>
This isn't one I feel strongly about, but it'll get rid of the warning
so is useful in the sense of cleaning up what we have to look at there!
Applied to the togreg branch of iio.git and pushed out as testing for
the autobuilders to play with it.
Thanks,
Jonathan
> ---
> drivers/staging/iio/frequency/ad9834.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/iio/frequency/ad9834.c b/drivers/staging/iio/frequency/ad9834.c
> index 0b0287503fb4..9cc6e751b479 100644
> --- a/drivers/staging/iio/frequency/ad9834.c
> +++ b/drivers/staging/iio/frequency/ad9834.c
> @@ -286,7 +286,7 @@ ssize_t ad9834_show_out0_wavetype_available(struct device *dev,
> struct ad9834_state *st = iio_priv(indio_dev);
> char *str;
>
> - if ((st->devid == ID_AD9833) || (st->devid == ID_AD9837))
> + if (st->devid == ID_AD9833 || st->devid == ID_AD9837)
> str = "sine triangle square";
> else if (st->control & AD9834_OPBITEN)
> str = "sine";
prev parent reply other threads:[~2019-04-07 10:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-02 20:18 [PATCH] staging: iio: frequency: ad9834: Remove unnecessary parentheses Melissa Wen
2019-04-07 10:43 ` 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=20190407114305.324a794e@archlinux \
--to=jic23@kernel.org \
--cc=Michael.Hennerich@analog.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--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=melissa.srw@gmail.com \
--cc=pmeerw@pmeerw.net \
--cc=stefan.popa@analog.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).