From: Jonathan Cameron <jic23@kernel.org>
To: Bo Yu <tsu.yubo@gmail.com>, Clausen <lars@metafoo.de>,
Kroah-Hartman <gregkh@linuxfoundation.org>,
Hennerich <Michael.Hennerich@analog.com>,
Knaack <knaack.h@gmx.de>, Meerwald-Stadler <pmeerw@pmeerw.net>
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
linux-iio@vger.kernel.org
Subject: Re: [PATCH] Staging: iio: return expression instead of return ret
Date: Sat, 11 Mar 2017 18:25:24 +0000 [thread overview]
Message-ID: <0634a5c4-44e3-bf39-22b8-9e028c5412a8@kernel.org> (raw)
In-Reply-To: <20170310035738.GA1143@yubo-2>
On 10/03/17 03:57, Bo Yu wrote:
> The following Coccinelle script was used to detect this:
>
> @@
> local idexpression ret;
> expression e;
> @@
>
> -ret =
> +return
> e;
> -return ret;
A bit of fuzz on this one. Presumably things moving around in other recent
changes.
Anyhow, applied to the togreg branch of iio.git. Will push out as testing
shortly for the autobuilders to play with it.
Thanks,
Jonathan
>
> Signed-off-by: Bo YU <tsu.yubo@gmail.com>
> ---
> drivers/staging/iio/meter/ade7754.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/staging/iio/meter/ade7754.c b/drivers/staging/iio/meter/ade7754.c
> index 024463a11c47..19f8cb144768 100644
> --- a/drivers/staging/iio/meter/ade7754.c
> +++ b/drivers/staging/iio/meter/ade7754.c
> @@ -349,9 +349,8 @@ static int ade7754_set_irq(struct device *dev, bool enable)
> else
> irqen &= ~BIT(14);
>
> - ret = ade7754_spi_write_reg_16(dev, ADE7754_IRQEN, irqen);
> + return ade7754_spi_write_reg_16(dev, ADE7754_IRQEN, irqen);
>
> - return ret;
> }
>
> /* Power down the device */
> --
> 1.7.10.4
>
prev parent reply other threads:[~2017-03-11 18:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-10 3:57 [PATCH] Staging: iio: return expression instead of return ret Bo Yu
2017-03-11 18:25 ` 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=0634a5c4-44e3-bf39-22b8-9e028c5412a8@kernel.org \
--to=jic23@kernel.org \
--cc=Michael.Hennerich@analog.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--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=tsu.yubo@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