From: Jonathan Cameron <jic23@kernel.org>
To: Mark Stenglein <mark@stengle.in>, lars@metafoo.de
Cc: gregkh@linuxfoundation.org, linux-iio@vger.kernel.org,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: iio: accel: remove unneeded braces around single statements
Date: Sat, 25 Mar 2017 17:02:56 +0000 [thread overview]
Message-ID: <7be79d2b-fd27-e495-aa8f-710dfb5019f7@kernel.org> (raw)
In-Reply-To: <20170323061812.7316-1-mark@stengle.in>
On 23/03/17 06:18, Mark Stenglein wrote:
> Fixes three checkpatch warnings due to braces used when single
> statements are sufficient.
>
> Signed-off-by: Mark Stenglein <mark@stengle.in>
Applied to the togreg branch of iio.git - initially pushed
out as testing for the autobuilders to play with it.
Thanks,
Jonathan
> ---
> drivers/staging/iio/accel/adis16209.c | 3 +--
> drivers/staging/iio/accel/adis16240.c | 6 ++----
> 2 files changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/staging/iio/accel/adis16209.c b/drivers/staging/iio/accel/adis16209.c
> index 52fa2e0511be..8485c024e3f5 100644
> --- a/drivers/staging/iio/accel/adis16209.c
> +++ b/drivers/staging/iio/accel/adis16209.c
> @@ -255,9 +255,8 @@ static int adis16209_read_raw(struct iio_dev *indio_dev,
> }
> addr = adis16209_addresses[chan->scan_index][0];
> ret = adis_read_reg_16(st, addr, &val16);
> - if (ret) {
> + if (ret)
> return ret;
> - }
> val16 &= (1 << bits) - 1;
> val16 = (s16)(val16 << (16 - bits)) >> (16 - bits);
> *val = val16;
> diff --git a/drivers/staging/iio/accel/adis16240.c b/drivers/staging/iio/accel/adis16240.c
> index 6e3c95c9c3f6..109cd94b5ac3 100644
> --- a/drivers/staging/iio/accel/adis16240.c
> +++ b/drivers/staging/iio/accel/adis16240.c
> @@ -290,9 +290,8 @@ static int adis16240_read_raw(struct iio_dev *indio_dev,
> bits = 10;
> addr = adis16240_addresses[chan->scan_index][0];
> ret = adis_read_reg_16(st, addr, &val16);
> - if (ret) {
> + if (ret)
> return ret;
> - }
> val16 &= (1 << bits) - 1;
> val16 = (s16)(val16 << (16 - bits)) >> (16 - bits);
> *val = val16;
> @@ -301,9 +300,8 @@ static int adis16240_read_raw(struct iio_dev *indio_dev,
> bits = 10;
> addr = adis16240_addresses[chan->scan_index][1];
> ret = adis_read_reg_16(st, addr, &val16);
> - if (ret) {
> + if (ret)
> return ret;
> - }
> val16 &= (1 << bits) - 1;
> val16 = (s16)(val16 << (16 - bits)) >> (16 - bits);
> *val = val16;
>
prev parent reply other threads:[~2017-03-25 17:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-23 6:18 [PATCH] staging: iio: accel: remove unneeded braces around single statements Mark Stenglein
2017-03-25 17:02 ` 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=7be79d2b-fd27-e495-aa8f-710dfb5019f7@kernel.org \
--to=jic23@kernel.org \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark@stengle.in \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.