From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Jonathan Cameron <jic23@kernel.org>
Cc: Lars-Peter Clausen <lars@metafoo.de>,
Paul Cercueil <paul@crapouillou.net>,
linux-iio@vger.kernel.org
Subject: Re: [PATCH 8/9] iio:light:stk3310: Remove duplicated error reporting in .remove()
Date: Mon, 2 May 2022 09:37:55 +0200 [thread overview]
Message-ID: <20220502073755.rku3yv6il5efew2x@pengutronix.de> (raw)
In-Reply-To: <20220430081607.15078-9-u.kleine-koenig@pengutronix.de>
[-- Attachment #1: Type: text/plain, Size: 1838 bytes --]
Hello,
On Sat, Apr 30, 2022 at 10:16:06AM +0200, Uwe Kleine-König wrote:
> Returning an error value in an i2c remove callback results in an error
> message being emitted by the i2c core, but otherwise it doesn't make a
> difference. The device goes away anyhow and the devm cleanups are
> called.
>
> As stk3310_set_state() already emits an error message on failure and the
> additional error message by the i2c core doesn't add any useful
> information, change the return value to zero to suppress this message.
>
> This patch is a preparation for making i2c remove callbacks return void.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
> drivers/iio/light/stk3310.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/iio/light/stk3310.c b/drivers/iio/light/stk3310.c
> index 1d02dfbc29d1..95a98af08b8a 100644
> --- a/drivers/iio/light/stk3310.c
> +++ b/drivers/iio/light/stk3310.c
> @@ -627,9 +627,12 @@ static int stk3310_probe(struct i2c_client *client,
> static int stk3310_remove(struct i2c_client *client)
> {
> struct iio_dev *indio_dev = i2c_get_clientdata(client);
> + int ret;
>
> iio_device_unregister(indio_dev);
> - return stk3310_set_state(iio_priv(indio_dev), STK3310_STATE_STANDBY);
> + stk3310_set_state(iio_priv(indio_dev), STK3310_STATE_STANDBY);
> +
> + return 0;
> }
I just found a fixup in my tree that drops the
+ int ret;
that I failed to squash in before sending.
Jonathan: Tell me if you want to fixup yourself when you apply, or if
you prefer a v2. If the latter, only for this patch or the whole series?
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2022-05-02 7:38 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-30 8:15 [PATCH 0/9] iio: Remove duplicated error reporting in .remove() Uwe Kleine-König
2022-04-30 8:15 ` [PATCH 1/9] iio:accel:mc3230: " Uwe Kleine-König
2022-04-30 8:16 ` [PATCH 2/9] iio:accel:stk8312: " Uwe Kleine-König
2022-04-30 8:16 ` [PATCH 3/9] iio:accel:stk8ba50: " Uwe Kleine-König
2022-04-30 8:16 ` [PATCH 4/9] iio:light:bh1780: " Uwe Kleine-König
2022-05-01 20:59 ` Linus Walleij
2022-04-30 8:16 ` [PATCH 5/9] iio:light:isl29028: " Uwe Kleine-König
2022-04-30 8:16 ` [PATCH 6/9] iio:light:jsa1212: " Uwe Kleine-König
2022-04-30 8:16 ` [PATCH 7/9] iio:light:opt3001: " Uwe Kleine-König
2022-04-30 8:16 ` [PATCH 8/9] iio:light:stk3310: " Uwe Kleine-König
2022-05-02 7:37 ` Uwe Kleine-König [this message]
2022-05-04 20:58 ` Jonathan Cameron
2022-04-30 8:16 ` [PATCH 9/9] iio:light:tsl2583: " Uwe Kleine-König
2022-05-01 17:41 ` [PATCH 0/9] iio: " Jonathan Cameron
2022-05-01 17:51 ` Jonathan Cameron
2022-05-07 14:38 ` Jonathan Cameron
2022-05-13 7:24 ` Uwe Kleine-König
2022-05-14 13:31 ` Jonathan Cameron
2022-05-14 13:41 ` Uwe Kleine-König
2022-05-14 16:30 ` Jonathan Cameron
2022-05-02 6:31 ` Uwe Kleine-König
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=20220502073755.rku3yv6il5efew2x@pengutronix.de \
--to=u.kleine-koenig@pengutronix.de \
--cc=jic23@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=paul@crapouillou.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).