* [PATCH 1/6] drm/i2c/sil164: Drop no-op remove function
[not found] <20220628140313.74984-1-u.kleine-koenig@pengutronix.de>
@ 2022-06-28 14:03 ` Uwe Kleine-König
2022-06-28 14:03 ` [PATCH 2/6] leds: lm3697: Remove duplicated error reporting in .remove() Uwe Kleine-König
` (5 subsequent siblings)
6 siblings, 0 replies; 25+ messages in thread
From: Uwe Kleine-König @ 2022-06-28 14:03 UTC (permalink / raw)
To: David Airlie, Daniel Vetter; +Cc: dri-devel, kernel, linux-i2c
A remove callback that just returns 0 is equivalent to no callback at all
as can be seen in i2c_device_remove(). So simplify accordingly.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Forwarded: id:20220526202538.1723142-1-u.kleine-koenig@pengutronix.de
---
drivers/gpu/drm/i2c/sil164_drv.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/drivers/gpu/drm/i2c/sil164_drv.c b/drivers/gpu/drm/i2c/sil164_drv.c
index 741886b54419..1bc0b5de4499 100644
--- a/drivers/gpu/drm/i2c/sil164_drv.c
+++ b/drivers/gpu/drm/i2c/sil164_drv.c
@@ -370,12 +370,6 @@ sil164_probe(struct i2c_client *client, const struct i2c_device_id *id)
return 0;
}
-static int
-sil164_remove(struct i2c_client *client)
-{
- return 0;
-}
-
static struct i2c_client *
sil164_detect_slave(struct i2c_client *client)
{
@@ -427,7 +421,6 @@ MODULE_DEVICE_TABLE(i2c, sil164_ids);
static struct drm_i2c_encoder_driver sil164_driver = {
.i2c_driver = {
.probe = sil164_probe,
- .remove = sil164_remove,
.driver = {
.name = "sil164",
},
--
2.36.1
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH 2/6] leds: lm3697: Remove duplicated error reporting in .remove()
[not found] <20220628140313.74984-1-u.kleine-koenig@pengutronix.de>
2022-06-28 14:03 ` [PATCH 1/6] drm/i2c/sil164: Drop no-op remove function Uwe Kleine-König
@ 2022-06-28 14:03 ` Uwe Kleine-König
2022-06-28 14:03 ` [PATCH 3/6] leds: lm3601x: Don't use mutex after it was destroyed Uwe Kleine-König
` (4 subsequent siblings)
6 siblings, 0 replies; 25+ messages in thread
From: Uwe Kleine-König @ 2022-06-28 14:03 UTC (permalink / raw)
To: Pavel Machek; +Cc: linux-leds, kernel, linux-i2c
Returning an error value from 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 lm3697_remove() already emits an error message on failure and the
additional error message by the i2c core doesn't add any useful
information, don't pass the error value up the stack. Instead continue
to clean up and return 0.
This patch is a preparation for making i2c remove callbacks return void.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Forwarded: id:20220515161227.339514-2-u.kleine-koenig@pengutronix.de
---
drivers/leds/leds-lm3697.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/leds/leds-lm3697.c b/drivers/leds/leds-lm3697.c
index a8c9322558cc..3ecf90fbc06c 100644
--- a/drivers/leds/leds-lm3697.c
+++ b/drivers/leds/leds-lm3697.c
@@ -345,10 +345,8 @@ static int lm3697_remove(struct i2c_client *client)
ret = regmap_update_bits(led->regmap, LM3697_CTRL_ENABLE,
LM3697_CTRL_A_B_EN, 0);
- if (ret) {
+ if (ret)
dev_err(dev, "Failed to disable the device\n");
- return ret;
- }
if (led->enable_gpio)
gpiod_direction_output(led->enable_gpio, 0);
--
2.36.1
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH 3/6] leds: lm3601x: Don't use mutex after it was destroyed
[not found] <20220628140313.74984-1-u.kleine-koenig@pengutronix.de>
2022-06-28 14:03 ` [PATCH 1/6] drm/i2c/sil164: Drop no-op remove function Uwe Kleine-König
2022-06-28 14:03 ` [PATCH 2/6] leds: lm3697: Remove duplicated error reporting in .remove() Uwe Kleine-König
@ 2022-06-28 14:03 ` Uwe Kleine-König
2022-06-28 14:03 ` [PATCH 4/6] leds: lm3601x: Improve error reporting for problems during .remove() Uwe Kleine-König
` (3 subsequent siblings)
6 siblings, 0 replies; 25+ messages in thread
From: Uwe Kleine-König @ 2022-06-28 14:03 UTC (permalink / raw)
To: Pavel Machek, Linus Walleij, Dan Murphy; +Cc: linux-leds, kernel, linux-i2c
The mutex might still be in use until the devm cleanup callback
devm_led_classdev_flash_release() is called. This only happens some time
after lm3601x_remove() completed.
Fixes: e63a744871a3 ("leds: lm3601x: Convert class registration to device managed")
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Forwarded: id:20220513081832.263863-1-u.kleine-koenig@pengutronix.de
---
drivers/leds/flash/leds-lm3601x.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/leds/flash/leds-lm3601x.c b/drivers/leds/flash/leds-lm3601x.c
index d0e1d4814042..3d1272748201 100644
--- a/drivers/leds/flash/leds-lm3601x.c
+++ b/drivers/leds/flash/leds-lm3601x.c
@@ -444,8 +444,6 @@ static int lm3601x_remove(struct i2c_client *client)
{
struct lm3601x_led *led = i2c_get_clientdata(client);
- mutex_destroy(&led->lock);
-
return regmap_update_bits(led->regmap, LM3601X_ENABLE_REG,
LM3601X_ENABLE_MASK,
LM3601X_MODE_STANDBY);
--
2.36.1
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH 4/6] leds: lm3601x: Improve error reporting for problems during .remove()
[not found] <20220628140313.74984-1-u.kleine-koenig@pengutronix.de>
` (2 preceding siblings ...)
2022-06-28 14:03 ` [PATCH 3/6] leds: lm3601x: Don't use mutex after it was destroyed Uwe Kleine-König
@ 2022-06-28 14:03 ` Uwe Kleine-König
2022-06-28 14:03 ` [PATCH 5/6] gpio: pca953x: Make platform teardown callback return void Uwe Kleine-König
` (2 subsequent siblings)
6 siblings, 0 replies; 25+ messages in thread
From: Uwe Kleine-König @ 2022-06-28 14:03 UTC (permalink / raw)
To: Pavel Machek, Linus Walleij; +Cc: linux-leds, kernel, linux-i2c
Returning an error value in an i2c remove callback results in a generic
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.
So instead of triggering the generic i2c error message, emit a more
helpful message if a problem occurs and return 0 to suppress the generic
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>
Forwarded: id:20220513102516.271920-1-u.kleine-koenig@pengutronix.de
---
drivers/leds/flash/leds-lm3601x.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/drivers/leds/flash/leds-lm3601x.c b/drivers/leds/flash/leds-lm3601x.c
index 3d1272748201..37e1d6e68687 100644
--- a/drivers/leds/flash/leds-lm3601x.c
+++ b/drivers/leds/flash/leds-lm3601x.c
@@ -443,10 +443,15 @@ static int lm3601x_probe(struct i2c_client *client)
static int lm3601x_remove(struct i2c_client *client)
{
struct lm3601x_led *led = i2c_get_clientdata(client);
+ int ret;
- return regmap_update_bits(led->regmap, LM3601X_ENABLE_REG,
- LM3601X_ENABLE_MASK,
- LM3601X_MODE_STANDBY);
+ ret = regmap_update_bits(led->regmap, LM3601X_ENABLE_REG,
+ LM3601X_ENABLE_MASK, LM3601X_MODE_STANDBY);
+ if (ret)
+ dev_warn(&client->dev,
+ "Failed to put into standby (%pe)\n", ERR_PTR(ret));
+
+ return 0;
}
static const struct i2c_device_id lm3601x_id[] = {
--
2.36.1
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH 5/6] gpio: pca953x: Make platform teardown callback return void
[not found] <20220628140313.74984-1-u.kleine-koenig@pengutronix.de>
` (3 preceding siblings ...)
2022-06-28 14:03 ` [PATCH 4/6] leds: lm3601x: Improve error reporting for problems during .remove() Uwe Kleine-König
@ 2022-06-28 14:03 ` Uwe Kleine-König
2022-06-28 19:09 ` Andy Shevchenko
[not found] ` <20220628140313.74984-7-u.kleine-koenig@pengutronix.de>
2022-07-04 8:39 ` [PATCH 0/6] " Uwe Kleine-König
6 siblings, 1 reply; 25+ messages in thread
From: Uwe Kleine-König @ 2022-06-28 14:03 UTC (permalink / raw)
To: Sekhar Nori, Bartosz Golaszewski, Russell King, Linus Walleij
Cc: linux-arm-kernel, linux-gpio, kernel, linux-i2c
All platforms that provide a teardown callback return 0. New users are
supposed to not make use of platform support, so there is no
functionality lost.
This patch is a preparation for making i2c remove callbacks return void.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Forwarded: id:20220502170555.51183-1-u.kleine-koenig@pengutronix.de
---
arch/arm/mach-davinci/board-da850-evm.c | 12 ++++--------
drivers/gpio/gpio-pca953x.c | 11 +++--------
include/linux/platform_data/pca953x.h | 2 +-
3 files changed, 8 insertions(+), 17 deletions(-)
diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c
index efc26b472ef8..09253e70d0dc 100644
--- a/arch/arm/mach-davinci/board-da850-evm.c
+++ b/arch/arm/mach-davinci/board-da850-evm.c
@@ -518,8 +518,8 @@ static int da850_evm_ui_expander_setup(struct i2c_client *client, unsigned gpio,
return ret;
}
-static int da850_evm_ui_expander_teardown(struct i2c_client *client,
- unsigned gpio, unsigned ngpio, void *c)
+static void da850_evm_ui_expander_teardown(struct i2c_client *client,
+ unsigned gpio, unsigned ngpio, void *c)
{
platform_device_unregister(&da850_evm_ui_keys_device);
@@ -531,8 +531,6 @@ static int da850_evm_ui_expander_teardown(struct i2c_client *client,
gpio_free(gpio + DA850_EVM_UI_EXP_SEL_C);
gpio_free(gpio + DA850_EVM_UI_EXP_SEL_B);
gpio_free(gpio + DA850_EVM_UI_EXP_SEL_A);
-
- return 0;
}
/* assign the baseboard expander's GPIOs after the UI board's */
@@ -699,13 +697,11 @@ static int da850_evm_bb_expander_setup(struct i2c_client *client,
return ret;
}
-static int da850_evm_bb_expander_teardown(struct i2c_client *client,
- unsigned gpio, unsigned ngpio, void *c)
+static void da850_evm_bb_expander_teardown(struct i2c_client *client,
+ unsigned gpio, unsigned ngpio, void *c)
{
platform_device_unregister(&da850_evm_bb_leds_device);
platform_device_unregister(&da850_evm_bb_keys_device);
-
- return 0;
}
static struct pca953x_platform_data da850_evm_ui_expander_info = {
diff --git a/drivers/gpio/gpio-pca953x.c b/drivers/gpio/gpio-pca953x.c
index 08bc52c3cdcb..3eedeac9ec8d 100644
--- a/drivers/gpio/gpio-pca953x.c
+++ b/drivers/gpio/gpio-pca953x.c
@@ -1099,20 +1099,15 @@ static int pca953x_remove(struct i2c_client *client)
{
struct pca953x_platform_data *pdata = dev_get_platdata(&client->dev);
struct pca953x_chip *chip = i2c_get_clientdata(client);
- int ret;
if (pdata && pdata->teardown) {
- ret = pdata->teardown(client, chip->gpio_chip.base,
- chip->gpio_chip.ngpio, pdata->context);
- if (ret < 0)
- dev_err(&client->dev, "teardown failed, %d\n", ret);
- } else {
- ret = 0;
+ pdata->teardown(client, chip->gpio_chip.base,
+ chip->gpio_chip.ngpio, pdata->context);
}
regulator_disable(chip->regulator);
- return ret;
+ return 0;
}
#ifdef CONFIG_PM_SLEEP
diff --git a/include/linux/platform_data/pca953x.h b/include/linux/platform_data/pca953x.h
index 4eb53e023997..96c1a14ab365 100644
--- a/include/linux/platform_data/pca953x.h
+++ b/include/linux/platform_data/pca953x.h
@@ -22,7 +22,7 @@ struct pca953x_platform_data {
int (*setup)(struct i2c_client *client,
unsigned gpio, unsigned ngpio,
void *context);
- int (*teardown)(struct i2c_client *client,
+ void (*teardown)(struct i2c_client *client,
unsigned gpio, unsigned ngpio,
void *context);
const char *const *names;
--
2.36.1
^ permalink raw reply related [flat|nested] 25+ messages in thread
* Re: [PATCH 5/6] gpio: pca953x: Make platform teardown callback return void
2022-06-28 14:03 ` [PATCH 5/6] gpio: pca953x: Make platform teardown callback return void Uwe Kleine-König
@ 2022-06-28 19:09 ` Andy Shevchenko
2022-06-28 20:15 ` Uwe Kleine-König
0 siblings, 1 reply; 25+ messages in thread
From: Andy Shevchenko @ 2022-06-28 19:09 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: Sekhar Nori, Bartosz Golaszewski, Russell King, Linus Walleij,
linux-arm Mailing List, open list:GPIO SUBSYSTEM, Sascha Hauer,
linux-i2c
On Tue, Jun 28, 2022 at 4:04 PM Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> wrote:
>
> All platforms that provide a teardown callback return 0. New users are
> supposed to not make use of platform support, so there is no
> functionality lost.
>
> This patch is a preparation for making i2c remove callbacks return void.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> Forwarded: id:20220502170555.51183-1-u.kleine-koenig@pengutronix.de
What is this tag for? Has it been documented?
(Linus recently was ranting against homegrown custom (read:
non-documented) tags)
For now the code looks good,
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
However, I prefer to see dropping those callbacks altogether (find the
way how to use GPIO descriptors / GPIO table / etc instead of ugly
custom callbacks).
> ---
> arch/arm/mach-davinci/board-da850-evm.c | 12 ++++--------
> drivers/gpio/gpio-pca953x.c | 11 +++--------
> include/linux/platform_data/pca953x.h | 2 +-
> 3 files changed, 8 insertions(+), 17 deletions(-)
>
> diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c
> index efc26b472ef8..09253e70d0dc 100644
> --- a/arch/arm/mach-davinci/board-da850-evm.c
> +++ b/arch/arm/mach-davinci/board-da850-evm.c
> @@ -518,8 +518,8 @@ static int da850_evm_ui_expander_setup(struct i2c_client *client, unsigned gpio,
> return ret;
> }
>
> -static int da850_evm_ui_expander_teardown(struct i2c_client *client,
> - unsigned gpio, unsigned ngpio, void *c)
> +static void da850_evm_ui_expander_teardown(struct i2c_client *client,
> + unsigned gpio, unsigned ngpio, void *c)
> {
> platform_device_unregister(&da850_evm_ui_keys_device);
>
> @@ -531,8 +531,6 @@ static int da850_evm_ui_expander_teardown(struct i2c_client *client,
> gpio_free(gpio + DA850_EVM_UI_EXP_SEL_C);
> gpio_free(gpio + DA850_EVM_UI_EXP_SEL_B);
> gpio_free(gpio + DA850_EVM_UI_EXP_SEL_A);
> -
> - return 0;
> }
>
> /* assign the baseboard expander's GPIOs after the UI board's */
> @@ -699,13 +697,11 @@ static int da850_evm_bb_expander_setup(struct i2c_client *client,
> return ret;
> }
>
> -static int da850_evm_bb_expander_teardown(struct i2c_client *client,
> - unsigned gpio, unsigned ngpio, void *c)
> +static void da850_evm_bb_expander_teardown(struct i2c_client *client,
> + unsigned gpio, unsigned ngpio, void *c)
> {
> platform_device_unregister(&da850_evm_bb_leds_device);
> platform_device_unregister(&da850_evm_bb_keys_device);
> -
> - return 0;
> }
>
> static struct pca953x_platform_data da850_evm_ui_expander_info = {
> diff --git a/drivers/gpio/gpio-pca953x.c b/drivers/gpio/gpio-pca953x.c
> index 08bc52c3cdcb..3eedeac9ec8d 100644
> --- a/drivers/gpio/gpio-pca953x.c
> +++ b/drivers/gpio/gpio-pca953x.c
> @@ -1099,20 +1099,15 @@ static int pca953x_remove(struct i2c_client *client)
> {
> struct pca953x_platform_data *pdata = dev_get_platdata(&client->dev);
> struct pca953x_chip *chip = i2c_get_clientdata(client);
> - int ret;
>
> if (pdata && pdata->teardown) {
> - ret = pdata->teardown(client, chip->gpio_chip.base,
> - chip->gpio_chip.ngpio, pdata->context);
> - if (ret < 0)
> - dev_err(&client->dev, "teardown failed, %d\n", ret);
> - } else {
> - ret = 0;
> + pdata->teardown(client, chip->gpio_chip.base,
> + chip->gpio_chip.ngpio, pdata->context);
> }
>
> regulator_disable(chip->regulator);
>
> - return ret;
> + return 0;
> }
>
> #ifdef CONFIG_PM_SLEEP
> diff --git a/include/linux/platform_data/pca953x.h b/include/linux/platform_data/pca953x.h
> index 4eb53e023997..96c1a14ab365 100644
> --- a/include/linux/platform_data/pca953x.h
> +++ b/include/linux/platform_data/pca953x.h
> @@ -22,7 +22,7 @@ struct pca953x_platform_data {
> int (*setup)(struct i2c_client *client,
> unsigned gpio, unsigned ngpio,
> void *context);
> - int (*teardown)(struct i2c_client *client,
> + void (*teardown)(struct i2c_client *client,
> unsigned gpio, unsigned ngpio,
> void *context);
> const char *const *names;
> --
> 2.36.1
>
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 5/6] gpio: pca953x: Make platform teardown callback return void
2022-06-28 19:09 ` Andy Shevchenko
@ 2022-06-28 20:15 ` Uwe Kleine-König
0 siblings, 0 replies; 25+ messages in thread
From: Uwe Kleine-König @ 2022-06-28 20:15 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Bartosz Golaszewski, Sekhar Nori, Russell King,
open list:GPIO SUBSYSTEM, linux-i2c, Sascha Hauer, Linus Walleij,
linux-arm Mailing List
[-- Attachment #1: Type: text/plain, Size: 1189 bytes --]
On Tue, Jun 28, 2022 at 09:09:09PM +0200, Andy Shevchenko wrote:
> On Tue, Jun 28, 2022 at 4:04 PM Uwe Kleine-König
> <u.kleine-koenig@pengutronix.de> wrote:
> >
> > All platforms that provide a teardown callback return 0. New users are
> > supposed to not make use of platform support, so there is no
> > functionality lost.
> >
> > This patch is a preparation for making i2c remove callbacks return void.
> >
> > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > Forwarded: id:20220502170555.51183-1-u.kleine-koenig@pengutronix.de
>
> What is this tag for? Has it been documented?
No, this is a note to myself and wasn't intended to be sent out.
> However, I prefer to see dropping those callbacks altogether (find the
> way how to use GPIO descriptors / GPIO table / etc instead of ugly
> custom callbacks).
Agreed, but I didn't feel to sort out what happens there. Also I don't
have any of these platforms to test. So I chose the more conservative
approach.
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 --]
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 6/6] i2c: Make remove callback return void
[not found] ` <60cc6796236f23c028a9ae76dbe00d1917df82a5.camel@codeconstruct.com.au>
@ 2022-06-29 7:23 ` Uwe Kleine-König
2022-06-29 7:37 ` Javier Martinez Canillas
2022-06-29 7:55 ` Christophe Leroy
0 siblings, 2 replies; 25+ messages in thread
From: Uwe Kleine-König @ 2022-06-29 7:23 UTC (permalink / raw)
To: Jeremy Kerr
Cc: Wolfram Sang, dri-devel, linux-serial, linux-pm, linux-mtd,
linux-stm32, linux-crypto, Pengutronix Kernel Team, linux-i2c,
linux-watchdog, acpi4asus-user, linux-rpi-kernel,
linux-arm-kernel, linux-gpio, platform-driver-x86,
linux-integrity, linux-iio, linux-rtc, netdev,
Broadcom internal kernel review list, chrome-platform,
linux-input, linuxppc-dev, linux-media, openipmi-developer,
linux-hwmon, Support Opensource, linux-fbdev, patches,
Greg Kroah-Hartman, linux-pwm, linux-mediatek, kasan-dev,
linux-staging
[-- Attachment #1: Type: text/plain, Size: 1381 bytes --]
Hello,
[I dropped nearly all individuals from the Cc: list because various
bounces reported to be unhappy about the long (logical) line.]
On Wed, Jun 29, 2022 at 03:03:54PM +0800, Jeremy Kerr wrote:
> Looks good - just one minor change for the mctp-i2c driver, but only
> worthwhile if you end up re-rolling this series for other reasons:
>
> > -static int mctp_i2c_remove(struct i2c_client *client)
> > +static void mctp_i2c_remove(struct i2c_client *client)
> > {
> > struct mctp_i2c_client *mcli = i2c_get_clientdata(client);
> > struct mctp_i2c_dev *midev = NULL, *tmp = NULL;
> > @@ -1000,7 +1000,6 @@ static int mctp_i2c_remove(struct i2c_client *client)
> > mctp_i2c_free_client(mcli);
> > mutex_unlock(&driver_clients_lock);
> > /* Callers ignore return code */
> > - return 0;
> > }
>
> The comment there no longer makes much sense, I'd suggest removing that
> too.
Yeah, that was already pointed out to me in a private reply. It's
already fixed in
https://git.pengutronix.de/cgit/ukl/linux/log/?h=i2c-remove-void
> Either way:
>
> Reviewed-by: Jeremy Kerr <jk@codeconstruct.com.au>
Added to my tree, too.
Thanks
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 --]
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 6/6] i2c: Make remove callback return void
2022-06-29 7:23 ` [PATCH 6/6] i2c: Make remove " Uwe Kleine-König
@ 2022-06-29 7:37 ` Javier Martinez Canillas
2022-06-29 7:55 ` Christophe Leroy
1 sibling, 0 replies; 25+ messages in thread
From: Javier Martinez Canillas @ 2022-06-29 7:37 UTC (permalink / raw)
To: Uwe Kleine-König, Jeremy Kerr
Cc: linux-fbdev, Greg Kroah-Hartman, linux-iio, dri-devel,
platform-driver-x86, linux-mtd, linux-i2c, linux-stm32, linux-rtc,
chrome-platform, linux-staging, kasan-dev,
Broadcom internal kernel review list, linux-serial, linux-input,
linux-media, linux-pwm, linux-watchdog, linux-pm, acpi4asus-user,
linux-gpio, linux-mediatek, linux-rpi-kernel, openipmi-developer,
linux-arm-kernel, linux-hwmon, Support Opensource, netdev,
Wolfram Sang, linux-crypto, Pengutronix Kernel Team, patches,
linux-integrity, linuxppc-dev
On 6/29/22 09:23, Uwe Kleine-König wrote:
> Hello,
>
> [I dropped nearly all individuals from the Cc: list because various
> bounces reported to be unhappy about the long (logical) line.]
>
Yes, it also bounced for me when I tried to reply earlier today.
> diff --git a/drivers/gpu/drm/solomon/ssd130x-i2c.c b/drivers/gpu/drm/solomon/ssd130x-i2c.c
> index 1e0fcec7be47..ddfa0bb5d9c9 100644
> --- a/drivers/gpu/drm/solomon/ssd130x-i2c.c
> +++ b/drivers/gpu/drm/solomon/ssd130x-i2c.c
> @@ -39,13 +39,11 @@ static int ssd130x_i2c_probe(struct i2c_client *client)
> return 0;
> }
>
> -static int ssd130x_i2c_remove(struct i2c_client *client)
> +static void ssd130x_i2c_remove(struct i2c_client *client)
> {
> struct ssd130x_device *ssd130x = i2c_get_clientdata(client);
>
> ssd130x_remove(ssd130x);
> -
> - return 0;
> }
>
> static void ssd130x_i2c_shutdown(struct i2c_client *client)
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
--
Best regards,
Javier Martinez Canillas
Linux Engineering
Red Hat
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 6/6] i2c: Make remove callback return void
[not found] ` <20220628140313.74984-7-u.kleine-koenig@pengutronix.de>
[not found] ` <60cc6796236f23c028a9ae76dbe00d1917df82a5.camel@codeconstruct.com.au>
@ 2022-06-29 7:40 ` Heikki Krogerus
2022-06-29 10:40 ` Andy Shevchenko
` (6 subsequent siblings)
8 siblings, 0 replies; 25+ messages in thread
From: Heikki Krogerus @ 2022-06-29 7:40 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: Wolfram Sang, Uwe Kleine-König, Sekhar Nori,
Bartosz Golaszewski, Russell King, Scott Wood, Michael Ellerman,
Benjamin Herrenschmidt, Paul Mackerras, Robin van der Gracht,
Miguel Ojeda, Corey Minyard, Peter Huewe, Jarkko Sakkinen,
Jason Gunthorpe, Nicolas Ferre, Alexandre Belloni, Claudiu Beznea,
Max Filippov, Michael Turquette, Stephen Boyd, Luca Ceresoli,
Tudor Ambarus, Herbert Xu, David S. Miller, MyungJoo Ham,
Chanwoo Choi, Michael Hennerich, Linus Walleij, Andrzej Hajda,
Neil Armstrong, Robert Foss, Laurent Pinchart, Jonas Karlman,
Jernej Skrabec, David Airlie, Daniel Vetter, Benson Leung,
Guenter Roeck, Phong LE, Adrien Grassein, Peter Senna Tschudin,
Martin Donnelly, Martyn Welch, Douglas Anderson, Stefan Mavrodiev,
Thierry Reding, Sam Ravnborg, Florian Fainelli, Broad
On Tue, Jun 28, 2022 at 04:03:12PM +0200, Uwe Kleine-König wrote:
> diff --git a/drivers/usb/typec/hd3ss3220.c b/drivers/usb/typec/hd3ss3220.c
> index cd47c3597e19..2a58185fb14c 100644
> --- a/drivers/usb/typec/hd3ss3220.c
> +++ b/drivers/usb/typec/hd3ss3220.c
> @@ -245,14 +245,12 @@ static int hd3ss3220_probe(struct i2c_client *client,
> return ret;
> }
>
> -static int hd3ss3220_remove(struct i2c_client *client)
> +static void hd3ss3220_remove(struct i2c_client *client)
> {
> struct hd3ss3220 *hd3ss3220 = i2c_get_clientdata(client);
>
> typec_unregister_port(hd3ss3220->port);
> usb_role_switch_put(hd3ss3220->role_sw);
> -
> - return 0;
> }
>
> static const struct of_device_id dev_ids[] = {
> diff --git a/drivers/usb/typec/mux/fsa4480.c b/drivers/usb/typec/mux/fsa4480.c
> index 6184f5367190..d6495e533e58 100644
> --- a/drivers/usb/typec/mux/fsa4480.c
> +++ b/drivers/usb/typec/mux/fsa4480.c
> @@ -181,14 +181,12 @@ static int fsa4480_probe(struct i2c_client *client)
> return 0;
> }
>
> -static int fsa4480_remove(struct i2c_client *client)
> +static void fsa4480_remove(struct i2c_client *client)
> {
> struct fsa4480 *fsa = i2c_get_clientdata(client);
>
> typec_mux_unregister(fsa->mux);
> typec_switch_unregister(fsa->sw);
> -
> - return 0;
> }
>
> static const struct i2c_device_id fsa4480_table[] = {
> diff --git a/drivers/usb/typec/mux/pi3usb30532.c b/drivers/usb/typec/mux/pi3usb30532.c
> index 6ce9f282594e..1cd388b55c30 100644
> --- a/drivers/usb/typec/mux/pi3usb30532.c
> +++ b/drivers/usb/typec/mux/pi3usb30532.c
> @@ -160,13 +160,12 @@ static int pi3usb30532_probe(struct i2c_client *client)
> return 0;
> }
>
> -static int pi3usb30532_remove(struct i2c_client *client)
> +static void pi3usb30532_remove(struct i2c_client *client)
> {
> struct pi3usb30532 *pi = i2c_get_clientdata(client);
>
> typec_mux_unregister(pi->mux);
> typec_switch_unregister(pi->sw);
> - return 0;
> }
>
> static const struct i2c_device_id pi3usb30532_table[] = {
> diff --git a/drivers/usb/typec/rt1719.c b/drivers/usb/typec/rt1719.c
> index f1b698edd7eb..ea8b700b0ceb 100644
> --- a/drivers/usb/typec/rt1719.c
> +++ b/drivers/usb/typec/rt1719.c
> @@ -930,14 +930,12 @@ static int rt1719_probe(struct i2c_client *i2c)
> return ret;
> }
>
> -static int rt1719_remove(struct i2c_client *i2c)
> +static void rt1719_remove(struct i2c_client *i2c)
> {
> struct rt1719_data *data = i2c_get_clientdata(i2c);
>
> typec_unregister_port(data->port);
> usb_role_switch_put(data->role_sw);
> -
> - return 0;
> }
>
> static const struct of_device_id __maybe_unused rt1719_device_table[] = {
> diff --git a/drivers/usb/typec/stusb160x.c b/drivers/usb/typec/stusb160x.c
> index e7745d1c2a5c..8638f1d39896 100644
> --- a/drivers/usb/typec/stusb160x.c
> +++ b/drivers/usb/typec/stusb160x.c
> @@ -801,7 +801,7 @@ static int stusb160x_probe(struct i2c_client *client)
> return ret;
> }
>
> -static int stusb160x_remove(struct i2c_client *client)
> +static void stusb160x_remove(struct i2c_client *client)
> {
> struct stusb160x *chip = i2c_get_clientdata(client);
>
> @@ -823,8 +823,6 @@ static int stusb160x_remove(struct i2c_client *client)
>
> if (chip->main_supply)
> regulator_disable(chip->main_supply);
> -
> - return 0;
> }
>
> static int __maybe_unused stusb160x_suspend(struct device *dev)
> diff --git a/drivers/usb/typec/tcpm/fusb302.c b/drivers/usb/typec/tcpm/fusb302.c
> index 96c55eaf3f80..5e9348f28d50 100644
> --- a/drivers/usb/typec/tcpm/fusb302.c
> +++ b/drivers/usb/typec/tcpm/fusb302.c
> @@ -1771,7 +1771,7 @@ static int fusb302_probe(struct i2c_client *client,
> return ret;
> }
>
> -static int fusb302_remove(struct i2c_client *client)
> +static void fusb302_remove(struct i2c_client *client)
> {
> struct fusb302_chip *chip = i2c_get_clientdata(client);
>
> @@ -1783,8 +1783,6 @@ static int fusb302_remove(struct i2c_client *client)
> fwnode_handle_put(chip->tcpc_dev.fwnode);
> destroy_workqueue(chip->wq);
> fusb302_debugfs_exit(chip);
> -
> - return 0;
> }
>
> static int fusb302_pm_suspend(struct device *dev)
> diff --git a/drivers/usb/typec/tcpm/tcpci.c b/drivers/usb/typec/tcpm/tcpci.c
> index f33e08eb7670..c48fca60bb06 100644
> --- a/drivers/usb/typec/tcpm/tcpci.c
> +++ b/drivers/usb/typec/tcpm/tcpci.c
> @@ -869,7 +869,7 @@ static int tcpci_probe(struct i2c_client *client,
> return 0;
> }
>
> -static int tcpci_remove(struct i2c_client *client)
> +static void tcpci_remove(struct i2c_client *client)
> {
> struct tcpci_chip *chip = i2c_get_clientdata(client);
> int err;
> @@ -880,8 +880,6 @@ static int tcpci_remove(struct i2c_client *client)
> dev_warn(&client->dev, "Failed to disable irqs (%pe)\n", ERR_PTR(err));
>
> tcpci_unregister_port(chip->tcpci);
> -
> - return 0;
> }
>
> static const struct i2c_device_id tcpci_id[] = {
> diff --git a/drivers/usb/typec/tcpm/tcpci_maxim.c b/drivers/usb/typec/tcpm/tcpci_maxim.c
> index df2505570f07..a11be5754128 100644
> --- a/drivers/usb/typec/tcpm/tcpci_maxim.c
> +++ b/drivers/usb/typec/tcpm/tcpci_maxim.c
> @@ -493,14 +493,12 @@ static int max_tcpci_probe(struct i2c_client *client, const struct i2c_device_id
> return ret;
> }
>
> -static int max_tcpci_remove(struct i2c_client *client)
> +static void max_tcpci_remove(struct i2c_client *client)
> {
> struct max_tcpci_chip *chip = i2c_get_clientdata(client);
>
> if (!IS_ERR_OR_NULL(chip->tcpci))
> tcpci_unregister_port(chip->tcpci);
> -
> - return 0;
> }
>
> static const struct i2c_device_id max_tcpci_id[] = {
> diff --git a/drivers/usb/typec/tcpm/tcpci_rt1711h.c b/drivers/usb/typec/tcpm/tcpci_rt1711h.c
> index b56a0880a044..9ad4924b4ba7 100644
> --- a/drivers/usb/typec/tcpm/tcpci_rt1711h.c
> +++ b/drivers/usb/typec/tcpm/tcpci_rt1711h.c
> @@ -263,12 +263,11 @@ static int rt1711h_probe(struct i2c_client *client,
> return 0;
> }
>
> -static int rt1711h_remove(struct i2c_client *client)
> +static void rt1711h_remove(struct i2c_client *client)
> {
> struct rt1711h_chip *chip = i2c_get_clientdata(client);
>
> tcpci_unregister_port(chip->tcpci);
> - return 0;
> }
>
> static const struct i2c_device_id rt1711h_id[] = {
> diff --git a/drivers/usb/typec/tipd/core.c b/drivers/usb/typec/tipd/core.c
> index dfbba5ae9487..b637e8b378b3 100644
> --- a/drivers/usb/typec/tipd/core.c
> +++ b/drivers/usb/typec/tipd/core.c
> @@ -857,15 +857,13 @@ static int tps6598x_probe(struct i2c_client *client)
> return ret;
> }
>
> -static int tps6598x_remove(struct i2c_client *client)
> +static void tps6598x_remove(struct i2c_client *client)
> {
> struct tps6598x *tps = i2c_get_clientdata(client);
>
> tps6598x_disconnect(tps, 0);
> typec_unregister_port(tps->port);
> usb_role_switch_put(tps->role_sw);
> -
> - return 0;
> }
>
> static const struct of_device_id tps6598x_of_match[] = {
> diff --git a/drivers/usb/typec/ucsi/ucsi_ccg.c b/drivers/usb/typec/ucsi/ucsi_ccg.c
> index 6db7c8ddd51c..920b7e743f56 100644
> --- a/drivers/usb/typec/ucsi/ucsi_ccg.c
> +++ b/drivers/usb/typec/ucsi/ucsi_ccg.c
> @@ -1398,7 +1398,7 @@ static int ucsi_ccg_probe(struct i2c_client *client,
> return status;
> }
>
> -static int ucsi_ccg_remove(struct i2c_client *client)
> +static void ucsi_ccg_remove(struct i2c_client *client)
> {
> struct ucsi_ccg *uc = i2c_get_clientdata(client);
>
> @@ -1408,8 +1408,6 @@ static int ucsi_ccg_remove(struct i2c_client *client)
> ucsi_unregister(uc->ucsi);
> ucsi_destroy(uc->ucsi);
> free_irq(uc->irq, uc);
> -
> - return 0;
> }
>
> static const struct i2c_device_id ucsi_ccg_device_id[] = {
> diff --git a/drivers/usb/typec/wusb3801.c b/drivers/usb/typec/wusb3801.c
> index e63509f8b01e..3cc7a15ecbd3 100644
> --- a/drivers/usb/typec/wusb3801.c
> +++ b/drivers/usb/typec/wusb3801.c
> @@ -399,7 +399,7 @@ static int wusb3801_probe(struct i2c_client *client)
> return ret;
> }
>
> -static int wusb3801_remove(struct i2c_client *client)
> +static void wusb3801_remove(struct i2c_client *client)
> {
> struct wusb3801 *wusb3801 = i2c_get_clientdata(client);
>
> @@ -411,8 +411,6 @@ static int wusb3801_remove(struct i2c_client *client)
>
> if (wusb3801->vbus_on)
> regulator_disable(wusb3801->vbus_supply);
> -
> - return 0;
> }
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
--
heikki
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 6/6] i2c: Make remove callback return void
2022-06-29 7:23 ` [PATCH 6/6] i2c: Make remove " Uwe Kleine-König
2022-06-29 7:37 ` Javier Martinez Canillas
@ 2022-06-29 7:55 ` Christophe Leroy
2022-06-29 8:09 ` Javier Martinez Canillas
1 sibling, 1 reply; 25+ messages in thread
From: Christophe Leroy @ 2022-06-29 7:55 UTC (permalink / raw)
To: Uwe Kleine-König, Jeremy Kerr
Cc: linux-fbdev@vger.kernel.org, Greg Kroah-Hartman,
linux-iio@vger.kernel.org, dri-devel@lists.freedesktop.org,
platform-driver-x86@vger.kernel.org,
linux-mtd@lists.infradead.org, linux-i2c@vger.kernel.org,
linux-stm32@st-md-mailman.stormreply.com,
linux-rtc@vger.kernel.org, chrome-platform@lists.linux.dev,
linux-staging@lists.linux.dev, kasan-dev@googlegroups.com,
Broadcom internal kernel review list,
linux-serial@vger.kernel.org, linux-input@vger.kernel.org,
linux-media@vger.kernel.org, linux-pwm@vger.kernel.org,
linux-watchdog@vger.kernel.org, linux-pm@vger.kernel.org,
acpi4asus-user@lists.sourceforge.net, linux-gpio@vger.kernel.org,
linux-mediatek@lists.infradead.org,
linux-rpi-kernel@lists.infradead.org,
openipmi-developer@lists.sourceforge.net,
linux-arm-kernel@lists.infradead.org, linux-hwmon@vger.kernel.org,
Support Opensource, netdev@vger.kernel.org, Wolfram Sang,
linux-crypto@vger.kernel.org, Pengutronix Kernel Team,
patches@opensource.cirrus.com, linux-integrity@vger.kernel.org,
linuxppc-dev@lists.ozlabs.org
Le 29/06/2022 à 09:23, Uwe Kleine-König a écrit :
> Hello,
>
> [I dropped nearly all individuals from the Cc: list because various
> bounces reported to be unhappy about the long (logical) line.]
Good idea, even patchwork made a mess of it, see
https://patchwork.ozlabs.org/project/linuxppc-dev/patch/20220628140313.74984-7-u.kleine-koenig@pengutronix.de/
>
> On Wed, Jun 29, 2022 at 03:03:54PM +0800, Jeremy Kerr wrote:
>> Looks good - just one minor change for the mctp-i2c driver, but only
>> worthwhile if you end up re-rolling this series for other reasons:
>>
>>> -static int mctp_i2c_remove(struct i2c_client *client)
>>> +static void mctp_i2c_remove(struct i2c_client *client)
>>> {
>>> struct mctp_i2c_client *mcli = i2c_get_clientdata(client);
>>> struct mctp_i2c_dev *midev = NULL, *tmp = NULL;
>>> @@ -1000,7 +1000,6 @@ static int mctp_i2c_remove(struct i2c_client *client)
>>> mctp_i2c_free_client(mcli);
>>> mutex_unlock(&driver_clients_lock);
>>> /* Callers ignore return code */
>>> - return 0;
>>> }
>>
>> The comment there no longer makes much sense, I'd suggest removing that
>> too.
>
> Yeah, that was already pointed out to me in a private reply. It's
> already fixed in
>
> https://git.pengutronix.de/cgit/ukl/linux/log/?h=i2c-remove-void
>
>> Either way:
>>
>> Reviewed-by: Jeremy Kerr <jk@codeconstruct.com.au>
>
> Added to my tree, too.
>
> Thanks
> Uwe
>
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 6/6] i2c: Make remove callback return void
2022-06-29 7:55 ` Christophe Leroy
@ 2022-06-29 8:09 ` Javier Martinez Canillas
0 siblings, 0 replies; 25+ messages in thread
From: Javier Martinez Canillas @ 2022-06-29 8:09 UTC (permalink / raw)
To: Christophe Leroy, Uwe Kleine-König, Jeremy Kerr
Cc: linux-fbdev@vger.kernel.org, linux-iio@vger.kernel.org,
dri-devel@lists.freedesktop.org,
platform-driver-x86@vger.kernel.org,
patches@opensource.cirrus.com, linux-mtd@lists.infradead.org,
linux-i2c@vger.kernel.org,
linux-stm32@st-md-mailman.stormreply.com,
linux-rtc@vger.kernel.org, chrome-platform@lists.linux.dev,
linux-staging@lists.linux.dev, kasan-dev@googlegroups.com,
Broadcom internal kernel review list,
linux-serial@vger.kernel.org, linux-input@vger.kernel.org,
linux-media@vger.kernel.org, linux-pwm@vger.kernel.org,
linux-watchdog@vger.kernel.org, linux-pm@vger.kernel.org,
acpi4asus-user@lists.sourceforge.net, linux-gpio@vger.kernel.org,
linux-mediatek@lists.infradead.org,
linux-rpi-kernel@lists.infradead.org,
openipmi-developer@lists.sourceforge.net,
linux-arm-kernel@lists.infradead.org, linux-hwmon@vger.kernel.org,
Support Opensource, Greg Kroah-Hartman, Wolfram Sang,
linux-crypto@vger.kernel.org, Pengutronix Kernel Team,
netdev@vger.kernel.org, linux-integrity@vger.kernel.org,
linuxppc-dev@lists.ozlabs.org
On 6/29/22 09:55, Christophe Leroy wrote:
>
>
> Le 29/06/2022 à 09:23, Uwe Kleine-König a écrit :
>> Hello,
>>
>> [I dropped nearly all individuals from the Cc: list because various
>> bounces reported to be unhappy about the long (logical) line.]
>
> Good idea, even patchwork made a mess of it, see
> https://patchwork.ozlabs.org/project/linuxppc-dev/patch/20220628140313.74984-7-u.kleine-koenig@pengutronix.de/
>
FYI, for patches like these what I usually use is:
./scripts/get_maintainer.pl --nogit-fallback --no-m --no-r
--
Best regards,
Javier Martinez Canillas
Linux Engineering
Red Hat
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 6/6] i2c: Make remove callback return void
[not found] ` <20220628140313.74984-7-u.kleine-koenig@pengutronix.de>
[not found] ` <60cc6796236f23c028a9ae76dbe00d1917df82a5.camel@codeconstruct.com.au>
2022-06-29 7:40 ` Heikki Krogerus
@ 2022-06-29 10:40 ` Andy Shevchenko
2022-06-29 10:53 ` Petr Machata
` (5 subsequent siblings)
8 siblings, 0 replies; 25+ messages in thread
From: Andy Shevchenko @ 2022-06-29 10:40 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: Uwe Kleine-König, linux-i2c, linux-arm-kernel, linuxppc-dev,
openipmi-developer, linux-integrity, linux-clk, linux-crypto,
linux-gpio, dri-devel, chrome-platform, linux-rpi-kernel,
linux-input, linux-hwmon, linux-iio, linux-stm32, linux-leds,
linux-media, patches, alsa-devel, linux-omap, linux-mtd, netdev,
devicetree, platform-driver-x86, acpi4asus-user, linux-pm,
linux-pwm, linux-rtc, linux-staging, linux-serial, linux-usb,
linux-fbdev, linux-watchdog, kasan-dev, linux-mediatek
On Tue, Jun 28, 2022 at 04:03:12PM +0200, Uwe Kleine-König wrote:
> From: Uwe Kleine-König <uwe@kleine-koenig.org>
>
> The value returned by an i2c driver's remove function is mostly ignored.
> (Only an error message is printed if the value is non-zero that the
> error is ignored.)
>
> So change the prototype of the remove function to return no value. This
> way driver authors are not tempted to assume that passing an error to
> the upper layer is a good idea. All drivers are adapted accordingly.
> There is no intended change of behaviour, all callbacks were prepared to
> return 0 before.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
> Documentation/i2c/writing-clients.rst | 2 +-
> arch/arm/mach-davinci/board-dm644x-evm.c | 3 +--
> arch/arm/mach-davinci/board-dm646x-evm.c | 3 +--
> arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c | 3 +--
> drivers/auxdisplay/ht16k33.c | 4 +---
> drivers/auxdisplay/lcd2s.c | 3 +--
> drivers/char/ipmi/ipmb_dev_int.c | 4 +---
> drivers/char/ipmi/ipmi_ipmb.c | 4 +---
> drivers/char/ipmi/ipmi_ssif.c | 6 ++----
> drivers/char/tpm/st33zp24/i2c.c | 4 +---
> drivers/char/tpm/tpm_i2c_atmel.c | 3 +--
> drivers/char/tpm/tpm_i2c_infineon.c | 4 +---
> drivers/char/tpm/tpm_i2c_nuvoton.c | 3 +--
> drivers/char/tpm/tpm_tis_i2c_cr50.c | 6 ++----
> drivers/clk/clk-cdce706.c | 3 +--
> drivers/clk/clk-cs2000-cp.c | 4 +---
> drivers/clk/clk-si514.c | 3 +--
> drivers/clk/clk-si5341.c | 4 +---
> drivers/clk/clk-si5351.c | 4 +---
> drivers/clk/clk-si570.c | 3 +--
> drivers/clk/clk-versaclock5.c | 4 +---
> drivers/crypto/atmel-ecc.c | 6 ++----
> drivers/crypto/atmel-sha204a.c | 6 ++----
> drivers/extcon/extcon-rt8973a.c | 4 +---
> drivers/gpio/gpio-adp5588.c | 4 +---
> drivers/gpio/gpio-max7300.c | 4 +---
> drivers/gpio/gpio-pca953x.c | 4 +---
> drivers/gpio/gpio-pcf857x.c | 4 +---
> drivers/gpio/gpio-tpic2810.c | 4 +---
> drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 4 +---
> drivers/gpu/drm/bridge/analogix/analogix-anx6345.c | 4 +---
> drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c | 4 +---
> drivers/gpu/drm/bridge/analogix/anx7625.c | 4 +---
> drivers/gpu/drm/bridge/chrontel-ch7033.c | 4 +---
> drivers/gpu/drm/bridge/cros-ec-anx7688.c | 4 +---
> drivers/gpu/drm/bridge/ite-it6505.c | 4 +---
> drivers/gpu/drm/bridge/ite-it66121.c | 4 +---
> drivers/gpu/drm/bridge/lontium-lt8912b.c | 3 +--
> drivers/gpu/drm/bridge/lontium-lt9211.c | 4 +---
> drivers/gpu/drm/bridge/lontium-lt9611.c | 4 +---
> drivers/gpu/drm/bridge/lontium-lt9611uxc.c | 4 +---
> drivers/gpu/drm/bridge/megachips-stdpxxxx-ge-b850v3-fw.c | 8 ++------
> drivers/gpu/drm/bridge/nxp-ptn3460.c | 4 +---
> drivers/gpu/drm/bridge/parade-ps8622.c | 4 +---
> drivers/gpu/drm/bridge/parade-ps8640.c | 4 +---
> drivers/gpu/drm/bridge/sii902x.c | 4 +---
> drivers/gpu/drm/bridge/sii9234.c | 4 +---
> drivers/gpu/drm/bridge/sil-sii8620.c | 4 +---
> drivers/gpu/drm/bridge/tc358767.c | 4 +---
> drivers/gpu/drm/bridge/tc358768.c | 4 +---
> drivers/gpu/drm/bridge/tc358775.c | 4 +---
> drivers/gpu/drm/bridge/ti-sn65dsi83.c | 4 +---
> drivers/gpu/drm/bridge/ti-tfp410.c | 4 +---
> drivers/gpu/drm/i2c/ch7006_drv.c | 4 +---
> drivers/gpu/drm/i2c/tda9950.c | 4 +---
> drivers/gpu/drm/i2c/tda998x_drv.c | 3 +--
> drivers/gpu/drm/panel/panel-olimex-lcd-olinuxino.c | 4 +---
> drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c | 4 +---
> drivers/gpu/drm/solomon/ssd130x-i2c.c | 4 +---
> drivers/hid/i2c-hid/i2c-hid-core.c | 4 +---
> drivers/hid/i2c-hid/i2c-hid.h | 2 +-
> drivers/hwmon/adc128d818.c | 4 +---
> drivers/hwmon/adt7470.c | 3 +--
> drivers/hwmon/asb100.c | 6 ++----
> drivers/hwmon/asc7621.c | 4 +---
> drivers/hwmon/dme1737.c | 4 +---
> drivers/hwmon/f75375s.c | 5 ++---
> drivers/hwmon/fschmd.c | 6 ++----
> drivers/hwmon/ftsteutates.c | 3 +--
> drivers/hwmon/ina209.c | 4 +---
> drivers/hwmon/ina3221.c | 4 +---
> drivers/hwmon/jc42.c | 3 +--
> drivers/hwmon/mcp3021.c | 4 +---
> drivers/hwmon/occ/p8_i2c.c | 4 +---
> drivers/hwmon/pcf8591.c | 3 +--
> drivers/hwmon/smm665.c | 3 +--
> drivers/hwmon/tps23861.c | 4 +---
> drivers/hwmon/w83781d.c | 4 +---
> drivers/hwmon/w83791d.c | 6 ++----
> drivers/hwmon/w83792d.c | 6 ++----
> drivers/hwmon/w83793.c | 6 ++----
> drivers/hwmon/w83795.c | 4 +---
> drivers/hwmon/w83l785ts.c | 6 ++----
> drivers/i2c/i2c-core-base.c | 6 +-----
> drivers/i2c/i2c-slave-eeprom.c | 4 +---
> drivers/i2c/i2c-slave-testunit.c | 3 +--
> drivers/i2c/i2c-smbus.c | 3 +--
> drivers/i2c/muxes/i2c-mux-ltc4306.c | 4 +---
> drivers/i2c/muxes/i2c-mux-pca9541.c | 3 +--
> drivers/i2c/muxes/i2c-mux-pca954x.c | 3 +--
> drivers/iio/accel/bma180.c | 4 +---
> drivers/iio/accel/bma400_i2c.c | 4 +---
> drivers/iio/accel/bmc150-accel-i2c.c | 4 +---
> drivers/iio/accel/kxcjk-1013.c | 4 +---
> drivers/iio/accel/kxsd9-i2c.c | 4 +---
> drivers/iio/accel/mc3230.c | 4 +---
> drivers/iio/accel/mma7455_i2c.c | 4 +---
> drivers/iio/accel/mma7660.c | 4 +---
> drivers/iio/accel/mma8452.c | 4 +---
> drivers/iio/accel/mma9551.c | 4 +---
> drivers/iio/accel/mma9553.c | 4 +---
> drivers/iio/accel/stk8312.c | 4 +---
> drivers/iio/accel/stk8ba50.c | 4 +---
> drivers/iio/adc/ad799x.c | 4 +---
> drivers/iio/adc/ina2xx-adc.c | 4 +---
> drivers/iio/adc/ltc2497.c | 4 +---
> drivers/iio/adc/ti-ads1015.c | 4 +---
> drivers/iio/chemical/atlas-sensor.c | 4 +---
> drivers/iio/chemical/ccs811.c | 4 +---
> drivers/iio/chemical/sgp30.c | 4 +---
> drivers/iio/dac/ad5380.c | 4 +---
> drivers/iio/dac/ad5446.c | 4 +---
> drivers/iio/dac/ad5593r.c | 4 +---
> drivers/iio/dac/ad5696-i2c.c | 4 +---
> drivers/iio/dac/ds4424.c | 4 +---
> drivers/iio/dac/m62332.c | 4 +---
> drivers/iio/dac/mcp4725.c | 4 +---
> drivers/iio/dac/ti-dac5571.c | 4 +---
> drivers/iio/gyro/bmg160_i2c.c | 4 +---
> drivers/iio/gyro/fxas21002c_i2c.c | 4 +---
> drivers/iio/gyro/itg3200_core.c | 4 +---
> drivers/iio/gyro/mpu3050-i2c.c | 4 +---
> drivers/iio/health/afe4404.c | 4 +---
> drivers/iio/health/max30100.c | 4 +---
> drivers/iio/health/max30102.c | 4 +---
> drivers/iio/humidity/hdc2010.c | 4 +---
> drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c | 4 +---
> drivers/iio/imu/kmx61.c | 4 +---
> drivers/iio/light/apds9300.c | 4 +---
> drivers/iio/light/apds9960.c | 4 +---
> drivers/iio/light/bh1750.c | 4 +---
> drivers/iio/light/bh1780.c | 4 +---
> drivers/iio/light/cm3232.c | 4 +---
> drivers/iio/light/cm36651.c | 4 +---
> drivers/iio/light/gp2ap002.c | 4 +---
> drivers/iio/light/gp2ap020a00f.c | 4 +---
> drivers/iio/light/isl29028.c | 4 +---
> drivers/iio/light/isl29125.c | 4 +---
> drivers/iio/light/jsa1212.c | 4 +---
> drivers/iio/light/ltr501.c | 4 +---
> drivers/iio/light/opt3001.c | 6 ++----
> drivers/iio/light/pa12203001.c | 4 +---
> drivers/iio/light/rpr0521.c | 4 +---
> drivers/iio/light/stk3310.c | 4 +---
> drivers/iio/light/tcs3472.c | 4 +---
> drivers/iio/light/tsl2563.c | 4 +---
> drivers/iio/light/tsl2583.c | 4 +---
> drivers/iio/light/tsl4531.c | 4 +---
> drivers/iio/light/us5182d.c | 4 +---
> drivers/iio/light/vcnl4000.c | 4 +---
> drivers/iio/light/vcnl4035.c | 4 +---
> drivers/iio/light/veml6070.c | 4 +---
> drivers/iio/magnetometer/ak8974.c | 4 +---
> drivers/iio/magnetometer/ak8975.c | 4 +---
> drivers/iio/magnetometer/bmc150_magn_i2c.c | 4 +---
> drivers/iio/magnetometer/hmc5843_i2c.c | 4 +---
> drivers/iio/magnetometer/mag3110.c | 4 +---
> drivers/iio/magnetometer/yamaha-yas530.c | 4 +---
> drivers/iio/potentiostat/lmp91000.c | 4 +---
> drivers/iio/pressure/mpl3115.c | 4 +---
> drivers/iio/pressure/ms5611_i2c.c | 4 +---
> drivers/iio/pressure/zpa2326_i2c.c | 4 +---
> drivers/iio/proximity/pulsedlight-lidar-lite-v2.c | 4 +---
> drivers/iio/proximity/sx9500.c | 4 +---
> drivers/iio/temperature/mlx90614.c | 4 +---
> drivers/iio/temperature/mlx90632.c | 4 +---
> drivers/input/joystick/as5011.c | 4 +---
> drivers/input/keyboard/adp5588-keys.c | 4 +---
> drivers/input/keyboard/lm8323.c | 4 +---
> drivers/input/keyboard/lm8333.c | 4 +---
> drivers/input/keyboard/mcs_touchkey.c | 4 +---
> drivers/input/keyboard/qt1070.c | 4 +---
> drivers/input/keyboard/qt2160.c | 4 +---
> drivers/input/keyboard/tca6416-keypad.c | 4 +---
> drivers/input/misc/adxl34x-i2c.c | 4 +---
> drivers/input/misc/bma150.c | 4 +---
> drivers/input/misc/cma3000_d0x_i2c.c | 4 +---
> drivers/input/misc/pcf8574_keypad.c | 4 +---
> drivers/input/mouse/synaptics_i2c.c | 4 +---
> drivers/input/rmi4/rmi_smbus.c | 4 +---
> drivers/input/touchscreen/atmel_mxt_ts.c | 4 +---
> drivers/input/touchscreen/bu21013_ts.c | 4 +---
> drivers/input/touchscreen/cyttsp4_i2c.c | 4 +---
> drivers/input/touchscreen/edt-ft5x06.c | 4 +---
> drivers/input/touchscreen/goodix.c | 4 +---
> drivers/input/touchscreen/migor_ts.c | 4 +---
> drivers/input/touchscreen/s6sy761.c | 4 +---
> drivers/input/touchscreen/stmfts.c | 4 +---
> drivers/input/touchscreen/tsc2004.c | 4 +---
> drivers/leds/flash/leds-as3645a.c | 4 +---
> drivers/leds/flash/leds-lm3601x.c | 4 +---
> drivers/leds/flash/leds-rt4505.c | 3 +--
> drivers/leds/leds-an30259a.c | 4 +---
> drivers/leds/leds-aw2013.c | 4 +---
> drivers/leds/leds-bd2802.c | 4 +---
> drivers/leds/leds-blinkm.c | 3 +--
> drivers/leds/leds-is31fl319x.c | 3 +--
> drivers/leds/leds-is31fl32xx.c | 4 +---
> drivers/leds/leds-lm3530.c | 3 +--
> drivers/leds/leds-lm3532.c | 4 +---
> drivers/leds/leds-lm355x.c | 4 +---
> drivers/leds/leds-lm3642.c | 3 +--
> drivers/leds/leds-lm3692x.c | 4 +---
> drivers/leds/leds-lm3697.c | 4 +---
> drivers/leds/leds-lp3944.c | 4 +---
> drivers/leds/leds-lp3952.c | 4 +---
> drivers/leds/leds-lp50xx.c | 4 +---
> drivers/leds/leds-lp5521.c | 4 +---
> drivers/leds/leds-lp5523.c | 4 +---
> drivers/leds/leds-lp5562.c | 4 +---
> drivers/leds/leds-lp8501.c | 4 +---
> drivers/leds/leds-lp8860.c | 4 +---
> drivers/leds/leds-pca9532.c | 6 ++----
> drivers/leds/leds-tca6507.c | 4 +---
> drivers/leds/leds-turris-omnia.c | 4 +---
> drivers/macintosh/ams/ams-i2c.c | 4 +---
> drivers/macintosh/therm_adt746x.c | 4 +---
> drivers/macintosh/therm_windtunnel.c | 4 +---
> drivers/macintosh/windfarm_ad7417_sensor.c | 4 +---
> drivers/macintosh/windfarm_fcu_controls.c | 3 +--
> drivers/macintosh/windfarm_lm75_sensor.c | 4 +---
> drivers/macintosh/windfarm_lm87_sensor.c | 4 +---
> drivers/macintosh/windfarm_max6690_sensor.c | 4 +---
> drivers/macintosh/windfarm_smu_sat.c | 4 +---
> drivers/media/cec/i2c/ch7322.c | 4 +---
> drivers/media/dvb-frontends/a8293.c | 3 +--
> drivers/media/dvb-frontends/af9013.c | 4 +---
> drivers/media/dvb-frontends/af9033.c | 4 +---
> drivers/media/dvb-frontends/au8522_decoder.c | 3 +--
> drivers/media/dvb-frontends/cxd2099.c | 4 +---
> drivers/media/dvb-frontends/cxd2820r_core.c | 4 +---
> drivers/media/dvb-frontends/dvb-pll.c | 3 +--
> drivers/media/dvb-frontends/lgdt3306a.c | 4 +---
> drivers/media/dvb-frontends/lgdt330x.c | 4 +---
> drivers/media/dvb-frontends/m88ds3103.c | 3 +--
> drivers/media/dvb-frontends/mn88443x.c | 4 +---
> drivers/media/dvb-frontends/mn88472.c | 4 +---
> drivers/media/dvb-frontends/mn88473.c | 4 +---
> drivers/media/dvb-frontends/mxl692.c | 4 +---
> drivers/media/dvb-frontends/rtl2830.c | 4 +---
> drivers/media/dvb-frontends/rtl2832.c | 4 +---
> drivers/media/dvb-frontends/si2165.c | 3 +--
> drivers/media/dvb-frontends/si2168.c | 4 +---
> drivers/media/dvb-frontends/sp2.c | 3 +--
> drivers/media/dvb-frontends/stv090x.c | 3 +--
> drivers/media/dvb-frontends/stv6110x.c | 3 +--
> drivers/media/dvb-frontends/tc90522.c | 3 +--
> drivers/media/dvb-frontends/tda10071.c | 3 +--
> drivers/media/dvb-frontends/ts2020.c | 3 +--
> drivers/media/i2c/ad5820.c | 3 +--
> drivers/media/i2c/ad9389b.c | 3 +--
> drivers/media/i2c/adp1653.c | 4 +---
> drivers/media/i2c/adv7170.c | 3 +--
> drivers/media/i2c/adv7175.c | 3 +--
> drivers/media/i2c/adv7180.c | 4 +---
> drivers/media/i2c/adv7183.c | 3 +--
> drivers/media/i2c/adv7343.c | 4 +---
> drivers/media/i2c/adv7393.c | 4 +---
> drivers/media/i2c/adv748x/adv748x-core.c | 4 +---
> drivers/media/i2c/adv7511-v4l2.c | 3 +--
> drivers/media/i2c/adv7604.c | 3 +--
> drivers/media/i2c/adv7842.c | 3 +--
> drivers/media/i2c/ak7375.c | 4 +---
> drivers/media/i2c/ak881x.c | 4 +---
> drivers/media/i2c/bt819.c | 3 +--
> drivers/media/i2c/bt856.c | 3 +--
> drivers/media/i2c/bt866.c | 3 +--
> drivers/media/i2c/ccs/ccs-core.c | 4 +---
> drivers/media/i2c/cs3308.c | 3 +--
> drivers/media/i2c/cs5345.c | 3 +--
> drivers/media/i2c/cs53l32a.c | 3 +--
> drivers/media/i2c/cx25840/cx25840-core.c | 3 +--
> drivers/media/i2c/dw9714.c | 4 +---
> drivers/media/i2c/dw9768.c | 4 +---
> drivers/media/i2c/dw9807-vcm.c | 4 +---
> drivers/media/i2c/et8ek8/et8ek8_driver.c | 4 +---
> drivers/media/i2c/hi556.c | 4 +---
> drivers/media/i2c/hi846.c | 4 +---
> drivers/media/i2c/hi847.c | 4 +---
> drivers/media/i2c/imx208.c | 4 +---
> drivers/media/i2c/imx214.c | 4 +---
> drivers/media/i2c/imx219.c | 4 +---
> drivers/media/i2c/imx258.c | 4 +---
> drivers/media/i2c/imx274.c | 3 +--
> drivers/media/i2c/imx290.c | 4 +---
> drivers/media/i2c/imx319.c | 4 +---
> drivers/media/i2c/imx334.c | 4 +---
> drivers/media/i2c/imx335.c | 4 +---
> drivers/media/i2c/imx355.c | 4 +---
> drivers/media/i2c/imx412.c | 4 +---
> drivers/media/i2c/ir-kbd-i2c.c | 4 +---
> drivers/media/i2c/isl7998x.c | 4 +---
> drivers/media/i2c/ks0127.c | 3 +--
> drivers/media/i2c/lm3560.c | 4 +---
> drivers/media/i2c/lm3646.c | 4 +---
> drivers/media/i2c/m52790.c | 3 +--
> drivers/media/i2c/m5mols/m5mols_core.c | 4 +---
> drivers/media/i2c/max2175.c | 4 +---
> drivers/media/i2c/max9286.c | 4 +---
> drivers/media/i2c/ml86v7667.c | 4 +---
> drivers/media/i2c/msp3400-driver.c | 3 +--
> drivers/media/i2c/mt9m001.c | 4 +---
> drivers/media/i2c/mt9m032.c | 3 +--
> drivers/media/i2c/mt9m111.c | 4 +---
> drivers/media/i2c/mt9p031.c | 4 +---
> drivers/media/i2c/mt9t001.c | 3 +--
> drivers/media/i2c/mt9t112.c | 4 +---
> drivers/media/i2c/mt9v011.c | 4 +---
> drivers/media/i2c/mt9v032.c | 4 +---
> drivers/media/i2c/mt9v111.c | 4 +---
> drivers/media/i2c/noon010pc30.c | 4 +---
> drivers/media/i2c/og01a1b.c | 4 +---
> drivers/media/i2c/ov02a10.c | 4 +---
> drivers/media/i2c/ov08d10.c | 4 +---
> drivers/media/i2c/ov13858.c | 4 +---
> drivers/media/i2c/ov13b10.c | 4 +---
> drivers/media/i2c/ov2640.c | 3 +--
> drivers/media/i2c/ov2659.c | 4 +---
> drivers/media/i2c/ov2680.c | 4 +---
> drivers/media/i2c/ov2685.c | 4 +---
> drivers/media/i2c/ov2740.c | 4 +---
> drivers/media/i2c/ov5640.c | 4 +---
> drivers/media/i2c/ov5645.c | 4 +---
> drivers/media/i2c/ov5647.c | 4 +---
> drivers/media/i2c/ov5648.c | 4 +---
> drivers/media/i2c/ov5670.c | 4 +---
> drivers/media/i2c/ov5675.c | 4 +---
> drivers/media/i2c/ov5693.c | 4 +---
> drivers/media/i2c/ov5695.c | 4 +---
> drivers/media/i2c/ov6650.c | 3 +--
> drivers/media/i2c/ov7251.c | 4 +---
> drivers/media/i2c/ov7640.c | 4 +---
> drivers/media/i2c/ov7670.c | 3 +--
> drivers/media/i2c/ov772x.c | 4 +---
> drivers/media/i2c/ov7740.c | 3 +--
> drivers/media/i2c/ov8856.c | 4 +---
> drivers/media/i2c/ov8865.c | 4 +---
> drivers/media/i2c/ov9282.c | 4 +---
> drivers/media/i2c/ov9640.c | 4 +---
> drivers/media/i2c/ov9650.c | 4 +---
> drivers/media/i2c/ov9734.c | 4 +---
> drivers/media/i2c/rdacm20.c | 4 +---
> drivers/media/i2c/rdacm21.c | 4 +---
> drivers/media/i2c/rj54n1cb0c.c | 4 +---
> drivers/media/i2c/s5c73m3/s5c73m3-core.c | 4 +---
> drivers/media/i2c/s5k4ecgx.c | 4 +---
> drivers/media/i2c/s5k5baf.c | 4 +---
> drivers/media/i2c/s5k6a3.c | 3 +--
> drivers/media/i2c/s5k6aa.c | 4 +---
> drivers/media/i2c/saa6588.c | 4 +---
> drivers/media/i2c/saa6752hs.c | 3 +--
> drivers/media/i2c/saa7110.c | 3 +--
> drivers/media/i2c/saa7115.c | 3 +--
> drivers/media/i2c/saa7127.c | 3 +--
> drivers/media/i2c/saa717x.c | 3 +--
> drivers/media/i2c/saa7185.c | 3 +--
> drivers/media/i2c/sony-btf-mpx.c | 4 +---
> drivers/media/i2c/sr030pc30.c | 3 +--
> drivers/media/i2c/st-mipid02.c | 4 +---
> drivers/media/i2c/tc358743.c | 4 +---
> drivers/media/i2c/tda1997x.c | 4 +---
> drivers/media/i2c/tda7432.c | 3 +--
> drivers/media/i2c/tda9840.c | 3 +--
> drivers/media/i2c/tea6415c.c | 3 +--
> drivers/media/i2c/tea6420.c | 3 +--
> drivers/media/i2c/ths7303.c | 4 +---
> drivers/media/i2c/ths8200.c | 4 +---
> drivers/media/i2c/tlv320aic23b.c | 3 +--
> drivers/media/i2c/tvaudio.c | 3 +--
> drivers/media/i2c/tvp514x.c | 3 +--
> drivers/media/i2c/tvp5150.c | 4 +---
> drivers/media/i2c/tvp7002.c | 3 +--
> drivers/media/i2c/tw2804.c | 3 +--
> drivers/media/i2c/tw9903.c | 3 +--
> drivers/media/i2c/tw9906.c | 3 +--
> drivers/media/i2c/tw9910.c | 4 +---
> drivers/media/i2c/uda1342.c | 3 +--
> drivers/media/i2c/upd64031a.c | 3 +--
> drivers/media/i2c/upd64083.c | 3 +--
> drivers/media/i2c/video-i2c.c | 4 +---
> drivers/media/i2c/vp27smpx.c | 3 +--
> drivers/media/i2c/vpx3220.c | 4 +---
> drivers/media/i2c/vs6624.c | 3 +--
> drivers/media/i2c/wm8739.c | 3 +--
> drivers/media/i2c/wm8775.c | 3 +--
> drivers/media/radio/radio-tea5764.c | 3 +--
> drivers/media/radio/saa7706h.c | 3 +--
> drivers/media/radio/si470x/radio-si470x-i2c.c | 3 +--
> drivers/media/radio/si4713/si4713.c | 4 +---
> drivers/media/radio/tef6862.c | 3 +--
> drivers/media/test-drivers/vidtv/vidtv_demod.c | 4 +---
> drivers/media/test-drivers/vidtv/vidtv_tuner.c | 4 +---
> drivers/media/tuners/e4000.c | 4 +---
> drivers/media/tuners/fc2580.c | 3 +--
> drivers/media/tuners/m88rs6000t.c | 4 +---
> drivers/media/tuners/mt2060.c | 4 +---
> drivers/media/tuners/mxl301rf.c | 3 +--
> drivers/media/tuners/qm1d1b0004.c | 3 +--
> drivers/media/tuners/qm1d1c0042.c | 3 +--
> drivers/media/tuners/si2157.c | 4 +---
> drivers/media/tuners/tda18212.c | 4 +---
> drivers/media/tuners/tda18250.c | 4 +---
> drivers/media/tuners/tua9001.c | 3 +--
> drivers/media/usb/go7007/s2250-board.c | 3 +--
> drivers/media/v4l2-core/tuner-core.c | 3 +--
> drivers/mfd/88pm800.c | 4 +---
> drivers/mfd/88pm805.c | 4 +---
> drivers/mfd/88pm860x-core.c | 3 +--
> drivers/mfd/acer-ec-a500.c | 4 +---
> drivers/mfd/arizona-i2c.c | 4 +---
> drivers/mfd/axp20x-i2c.c | 4 +---
> drivers/mfd/da903x.c | 3 +--
> drivers/mfd/da9052-i2c.c | 3 +--
> drivers/mfd/da9055-i2c.c | 4 +---
> drivers/mfd/da9062-core.c | 4 +---
> drivers/mfd/da9150-core.c | 4 +---
> drivers/mfd/dm355evm_msp.c | 3 +--
> drivers/mfd/ene-kb3930.c | 4 +---
> drivers/mfd/gateworks-gsc.c | 4 +---
> drivers/mfd/intel_soc_pmic_core.c | 4 +---
> drivers/mfd/iqs62x.c | 4 +---
> drivers/mfd/lm3533-core.c | 4 +---
> drivers/mfd/lp8788.c | 3 +--
> drivers/mfd/madera-i2c.c | 4 +---
> drivers/mfd/max14577.c | 4 +---
> drivers/mfd/max77693.c | 4 +---
> drivers/mfd/max8907.c | 4 +---
> drivers/mfd/max8925-i2c.c | 3 +--
> drivers/mfd/mc13xxx-i2c.c | 3 +--
> drivers/mfd/menelaus.c | 3 +--
> drivers/mfd/ntxec.c | 4 +---
> drivers/mfd/palmas.c | 4 +---
> drivers/mfd/pcf50633-core.c | 4 +---
> drivers/mfd/retu-mfd.c | 4 +---
> drivers/mfd/rk808.c | 4 +---
> drivers/mfd/rn5t618.c | 4 +---
> drivers/mfd/rsmu_i2c.c | 4 +---
> drivers/mfd/rt4831.c | 4 +---
> drivers/mfd/si476x-i2c.c | 4 +---
> drivers/mfd/stmfx.c | 4 +---
> drivers/mfd/stmpe-i2c.c | 4 +---
> drivers/mfd/tc3589x.c | 4 +---
> drivers/mfd/tps6105x.c | 4 +---
> drivers/mfd/tps65010.c | 3 +--
> drivers/mfd/tps65086.c | 4 +---
> drivers/mfd/tps65217.c | 4 +---
> drivers/mfd/tps6586x.c | 3 +--
> drivers/mfd/tps65912-i2c.c | 4 +---
> drivers/mfd/twl-core.c | 3 +--
> drivers/mfd/twl6040.c | 4 +---
> drivers/mfd/wm8994-core.c | 4 +---
> drivers/misc/ad525x_dpot-i2c.c | 3 +--
> drivers/misc/apds9802als.c | 3 +--
> drivers/misc/apds990x.c | 3 +--
> drivers/misc/bh1770glc.c | 4 +---
> drivers/misc/ds1682.c | 3 +--
> drivers/misc/eeprom/at24.c | 4 +---
> drivers/misc/eeprom/ee1004.c | 4 +---
> drivers/misc/eeprom/eeprom.c | 4 +---
> drivers/misc/eeprom/idt_89hpesx.c | 4 +---
> drivers/misc/eeprom/max6875.c | 4 +---
> drivers/misc/hmc6352.c | 3 +--
> drivers/misc/ics932s401.c | 5 ++---
> drivers/misc/isl29003.c | 3 +--
> drivers/misc/isl29020.c | 3 +--
> drivers/misc/lis3lv02d/lis3lv02d_i2c.c | 3 +--
> drivers/misc/tsl2550.c | 4 +---
> drivers/mtd/maps/pismo.c | 4 +---
> drivers/net/dsa/lan9303_i2c.c | 6 ++----
> drivers/net/dsa/microchip/ksz9477_i2c.c | 4 +---
> drivers/net/dsa/xrs700x/xrs700x_i2c.c | 6 ++----
> drivers/net/ethernet/mellanox/mlxsw/i2c.c | 4 +---
> drivers/net/mctp/mctp-i2c.c | 3 +--
> drivers/nfc/fdp/i2c.c | 4 +---
> drivers/nfc/microread/i2c.c | 4 +---
> drivers/nfc/nfcmrvl/i2c.c | 4 +---
> drivers/nfc/nxp-nci/i2c.c | 4 +---
> drivers/nfc/pn533/i2c.c | 4 +---
> drivers/nfc/pn544/i2c.c | 4 +---
> drivers/nfc/s3fwrn5/i2c.c | 4 +---
> drivers/nfc/st-nci/i2c.c | 4 +---
> drivers/nfc/st21nfca/i2c.c | 4 +---
> drivers/of/unittest.c | 6 ++----
> drivers/platform/chrome/cros_ec_i2c.c | 4 +---
> drivers/platform/surface/surface3_power.c | 4 +---
> drivers/platform/x86/asus-tf103c-dock.c | 4 +---
> drivers/platform/x86/intel/int3472/tps68470.c | 4 +---
> drivers/power/supply/bq2415x_charger.c | 4 +---
> drivers/power/supply/bq24190_charger.c | 4 +---
> drivers/power/supply/bq24257_charger.c | 4 +---
> drivers/power/supply/bq25890_charger.c | 4 +---
> drivers/power/supply/bq27xxx_battery_i2c.c | 4 +---
> drivers/power/supply/cw2015_battery.c | 3 +--
> drivers/power/supply/ds2782_battery.c | 4 +---
> drivers/power/supply/lp8727_charger.c | 3 +--
> drivers/power/supply/rt5033_battery.c | 4 +---
> drivers/power/supply/rt9455_charger.c | 4 +---
> drivers/power/supply/smb347-charger.c | 4 +---
> drivers/power/supply/z2_battery.c | 4 +---
> drivers/pwm/pwm-pca9685.c | 4 +---
> drivers/regulator/da9121-regulator.c | 3 +--
> drivers/regulator/lp8755.c | 4 +---
> drivers/regulator/rpi-panel-attiny-regulator.c | 4 +---
> drivers/rtc/rtc-bq32k.c | 4 +---
> drivers/rtc/rtc-ds1374.c | 4 +---
> drivers/rtc/rtc-isl12026.c | 3 +--
> drivers/rtc/rtc-m41t80.c | 4 +---
> drivers/rtc/rtc-rs5c372.c | 3 +--
> drivers/rtc/rtc-x1205.c | 3 +--
> drivers/staging/media/atomisp/i2c/atomisp-gc0310.c | 4 +---
> drivers/staging/media/atomisp/i2c/atomisp-gc2235.c | 4 +---
> drivers/staging/media/atomisp/i2c/atomisp-lm3554.c | 4 +---
> drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c | 3 +--
> drivers/staging/media/atomisp/i2c/atomisp-ov2680.c | 4 +---
> drivers/staging/media/atomisp/i2c/atomisp-ov2722.c | 4 +---
> drivers/staging/media/atomisp/i2c/ov5693/atomisp-ov5693.c | 4 +---
> drivers/staging/media/max96712/max96712.c | 4 +---
> drivers/staging/most/i2c/i2c.c | 4 +---
> drivers/staging/olpc_dcon/olpc_dcon.c | 4 +---
> drivers/tty/serial/sc16is7xx.c | 4 +---
> drivers/usb/misc/usb3503.c | 4 +---
> drivers/usb/phy/phy-isp1301-omap.c | 4 +---
> drivers/usb/phy/phy-isp1301.c | 4 +---
> drivers/usb/typec/hd3ss3220.c | 4 +---
> drivers/usb/typec/mux/fsa4480.c | 4 +---
> drivers/usb/typec/mux/pi3usb30532.c | 3 +--
> drivers/usb/typec/rt1719.c | 4 +---
> drivers/usb/typec/stusb160x.c | 4 +---
> drivers/usb/typec/tcpm/fusb302.c | 4 +---
> drivers/usb/typec/tcpm/tcpci.c | 4 +---
> drivers/usb/typec/tcpm/tcpci_maxim.c | 4 +---
> drivers/usb/typec/tcpm/tcpci_rt1711h.c | 3 +--
> drivers/usb/typec/tipd/core.c | 4 +---
> drivers/usb/typec/ucsi/ucsi_ccg.c | 4 +---
> drivers/usb/typec/wusb3801.c | 4 +---
> drivers/video/backlight/adp8860_bl.c | 4 +---
> drivers/video/backlight/adp8870_bl.c | 4 +---
> drivers/video/backlight/arcxcnn_bl.c | 4 +---
> drivers/video/backlight/bd6107.c | 4 +---
> drivers/video/backlight/lm3630a_bl.c | 3 +--
> drivers/video/backlight/lm3639_bl.c | 3 +--
> drivers/video/backlight/lp855x_bl.c | 4 +---
> drivers/video/backlight/lv5207lp.c | 4 +---
> drivers/video/backlight/tosa_bl.c | 3 +--
> drivers/video/fbdev/matrox/matroxfb_maven.c | 3 +--
> drivers/video/fbdev/ssd1307fb.c | 4 +---
> drivers/w1/masters/ds2482.c | 3 +--
> drivers/watchdog/ziirave_wdt.c | 4 +---
> include/linux/i2c.h | 2 +-
> lib/Kconfig.kasan | 1 +
> sound/aoa/codecs/onyx.c | 3 +--
> sound/aoa/codecs/tas.c | 3 +--
> sound/pci/hda/cs35l41_hda_i2c.c | 4 +---
> sound/ppc/keywest.c | 6 ++----
> sound/soc/codecs/adau1761-i2c.c | 3 +--
> sound/soc/codecs/adau1781-i2c.c | 3 +--
> sound/soc/codecs/ak4375.c | 4 +---
> sound/soc/codecs/ak4458.c | 4 +---
> sound/soc/codecs/ak4641.c | 4 +---
> sound/soc/codecs/ak5558.c | 4 +---
> sound/soc/codecs/cs35l32.c | 4 +---
> sound/soc/codecs/cs35l33.c | 4 +---
> sound/soc/codecs/cs35l34.c | 4 +---
> sound/soc/codecs/cs35l35.c | 4 +---
> sound/soc/codecs/cs35l36.c | 4 +---
> sound/soc/codecs/cs35l41-i2c.c | 4 +---
> sound/soc/codecs/cs35l45-i2c.c | 4 +---
> sound/soc/codecs/cs4234.c | 4 +---
> sound/soc/codecs/cs4265.c | 4 +---
> sound/soc/codecs/cs4270.c | 4 +---
> sound/soc/codecs/cs42l42.c | 4 +---
> sound/soc/codecs/cs42l51-i2c.c | 4 +---
> sound/soc/codecs/cs42l56.c | 3 +--
> sound/soc/codecs/cs42xx8-i2c.c | 4 +---
> sound/soc/codecs/cs43130.c | 4 +---
> sound/soc/codecs/cs4349.c | 4 +---
> sound/soc/codecs/cs53l30.c | 4 +---
> sound/soc/codecs/cx2072x.c | 3 +--
> sound/soc/codecs/max98090.c | 4 +---
> sound/soc/codecs/max9860.c | 3 +--
> sound/soc/codecs/max98927.c | 4 +---
> sound/soc/codecs/mt6660.c | 3 +--
> sound/soc/codecs/nau8821.c | 4 +---
> sound/soc/codecs/nau8825.c | 6 ++----
> sound/soc/codecs/pcm1789-i2c.c | 4 +---
> sound/soc/codecs/pcm3168a-i2c.c | 4 +---
> sound/soc/codecs/pcm512x-i2c.c | 3 +--
> sound/soc/codecs/rt274.c | 4 +---
> sound/soc/codecs/rt286.c | 4 +---
> sound/soc/codecs/rt298.c | 4 +---
> sound/soc/codecs/rt5616.c | 6 ++----
> sound/soc/codecs/rt5631.c | 6 ++----
> sound/soc/codecs/rt5645.c | 4 +---
> sound/soc/codecs/rt5663.c | 4 +---
> sound/soc/codecs/rt5670.c | 4 +---
> sound/soc/codecs/rt5677.c | 4 +---
> sound/soc/codecs/rt5682-i2c.c | 4 +---
> sound/soc/codecs/rt5682s.c | 4 +---
> sound/soc/codecs/rt9120.c | 3 +--
> sound/soc/codecs/sgtl5000.c | 4 +---
> sound/soc/codecs/sta350.c | 6 ++----
> sound/soc/codecs/tas2552.c | 3 +--
> sound/soc/codecs/tas5086.c | 6 ++----
> sound/soc/codecs/tas571x.c | 4 +---
> sound/soc/codecs/tas5805m.c | 3 +--
> sound/soc/codecs/tas6424.c | 4 +---
> sound/soc/codecs/tlv320adc3xxx.c | 3 +--
> sound/soc/codecs/tlv320aic32x4-i2c.c | 4 +---
> sound/soc/codecs/tlv320aic3x-i2c.c | 4 +---
> sound/soc/codecs/tlv320dac33.c | 4 +---
> sound/soc/codecs/wm1250-ev1.c | 4 +---
> sound/soc/codecs/wm2200.c | 4 +---
> sound/soc/codecs/wm5100.c | 4 +---
> sound/soc/codecs/wm8804-i2c.c | 3 +--
> sound/soc/codecs/wm8900.c | 6 ++----
> sound/soc/codecs/wm8903.c | 4 +---
> sound/soc/codecs/wm8960.c | 6 ++----
> sound/soc/codecs/wm8962.c | 3 +--
> sound/soc/codecs/wm8993.c | 4 +---
> sound/soc/codecs/wm8996.c | 4 +---
> sound/soc/codecs/wm9081.c | 6 ++----
Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
for the drivers I'm involved in development of.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 6/6] i2c: Make remove callback return void
[not found] ` <20220628140313.74984-7-u.kleine-koenig@pengutronix.de>
` (2 preceding siblings ...)
2022-06-29 10:40 ` Andy Shevchenko
@ 2022-06-29 10:53 ` Petr Machata
[not found] ` <CAPAsAGwP4Mw_CJfsi7oapABdTBwO1HfiQux6X4UahspU74VjtQ@mail.gmail.com>
` (4 subsequent siblings)
8 siblings, 0 replies; 25+ messages in thread
From: Petr Machata @ 2022-06-29 10:53 UTC (permalink / raw)
To: Uwe Kleine-König; +Cc: netdev, linux-i2c, Ido Schimmel, Wolfram Sang
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> writes:
> drivers/net/ethernet/mellanox/mlxsw/i2c.c | 4 +---
> diff --git a/drivers/net/ethernet/mellanox/mlxsw/i2c.c b/drivers/net/ethernet/mellanox/mlxsw/i2c.c
> index ce843ea91464..50b7121a5e3c 100644
> --- a/drivers/net/ethernet/mellanox/mlxsw/i2c.c
> +++ b/drivers/net/ethernet/mellanox/mlxsw/i2c.c
> @@ -656,14 +656,12 @@ static int mlxsw_i2c_probe(struct i2c_client *client,
> return err;
> }
>
> -static int mlxsw_i2c_remove(struct i2c_client *client)
> +static void mlxsw_i2c_remove(struct i2c_client *client)
> {
> struct mlxsw_i2c *mlxsw_i2c = i2c_get_clientdata(client);
>
> mlxsw_core_bus_device_unregister(mlxsw_i2c->core, false);
> mutex_destroy(&mlxsw_i2c->cmd.lock);
> -
> - return 0;
> }
>
> int mlxsw_i2c_driver_register(struct i2c_driver *i2c_driver)
For mlxsw:
Reviewed-by: Petr Machata <petrm@nvidia.com>
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 6/6] i2c: Make remove callback return void
[not found] ` <CAPAsAGwP4Mw_CJfsi7oapABdTBwO1HfiQux6X4UahspU74VjtQ@mail.gmail.com>
@ 2022-06-29 13:35 ` Uwe Kleine-König
0 siblings, 0 replies; 25+ messages in thread
From: Uwe Kleine-König @ 2022-06-29 13:35 UTC (permalink / raw)
To: Andrey Ryabinin
Cc: Wolfram Sang, dri-devel, linux-omap, linux-serial, linux-pm,
linux-mtd, linux-leds, linux-stm32, linux-crypto,
Pengutronix Kernel Team, devicetree, linux-i2c, linux-clk,
alsa-devel, linux-watchdog, acpi4asus-user, linux-rpi-kernel,
linux-arm-kernel, linux-gpio, linux-usb, platform-driver-x86,
linux-integrity, linux-iio, linux-rtc, netdev, chrome-platform,
linux-input, linuxppc-dev, openipmi-developer, linux-hwmon,
linux-fbdev, patches, UNGLinuxDriver, linux-pwm, linux-mediatek,
linux-staging
[-- Attachment #1: Type: text/plain, Size: 1833 bytes --]
[Dropped most people from Cc, keeping only lists]
On Wed, Jun 29, 2022 at 04:11:26PM +0300, Andrey Ryabinin wrote:
> On 6/28/22 17:03, Uwe Kleine-König wrote:
> > From: Uwe Kleine-König <uwe@kleine-koenig.org>
> >
> > The value returned by an i2c driver's remove function is mostly ignored.
> > (Only an error message is printed if the value is non-zero that the
> > error is ignored.)
> >
> > So change the prototype of the remove function to return no value. This
> > way driver authors are not tempted to assume that passing an error to
> > the upper layer is a good idea. All drivers are adapted accordingly.
> > There is no intended change of behaviour, all callbacks were prepared to
> > return 0 before.
> >
> > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > ---
> | 2 +-
> > lib/Kconfig.kasan | 1 +
>
> > diff --git a/lib/Kconfig.kasan b/lib/Kconfig.kasan
> > index f0973da583e0..366e61639cb2 100644
> > --- a/lib/Kconfig.kasan
> > +++ b/lib/Kconfig.kasan
> > @@ -149,6 +149,7 @@ config KASAN_STACK
> > depends on KASAN_GENERIC || KASAN_SW_TAGS
> > depends on !ARCH_DISABLE_KASAN_INLINE
> > default y if CC_IS_GCC
> > + depends on !ARM
> > help
> > Disables stack instrumentation and thus KASAN's ability to detect
> > out-of-bounds bugs in stack variables.
>
>
> What is this doing here?
Huh, that is wrong. I needed that for build testing, but it shouldn't
have been added to the patch. I'm dropping that for the final
submission.
Thanks for spotting.
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 --]
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 6/6] i2c: Make remove callback return void
[not found] ` <20220628140313.74984-7-u.kleine-koenig@pengutronix.de>
` (4 preceding siblings ...)
[not found] ` <CAPAsAGwP4Mw_CJfsi7oapABdTBwO1HfiQux6X4UahspU74VjtQ@mail.gmail.com>
@ 2022-06-29 14:25 ` Maximilian Luz
2022-06-29 21:20 ` Luca Ceresoli
` (2 subsequent siblings)
8 siblings, 0 replies; 25+ messages in thread
From: Maximilian Luz @ 2022-06-29 14:25 UTC (permalink / raw)
To: Uwe Kleine-König, Wolfram Sang
Cc: Uwe Kleine-König, Miguel Ojeda, Jarkko Sakkinen,
Stephen Boyd, David S. Miller, Jiri Kosina, Benjamin Tissoires,
Luka Perkov, Dmitry Torokhov, Bastien Nocera, Hans de Goede,
Mauro Carvalho Chehab, Shawn Tu, Manivannan Sadhasivam,
Pengutronix Kernel Team, Kyungmin Park, Andy Shevchenko,
Arnd Bergmann, Greg Kroah-Hartman, Jakub Kicinski, Rob Herring,
Mark Gross, Pali Rohár, Mark Brown, Nathan Chancellor,
Bjorn Andersson, linux-i2c, linux-arm-kernel, linuxppc-dev,
openipmi-developer, linux-integrity, linux-clk, linux-crypto,
linux-gpio, dri-devel, chrome-platform, linux-rpi-kernel,
linux-input, linux-hwmon, linux-iio, linux-stm32, linux-leds,
linux-media, patches, alsa-devel, linux-omap, linux-mtd, netdev,
devicetree, platform-driver-x86, acpi4asus-user, linux-pm,
linux-pwm, linux-rtc, linux-staging, linux-serial, linux-usb,
linux-fbdev, linux-watchdog, kasan-dev, linux-mediatek
On 6/28/22 16:03, Uwe Kleine-König wrote:
> From: Uwe Kleine-König <uwe@kleine-koenig.org>
>
> The value returned by an i2c driver's remove function is mostly ignored.
> (Only an error message is printed if the value is non-zero that the
> error is ignored.)
>
> So change the prototype of the remove function to return no value. This
> way driver authors are not tempted to assume that passing an error to
> the upper layer is a good idea. All drivers are adapted accordingly.
> There is no intended change of behaviour, all callbacks were prepared to
> return 0 before.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
[...]
> drivers/platform/surface/surface3_power.c | 4 +---
[...]
> diff --git a/drivers/platform/surface/surface3_power.c b/drivers/platform/surface/surface3_power.c
> index 444ec81ba02d..3b20dddeb815 100644
> --- a/drivers/platform/surface/surface3_power.c
> +++ b/drivers/platform/surface/surface3_power.c
> @@ -554,7 +554,7 @@ static int mshw0011_probe(struct i2c_client *client)
> return error;
> }
>
> -static int mshw0011_remove(struct i2c_client *client)
> +static void mshw0011_remove(struct i2c_client *client)
> {
> struct mshw0011_data *cdata = i2c_get_clientdata(client);
>
> @@ -564,8 +564,6 @@ static int mshw0011_remove(struct i2c_client *client)
> kthread_stop(cdata->poll_task);
>
> i2c_unregister_device(cdata->bat0);
> -
> - return 0;
> }
>
> static const struct acpi_device_id mshw0011_acpi_match[] = {
For the quoted above:
Reviewed-by: Maximilian Luz <luzmaximilian@gmail.com>
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 6/6] i2c: Make remove callback return void
[not found] ` <20220628140313.74984-7-u.kleine-koenig@pengutronix.de>
` (5 preceding siblings ...)
2022-06-29 14:25 ` Maximilian Luz
@ 2022-06-29 21:20 ` Luca Ceresoli
2022-07-05 10:08 ` Jean Delvare
2022-07-06 9:13 ` Vladimir Oltean
8 siblings, 0 replies; 25+ messages in thread
From: Luca Ceresoli @ 2022-06-29 21:20 UTC (permalink / raw)
To: Uwe Kleine-König, Wolfram Sang
Cc: linux-i2c, linux-arm-kernel, linuxppc-dev, openipmi-developer,
linux-integrity, linux-clk, linux-crypto, linux-gpio, dri-devel,
chrome-platform, linux-rpi-kernel, linux-input, linux-hwmon,
linux-iio, linux-stm32, linux-leds, linux-media, patches,
alsa-devel, linux-omap, linux-mtd, netdev, devicetree,
platform-driver-x86, acpi4asus-user, linux-pm, linux-pwm,
linux-rtc, linux-staging, linux-serial, linux-usb, linux-fbdev,
linux-watchdog, kasan-dev, linux-mediatek
Hi,
[keeping only individuals and lists in Cc to avoid bounces]
On 28/06/22 16:03, Uwe Kleine-König wrote:
> From: Uwe Kleine-König <uwe@kleine-koenig.org>
>
> The value returned by an i2c driver's remove function is mostly ignored.
> (Only an error message is printed if the value is non-zero that the
> error is ignored.)
>
> So change the prototype of the remove function to return no value. This
> way driver authors are not tempted to assume that passing an error to
> the upper layer is a good idea. All drivers are adapted accordingly.
> There is no intended change of behaviour, all callbacks were prepared to
> return 0 before.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
For versaclock:
> diff --git a/drivers/clk/clk-versaclock5.c b/drivers/clk/clk-versaclock5.c
> index e7be3e54b9be..657493ecce4c 100644
> --- a/drivers/clk/clk-versaclock5.c
> +++ b/drivers/clk/clk-versaclock5.c
> @@ -1138,7 +1138,7 @@ static int vc5_probe(struct i2c_client *client)
> return ret;
> }
>
> -static int vc5_remove(struct i2c_client *client)
> +static void vc5_remove(struct i2c_client *client)
> {
> struct vc5_driver_data *vc5 = i2c_get_clientdata(client);
>
> @@ -1146,8 +1146,6 @@ static int vc5_remove(struct i2c_client *client)
>
> if (vc5->chip_info->flags & VC5_HAS_INTERNAL_XTAL)
> clk_unregister_fixed_rate(vc5->pin_xin);
> -
> - return 0;
> }
>
> static int __maybe_unused vc5_suspend(struct device *dev)
Reviewed-by: Luca Ceresoli <luca@lucaceresoli.net>
Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
--
Luca
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 0/6] i2c: Make remove callback return void
[not found] <20220628140313.74984-1-u.kleine-koenig@pengutronix.de>
` (5 preceding siblings ...)
[not found] ` <20220628140313.74984-7-u.kleine-koenig@pengutronix.de>
@ 2022-07-04 8:39 ` Uwe Kleine-König
2022-07-16 15:15 ` Uwe Kleine-König
6 siblings, 1 reply; 25+ messages in thread
From: Uwe Kleine-König @ 2022-07-04 8:39 UTC (permalink / raw)
To: Wolfram Sang, Johannes Holland, Amir Mizinski, Alexander Steffen,
Jarkko Sakkinen
Cc: kernel, linux-i2c, linux-integrity
[-- Attachment #1: Type: text/plain, Size: 7692 bytes --]
On Tue, Jun 28, 2022 at 04:03:06PM +0200, Uwe Kleine-König wrote:
> as announced in
> https://lore.kernel.org/linux-i2c/20220609091018.q52fhowlsdbdkct5@pengutronix.de
> I intend to change the remove prototype for i2c drivers to remove void.
>
> As this touches quite some drivers, the plan is to submit this change
> for inclusion after the next merge window and get it quickly into next
> that other subsystems have enough time to adapt.
>
> Still to give the opportunity to comment I send the patch set out based
> on v5.19-rc4. There are still a few patches in next that are required,
> namely:
>
> d04d46dd82ad iio:magnetometer:mbc150: Make bmc150_magn_remove() return void
> 7576bc05b360 iio:light:vcnl4035: Improve error reporting for problems during .remove()
> ab91da2f2574 iio:light:vcnl4000: Improve error reporting for problems during .remove()
> 5049646718d7 iio:light:us5182d: Improve error reporting for problems during .remove()
> be9f6004be88 iio:light:pa12203001: Improve error reporting for problems during .remove()
> 730cd2f54eba iio:chemical:ccs811: Improve error reporting for problems during .remove()
> a76209246d9f iio:chemical:atlas: Improve error reporting for problems during .remove()
> 8f760ce7affd iio:adc:ti-ads1015: Improve error reporting for problems during .remove()
> ffa952e95d8c iio:adc:ina2xx: Improve error reporting for problems during .remove()
> 48d1ae774099 iio: health: afe4404: Remove duplicated error reporting in .remove()
> 8dc0a72795e4 iio:light:tsl2583: Remove duplicated error reporting in .remove()
> 58a6df5580bb iio:light:stk3310: Remove duplicated error reporting in .remove()
> 44ceb791182a iio:light:opt3001: Remove duplicated error reporting in .remove()
> f0e34d262567 iio:light:jsa1212: Remove duplicated error reporting in .remove()
> 8d3d6baa4990 iio:light:isl29028: Remove duplicated error reporting in .remove()
> 5004e24a466c iio:light:bh1780: Remove duplicated error reporting in .remove()
> 1db6926d611d iio:accel:stk8ba50: Remove duplicated error reporting in .remove()
> 1aec857d50ce iio:accel:stk8312: Remove duplicated error reporting in .remove()
> aae59bdf2585 iio:accel:mc3230: Remove duplicated error reporting in .remove()
> 7df7563b16aa crypto: atmel-ecc - Remove duplicated error reporting in .remove()
> 99ad11e06be8 i2c: dummy: Drop no-op remove function
> 84965cc60e64 ASoC: cs35l45: Make cs35l45_remove() return void
> fb68cb963bb7 ASoC: da732x: Drop no-op remove function
> 3cce931a5e44 ASoC: lm49453: Drop no-op remove function
> 8a291eebeb63 ASoC: da7219: Drop no-op remove function
> 60391d788a22 ASoC: ak4642: Drop no-op remove function
> 51bd0abd873d extcon: fsa9480: Drop no-op remove function
>
> I hope and assume they will all be included in v5.20-rc1. There are 5
> more patches required that didn't made it into next yet (i.e. patches #1
> - #5 of this series).
>
> There are also two drivers in next that need adaption:
>
> drivers/gpu/drm/bridge/ti-dlpc3433.c
> drivers/tty/serial/max310x.c
There is now a third driver in next that is affected:
drivers/char/tpm/tpm_tis_i2c.c that was added with commit
88f3b0f519c068ad29c92e965239a7900a2deea3 to next.
A tree containing patched #1 to #5 merges just fine with next/master.
When merging patch 6 into the result the merge resolution looks as
follows:
diff --cc drivers/gpu/drm/bridge/parade-ps8640.c
index 31e88cb39f8a,a09d1828d8e1..000000000000
--- a/drivers/gpu/drm/bridge/parade-ps8640.c
+++ b/drivers/gpu/drm/bridge/parade-ps8640.c
diff --cc drivers/gpu/drm/bridge/ti-sn65dsi83.c
index dc26640e7d9b,8f93e374848c..000000000000
--- a/drivers/gpu/drm/bridge/ti-sn65dsi83.c
+++ b/drivers/gpu/drm/bridge/ti-sn65dsi83.c
@@@ -712,8 -731,7 +712,6 @@@ static void sn65dsi83_remove(struct i2c
struct sn65dsi83 *ctx = i2c_get_clientdata(client);
drm_bridge_remove(&ctx->bridge);
-
- return 0;
- of_node_put(ctx->host_node);
}
static struct i2c_device_id sn65dsi83_id[] = {
diff --cc drivers/iio/accel/bma400_i2c.c
index 1ba2a982ea73,90c99ab8c8f2..000000000000
--- a/drivers/iio/accel/bma400_i2c.c
+++ b/drivers/iio/accel/bma400_i2c.c
diff --cc drivers/input/keyboard/adp5588-keys.c
index 1a1a05d7cd42,b5666d650994..000000000000
--- a/drivers/input/keyboard/adp5588-keys.c
+++ b/drivers/input/keyboard/adp5588-keys.c
@@@ -590,21 -584,43 +590,20 @@@ static int adp5588_probe(struct i2c_cli
dev_info(&client->dev, "Rev.%d keypad, irq %d\n", revid, client->irq);
return 0;
-
- err_free_irq:
- free_irq(client->irq, kpad);
- cancel_delayed_work_sync(&kpad->work);
- err_unreg_dev:
- input_unregister_device(input);
- input = NULL;
- err_free_mem:
- input_free_device(input);
- kfree(kpad);
-
- return error;
}
- static int adp5588_remove(struct i2c_client *client)
+ static void adp5588_remove(struct i2c_client *client)
{
- struct adp5588_kpad *kpad = i2c_get_clientdata(client);
-
adp5588_write(client, CFG, 0);
- free_irq(client->irq, kpad);
- cancel_delayed_work_sync(&kpad->work);
- input_unregister_device(kpad->input);
- adp5588_gpio_remove(kpad);
- kfree(kpad);
+
+ /* all resources will be freed by devm */
- return 0;
}
-#ifdef CONFIG_PM
-static int adp5588_suspend(struct device *dev)
+static int __maybe_unused adp5588_suspend(struct device *dev)
{
- struct adp5588_kpad *kpad = dev_get_drvdata(dev);
- struct i2c_client *client = kpad->client;
+ struct i2c_client *client = to_i2c_client(dev);
disable_irq(client->irq);
- cancel_delayed_work_sync(&kpad->work);
-
- if (device_may_wakeup(&client->dev))
- enable_irq_wake(client->irq);
return 0;
}
diff --git a/drivers/char/tpm/tpm_tis_i2c.c b/drivers/char/tpm/tpm_tis_i2c.c
index 8e0686fe4eb1..5299e30657b8 100644
--- a/drivers/char/tpm/tpm_tis_i2c.c
+++ b/drivers/char/tpm/tpm_tis_i2c.c
@@ -351,13 +351,12 @@ static int tpm_tis_i2c_probe(struct i2c_client *dev,
NULL);
}
-static int tpm_tis_i2c_remove(struct i2c_client *client)
+static void tpm_tis_i2c_remove(struct i2c_client *client)
{
struct tpm_chip *chip = i2c_get_clientdata(client);
tpm_chip_unregister(chip);
tpm_tis_remove(chip);
- return 0;
}
static const struct i2c_device_id tpm_tis_i2c_id[] = {
diff --git a/drivers/gpu/drm/bridge/ti-dlpc3433.c b/drivers/gpu/drm/bridge/ti-dlpc3433.c
index 06e519798ac5..c1b94bc183e6 100644
--- a/drivers/gpu/drm/bridge/ti-dlpc3433.c
+++ b/drivers/gpu/drm/bridge/ti-dlpc3433.c
@@ -378,14 +378,12 @@ static int dlpc3433_probe(struct i2c_client *client)
return ret;
}
-static int dlpc3433_remove(struct i2c_client *client)
+static void dlpc3433_remove(struct i2c_client *client)
{
struct dlpc *dlpc = i2c_get_clientdata(client);
drm_bridge_remove(&dlpc->bridge);
of_node_put(dlpc->host_node);
-
- return 0;
}
static const struct i2c_device_id dlpc3433_id[] = {
diff --git a/drivers/tty/serial/max310x.c b/drivers/tty/serial/max310x.c
index e162bfb44080..8a4d0defa0cb 100644
--- a/drivers/tty/serial/max310x.c
+++ b/drivers/tty/serial/max310x.c
@@ -1616,11 +1616,9 @@ static int max310x_i2c_probe(struct i2c_client *client)
regmaps, client->irq);
}
-static int max310x_i2c_remove(struct i2c_client *client)
+static void max310x_i2c_remove(struct i2c_client *client)
{
max310x_remove(&client->dev);
-
- return 0;
}
static struct i2c_driver max310x_i2c_driver = {
--
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 --]
^ permalink raw reply related [flat|nested] 25+ messages in thread
* Re: [PATCH 6/6] i2c: Make remove callback return void
[not found] ` <20220628140313.74984-7-u.kleine-koenig@pengutronix.de>
` (6 preceding siblings ...)
2022-06-29 21:20 ` Luca Ceresoli
@ 2022-07-05 10:08 ` Jean Delvare
2022-07-05 10:36 ` Uwe Kleine-König
2022-07-06 9:13 ` Vladimir Oltean
8 siblings, 1 reply; 25+ messages in thread
From: Jean Delvare @ 2022-07-05 10:08 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: Wolfram Sang, Guenter Roeck, linux-i2c, linux-arm-kernel,
linuxppc-dev, openipmi-developer, linux-integrity, linux-clk,
linux-crypto, linux-gpio, dri-devel, chrome-platform,
linux-rpi-kernel, linux-input, linux-hwmon, linux-iio,
linux-stm32, linux-leds, linux-media, patches, alsa-devel,
linux-omap, linux-mtd, netdev, devicetree, platform-driver-x86,
acpi4asus-user, linux-pm, linux-pwm, linux-rtc, linux-staging,
linux-serial, linux-usb, linux-fbdev, linux-watchdog, kasan-dev,
linux-mediatek
On Tue, 28 Jun 2022 16:03:12 +0200, Uwe Kleine-König wrote:
> From: Uwe Kleine-König <uwe@kleine-koenig.org>
>
> The value returned by an i2c driver's remove function is mostly ignored.
> (Only an error message is printed if the value is non-zero that the
> error is ignored.)
>
> So change the prototype of the remove function to return no value. This
> way driver authors are not tempted to assume that passing an error to
> the upper layer is a good idea. All drivers are adapted accordingly.
> There is no intended change of behaviour, all callbacks were prepared to
> return 0 before.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
That's a huge change for a relatively small benefit, but if this is
approved by the I2C core maintainer then fine with me. For:
> drivers/hwmon/adc128d818.c | 4 +---
> drivers/hwmon/adt7470.c | 3 +--
> drivers/hwmon/asb100.c | 6 ++----
> drivers/hwmon/asc7621.c | 4 +---
> drivers/hwmon/dme1737.c | 4 +---
> drivers/hwmon/f75375s.c | 5 ++---
> drivers/hwmon/fschmd.c | 6 ++----
> drivers/hwmon/ftsteutates.c | 3 +--
> drivers/hwmon/ina209.c | 4 +---
> drivers/hwmon/ina3221.c | 4 +---
> drivers/hwmon/jc42.c | 3 +--
> drivers/hwmon/mcp3021.c | 4 +---
> drivers/hwmon/occ/p8_i2c.c | 4 +---
> drivers/hwmon/pcf8591.c | 3 +--
> drivers/hwmon/smm665.c | 3 +--
> drivers/hwmon/tps23861.c | 4 +---
> drivers/hwmon/w83781d.c | 4 +---
> drivers/hwmon/w83791d.c | 6 ++----
> drivers/hwmon/w83792d.c | 6 ++----
> drivers/hwmon/w83793.c | 6 ++----
> drivers/hwmon/w83795.c | 4 +---
> drivers/hwmon/w83l785ts.c | 6 ++----
> drivers/i2c/i2c-core-base.c | 6 +-----
> drivers/i2c/i2c-slave-eeprom.c | 4 +---
> drivers/i2c/i2c-slave-testunit.c | 3 +--
> drivers/i2c/i2c-smbus.c | 3 +--
> drivers/i2c/muxes/i2c-mux-ltc4306.c | 4 +---
> drivers/i2c/muxes/i2c-mux-pca9541.c | 3 +--
> drivers/i2c/muxes/i2c-mux-pca954x.c | 3 +--
Reviewed-by: Jean Delvare <jdelvare@suse.de>
--
Jean Delvare
SUSE L3 Support
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 6/6] i2c: Make remove callback return void
2022-07-05 10:08 ` Jean Delvare
@ 2022-07-05 10:36 ` Uwe Kleine-König
0 siblings, 0 replies; 25+ messages in thread
From: Uwe Kleine-König @ 2022-07-05 10:36 UTC (permalink / raw)
To: Jean Delvare
Cc: Wolfram Sang, Guenter Roeck, linux-i2c, linux-arm-kernel,
linuxppc-dev, openipmi-developer, linux-integrity, linux-clk,
linux-crypto, linux-gpio, dri-devel, chrome-platform,
linux-rpi-kernel, linux-input, linux-hwmon, linux-iio,
linux-stm32, linux-leds, linux-media, patches, alsa-devel,
linux-omap, linux-mtd, netdev, devicetree, platform-driver-x86,
acpi4asus-user, linux-pm, linux-pwm, linux-rtc, linux-staging,
linux-serial, linux-usb, linux-fbdev, linux-watchdog, kasan-dev,
linux-mediatek
[-- Attachment #1: Type: text/plain, Size: 3584 bytes --]
On Tue, Jul 05, 2022 at 12:08:52PM +0200, Jean Delvare wrote:
> On Tue, 28 Jun 2022 16:03:12 +0200, Uwe Kleine-König wrote:
> > From: Uwe Kleine-König <uwe@kleine-koenig.org>
> >
> > The value returned by an i2c driver's remove function is mostly ignored.
> > (Only an error message is printed if the value is non-zero that the
> > error is ignored.)
> >
> > So change the prototype of the remove function to return no value. This
> > way driver authors are not tempted to assume that passing an error to
> > the upper layer is a good idea. All drivers are adapted accordingly.
> > There is no intended change of behaviour, all callbacks were prepared to
> > return 0 before.
> >
> > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > ---
>
> That's a huge change for a relatively small benefit, but if this is
> approved by the I2C core maintainer then fine with me. For:
Agreed, it's huge. The benefit isn't really measureable, the motivation
is to improve the situation for driver authors who with the change
cannot make wrong assumptions about what to return in .remove(). During
the preparation this uncovered a few bugs. See for example
bbc126ae381cf0a27822c1f822d0aeed74cc40d9.
> > drivers/hwmon/adc128d818.c | 4 +---
> > drivers/hwmon/adt7470.c | 3 +--
> > drivers/hwmon/asb100.c | 6 ++----
> > drivers/hwmon/asc7621.c | 4 +---
> > drivers/hwmon/dme1737.c | 4 +---
> > drivers/hwmon/f75375s.c | 5 ++---
> > drivers/hwmon/fschmd.c | 6 ++----
> > drivers/hwmon/ftsteutates.c | 3 +--
> > drivers/hwmon/ina209.c | 4 +---
> > drivers/hwmon/ina3221.c | 4 +---
> > drivers/hwmon/jc42.c | 3 +--
> > drivers/hwmon/mcp3021.c | 4 +---
> > drivers/hwmon/occ/p8_i2c.c | 4 +---
> > drivers/hwmon/pcf8591.c | 3 +--
> > drivers/hwmon/smm665.c | 3 +--
> > drivers/hwmon/tps23861.c | 4 +---
> > drivers/hwmon/w83781d.c | 4 +---
> > drivers/hwmon/w83791d.c | 6 ++----
> > drivers/hwmon/w83792d.c | 6 ++----
> > drivers/hwmon/w83793.c | 6 ++----
> > drivers/hwmon/w83795.c | 4 +---
> > drivers/hwmon/w83l785ts.c | 6 ++----
> > drivers/i2c/i2c-core-base.c | 6 +-----
> > drivers/i2c/i2c-slave-eeprom.c | 4 +---
> > drivers/i2c/i2c-slave-testunit.c | 3 +--
> > drivers/i2c/i2c-smbus.c | 3 +--
> > drivers/i2c/muxes/i2c-mux-ltc4306.c | 4 +---
> > drivers/i2c/muxes/i2c-mux-pca9541.c | 3 +--
> > drivers/i2c/muxes/i2c-mux-pca954x.c | 3 +--
>
> Reviewed-by: Jean Delvare <jdelvare@suse.de>
Thanks
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 --]
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 6/6] i2c: Make remove callback return void
[not found] ` <20220628140313.74984-7-u.kleine-koenig@pengutronix.de>
` (7 preceding siblings ...)
2022-07-05 10:08 ` Jean Delvare
@ 2022-07-06 9:13 ` Vladimir Oltean
2022-07-06 9:31 ` Uwe Kleine-König
8 siblings, 1 reply; 25+ messages in thread
From: Vladimir Oltean @ 2022-07-06 9:13 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: Wolfram Sang, Uwe Kleine-König, linux-i2c, linux-arm-kernel,
linuxppc-dev, openipmi-developer, linux-integrity, linux-clk,
linux-crypto, linux-gpio, dri-devel, chrome-platform,
linux-rpi-kernel, linux-input, linux-hwmon, linux-iio,
linux-stm32, linux-leds, linux-media, patches, alsa-devel,
linux-omap, linux-mtd, netdev, devicetree, platform-driver-x86,
acpi4asus-user, linux-pm, linux-pwm, linux-rtc, linux-staging,
linux-serial, linux-usb, linux-fbdev, linux-watchdog, kasan-dev,
linux-mediatek
On Tue, Jun 28, 2022 at 04:03:12PM +0200, Uwe Kleine-König wrote:
> From: Uwe Kleine-König <uwe@kleine-koenig.org>
>
> The value returned by an i2c driver's remove function is mostly ignored.
> (Only an error message is printed if the value is non-zero that the
> error is ignored.)
>
> So change the prototype of the remove function to return no value. This
> way driver authors are not tempted to assume that passing an error to
> the upper layer is a good idea. All drivers are adapted accordingly.
> There is no intended change of behaviour, all callbacks were prepared to
> return 0 before.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
Assuming you remove the spurious kasan change:
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 6/6] i2c: Make remove callback return void
2022-07-06 9:13 ` Vladimir Oltean
@ 2022-07-06 9:31 ` Uwe Kleine-König
0 siblings, 0 replies; 25+ messages in thread
From: Uwe Kleine-König @ 2022-07-06 9:31 UTC (permalink / raw)
To: Vladimir Oltean
Cc: Wolfram Sang, Uwe Kleine-König, linux-i2c, linux-arm-kernel,
linuxppc-dev, openipmi-developer, linux-integrity, linux-clk,
linux-crypto, linux-gpio, dri-devel, chrome-platform,
linux-rpi-kernel, linux-input, linux-hwmon, linux-iio,
linux-stm32, linux-leds, linux-media, patches, alsa-devel,
linux-omap, linux-mtd, netdev, devicetree, platform-driver-x86,
acpi4asus-user, linux-pm, linux-pwm, linux-rtc, linux-staging,
linux-serial, linux-usb, linux-fbdev, linux-watchdog, kasan-dev,
linux-mediatek
[-- Attachment #1: Type: text/plain, Size: 1173 bytes --]
On Wed, Jul 06, 2022 at 12:13:15PM +0300, Vladimir Oltean wrote:
> On Tue, Jun 28, 2022 at 04:03:12PM +0200, Uwe Kleine-König wrote:
> > From: Uwe Kleine-König <uwe@kleine-koenig.org>
> >
> > The value returned by an i2c driver's remove function is mostly ignored.
> > (Only an error message is printed if the value is non-zero that the
> > error is ignored.)
> >
> > So change the prototype of the remove function to return no value. This
> > way driver authors are not tempted to assume that passing an error to
> > the upper layer is a good idea. All drivers are adapted accordingly.
> > There is no intended change of behaviour, all callbacks were prepared to
> > return 0 before.
> >
> > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > ---
>
> Assuming you remove the spurious kasan change:
It's already gone in my tree, see
https://git.pengutronix.de/cgit/ukl/linux/commit/?h=i2c-remove-void
> Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Thanks
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 --]
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 0/6] i2c: Make remove callback return void
2022-07-04 8:39 ` [PATCH 0/6] " Uwe Kleine-König
@ 2022-07-16 15:15 ` Uwe Kleine-König
2022-07-18 4:18 ` Krzysztof Hałasa
2022-08-11 12:40 ` Uwe Kleine-König
0 siblings, 2 replies; 25+ messages in thread
From: Uwe Kleine-König @ 2022-07-16 15:15 UTC (permalink / raw)
To: Wolfram Sang, Johannes Holland, Amir Mizinski, Alexander Steffen,
Jarkko Sakkinen, Krzysztof Hałasa, Sakari Ailus,
Mauro Carvalho Chehab
Cc: linux-integrity, linux-i2c, kernel
[-- Attachment #1: Type: text/plain, Size: 4656 bytes --]
Hello,
On Mon, Jul 04, 2022 at 10:39:47AM +0200, Uwe Kleine-König wrote:
> On Tue, Jun 28, 2022 at 04:03:06PM +0200, Uwe Kleine-König wrote:
> > as announced in
> > https://lore.kernel.org/linux-i2c/20220609091018.q52fhowlsdbdkct5@pengutronix.de
> > I intend to change the remove prototype for i2c drivers to remove void.
> >
> > As this touches quite some drivers, the plan is to submit this change
> > for inclusion after the next merge window and get it quickly into next
> > that other subsystems have enough time to adapt.
> >
> > Still to give the opportunity to comment I send the patch set out based
> > on v5.19-rc4. There are still a few patches in next that are required,
> > namely:
> >
> > d04d46dd82ad iio:magnetometer:mbc150: Make bmc150_magn_remove() return void
> > 7576bc05b360 iio:light:vcnl4035: Improve error reporting for problems during .remove()
> > ab91da2f2574 iio:light:vcnl4000: Improve error reporting for problems during .remove()
> > 5049646718d7 iio:light:us5182d: Improve error reporting for problems during .remove()
> > be9f6004be88 iio:light:pa12203001: Improve error reporting for problems during .remove()
> > 730cd2f54eba iio:chemical:ccs811: Improve error reporting for problems during .remove()
> > a76209246d9f iio:chemical:atlas: Improve error reporting for problems during .remove()
> > 8f760ce7affd iio:adc:ti-ads1015: Improve error reporting for problems during .remove()
> > ffa952e95d8c iio:adc:ina2xx: Improve error reporting for problems during .remove()
> > 48d1ae774099 iio: health: afe4404: Remove duplicated error reporting in .remove()
> > 8dc0a72795e4 iio:light:tsl2583: Remove duplicated error reporting in .remove()
> > 58a6df5580bb iio:light:stk3310: Remove duplicated error reporting in .remove()
> > 44ceb791182a iio:light:opt3001: Remove duplicated error reporting in .remove()
> > f0e34d262567 iio:light:jsa1212: Remove duplicated error reporting in .remove()
> > 8d3d6baa4990 iio:light:isl29028: Remove duplicated error reporting in .remove()
> > 5004e24a466c iio:light:bh1780: Remove duplicated error reporting in .remove()
> > 1db6926d611d iio:accel:stk8ba50: Remove duplicated error reporting in .remove()
> > 1aec857d50ce iio:accel:stk8312: Remove duplicated error reporting in .remove()
> > aae59bdf2585 iio:accel:mc3230: Remove duplicated error reporting in .remove()
> > 7df7563b16aa crypto: atmel-ecc - Remove duplicated error reporting in .remove()
> > 99ad11e06be8 i2c: dummy: Drop no-op remove function
> > 84965cc60e64 ASoC: cs35l45: Make cs35l45_remove() return void
> > fb68cb963bb7 ASoC: da732x: Drop no-op remove function
> > 3cce931a5e44 ASoC: lm49453: Drop no-op remove function
> > 8a291eebeb63 ASoC: da7219: Drop no-op remove function
> > 60391d788a22 ASoC: ak4642: Drop no-op remove function
> > 51bd0abd873d extcon: fsa9480: Drop no-op remove function
> >
> > I hope and assume they will all be included in v5.20-rc1. There are 5
> > more patches required that didn't made it into next yet (i.e. patches #1
> > - #5 of this series).
> >
> > There are also two drivers in next that need adaption:
> >
> > drivers/gpu/drm/bridge/ti-dlpc3433.c
> > drivers/tty/serial/max310x.c
>
> There is now a third driver in next that is affected:
> drivers/char/tpm/tpm_tis_i2c.c that was added with commit
> 88f3b0f519c068ad29c92e965239a7900a2deea3 to next.
>
> A tree containing patched #1 to #5 merges just fine with next/master.
> When merging patch 6 into the result the merge resolution looks as
> follows:
Now there is a forth driver in next that needs adaption:
drivers/media/i2c/ar0521.c adding
diff --git a/drivers/media/i2c/ar0521.c b/drivers/media/i2c/ar0521.c
index c7bdfc69b9be..c6ab531532be 100644
--- a/drivers/media/i2c/ar0521.c
+++ b/drivers/media/i2c/ar0521.c
@@ -1018,7 +1018,7 @@ static int ar0521_probe(struct i2c_client *client)
return ret;
}
-static int ar0521_remove(struct i2c_client *client)
+static void ar0521_remove(struct i2c_client *client)
{
struct v4l2_subdev *sd = i2c_get_clientdata(client);
struct ar0521_dev *sensor = to_ar0521_dev(sd);
@@ -1031,7 +1031,6 @@ static int ar0521_remove(struct i2c_client *client)
ar0521_power_off(&client->dev);
pm_runtime_set_suspended(&client->dev);
mutex_destroy(&sensor->lock);
- return 0;
}
static const struct dev_pm_ops ar0521_pm_ops = {
to the patch needed on top of v5.20-rc1.
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 --]
^ permalink raw reply related [flat|nested] 25+ messages in thread
* Re: [PATCH 0/6] i2c: Make remove callback return void
2022-07-16 15:15 ` Uwe Kleine-König
@ 2022-07-18 4:18 ` Krzysztof Hałasa
2022-08-11 12:40 ` Uwe Kleine-König
1 sibling, 0 replies; 25+ messages in thread
From: Krzysztof Hałasa @ 2022-07-18 4:18 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: Wolfram Sang, Johannes Holland, Amir Mizinski, Alexander Steffen,
Jarkko Sakkinen, Sakari Ailus, Mauro Carvalho Chehab,
linux-integrity, linux-i2c, kernel
Hello,
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> writes:
> Now there is a forth driver in next that needs adaption:
> drivers/media/i2c/ar0521.c adding
Very well. It's even already
Acked-by: Krzysztof Hałasa <khalasa@piap.pl>
> --- a/drivers/media/i2c/ar0521.c
> +++ b/drivers/media/i2c/ar0521.c
> @@ -1018,7 +1018,7 @@ static int ar0521_probe(struct i2c_client *client)
> return ret;
> }
>
> -static int ar0521_remove(struct i2c_client *client)
> +static void ar0521_remove(struct i2c_client *client)
> {
> struct v4l2_subdev *sd = i2c_get_clientdata(client);
> struct ar0521_dev *sensor = to_ar0521_dev(sd);
> @@ -1031,7 +1031,6 @@ static int ar0521_remove(struct i2c_client *client)
> ar0521_power_off(&client->dev);
> pm_runtime_set_suspended(&client->dev);
> mutex_destroy(&sensor->lock);
> - return 0;
> }
>
--
Krzysztof "Chris" Hałasa
Sieć Badawcza Łukasiewicz
Przemysłowy Instytut Automatyki i Pomiarów PIAP
Al. Jerozolimskie 202, 02-486 Warszawa
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 0/6] i2c: Make remove callback return void
2022-07-16 15:15 ` Uwe Kleine-König
2022-07-18 4:18 ` Krzysztof Hałasa
@ 2022-08-11 12:40 ` Uwe Kleine-König
1 sibling, 0 replies; 25+ messages in thread
From: Uwe Kleine-König @ 2022-08-11 12:40 UTC (permalink / raw)
To: Wolfram Sang, Johannes Holland, Amir Mizinski, Alexander Steffen,
Jarkko Sakkinen, Christopher Vollo, Robert Foss, Jagan Teki,
Krzysztof Hałasa, Sakari Ailus, Mauro Carvalho Chehab,
Cosmin Tanislav, Greg Kroah-Hartman, Heikki Krogerus, Xin Ji,
Fabrice Gasnier, Dmitry Torokhov, Jonathan Cameron
Cc: linux-integrity, linux-i2c, kernel, Andrey Ryabinin,
Matt Johnston
[-- Attachment #1: Type: text/plain, Size: 8173 bytes --]
Hello,
just a heads up a few days before I expect -rc1 to be tagged when I will
send the next version of the remove prototype conversion with the goal
to get this into next soon.
For those who are new to this thread: The series discussed here probably
conflicts with one of the patches recently merged into the mainline.
There is no action expected from your side, but you might have a look at
my series.
On Sat, Jul 16, 2022 at 05:15:27PM +0200, Uwe Kleine-König wrote:
> On Mon, Jul 04, 2022 at 10:39:47AM +0200, Uwe Kleine-König wrote:
> > On Tue, Jun 28, 2022 at 04:03:06PM +0200, Uwe Kleine-König wrote:
> > > as announced in
> > > https://lore.kernel.org/linux-i2c/20220609091018.q52fhowlsdbdkct5@pengutronix.de
> > > I intend to change the remove prototype for i2c drivers to remove void.
> > >
> > > As this touches quite some drivers, the plan is to submit this change
> > > for inclusion after the next merge window and get it quickly into next
> > > that other subsystems have enough time to adapt.
> > >
> > > Still to give the opportunity to comment I send the patch set out based
> > > on v5.19-rc4. There are still a few patches in next that are required,
> > > namely:
> > >
> > > d04d46dd82ad iio:magnetometer:mbc150: Make bmc150_magn_remove() return void
> > > 7576bc05b360 iio:light:vcnl4035: Improve error reporting for problems during .remove()
> > > ab91da2f2574 iio:light:vcnl4000: Improve error reporting for problems during .remove()
> > > 5049646718d7 iio:light:us5182d: Improve error reporting for problems during .remove()
> > > be9f6004be88 iio:light:pa12203001: Improve error reporting for problems during .remove()
> > > 730cd2f54eba iio:chemical:ccs811: Improve error reporting for problems during .remove()
> > > a76209246d9f iio:chemical:atlas: Improve error reporting for problems during .remove()
> > > 8f760ce7affd iio:adc:ti-ads1015: Improve error reporting for problems during .remove()
> > > ffa952e95d8c iio:adc:ina2xx: Improve error reporting for problems during .remove()
> > > 48d1ae774099 iio: health: afe4404: Remove duplicated error reporting in .remove()
> > > 8dc0a72795e4 iio:light:tsl2583: Remove duplicated error reporting in .remove()
> > > 58a6df5580bb iio:light:stk3310: Remove duplicated error reporting in .remove()
> > > 44ceb791182a iio:light:opt3001: Remove duplicated error reporting in .remove()
> > > f0e34d262567 iio:light:jsa1212: Remove duplicated error reporting in .remove()
> > > 8d3d6baa4990 iio:light:isl29028: Remove duplicated error reporting in .remove()
> > > 5004e24a466c iio:light:bh1780: Remove duplicated error reporting in .remove()
> > > 1db6926d611d iio:accel:stk8ba50: Remove duplicated error reporting in .remove()
> > > 1aec857d50ce iio:accel:stk8312: Remove duplicated error reporting in .remove()
> > > aae59bdf2585 iio:accel:mc3230: Remove duplicated error reporting in .remove()
> > > 7df7563b16aa crypto: atmel-ecc - Remove duplicated error reporting in .remove()
> > > 99ad11e06be8 i2c: dummy: Drop no-op remove function
> > > 84965cc60e64 ASoC: cs35l45: Make cs35l45_remove() return void
> > > fb68cb963bb7 ASoC: da732x: Drop no-op remove function
> > > 3cce931a5e44 ASoC: lm49453: Drop no-op remove function
> > > 8a291eebeb63 ASoC: da7219: Drop no-op remove function
> > > 60391d788a22 ASoC: ak4642: Drop no-op remove function
> > > 51bd0abd873d extcon: fsa9480: Drop no-op remove function
> > >
> > > I hope and assume they will all be included in v5.20-rc1.
These are all in Linus' tree now.
> > > There are 5 more patches required that didn't made it into next
> > > yet (i.e. patches #1 - #5 of this series).
This didn't change. These are still not in next so I will most probabaly
include them in the next round. Good news is that no new drivers needed
a preparing adaption.
I pushed the current version of the series to
https://git.pengutronix.de/git/ukl/linux i2c-remove-void
based on current Linus' master
(ffcf9c5700e49c0aee42dcba9a12ba21338e8136). Build tests are running, I
don't expect surprises (and will silently update above tree if
necessary.)
Looking at the range-diff since I submitted v1, the following happend
since then:
- Several acks and Reviewed-by's added
- A few drivers don't need adaption any more because they were removed
or their remove callback war dropped:
- arch/arm/mach-davinci/board-dm644x-evm.c (dropped in 7dd33764486d)
- arch/arm/mach-davinci/board-dm646x-evm.c (dropped in b4aed01de486)
- drivers/gpu/drm/bridge/parade-ps8640.c (.remove dropped in 10e619f1f31c)
- drivers/hwmon/mcp3021.c (.remove dropped in 03508eea5385)
- drivers/iio/accel/bma400_i2c.c (.remove dropped in 12c99f859fd3)
- drivers/leds/leds-is31fl319x.c (.remove dropped in e1af5c815586)
- sound/soc/codecs/nau8821.c (.remove dropped in 2d86cef353b8)
- A few new drivers:
- drivers/char/tpm/tpm_tis_i2c.c (bbc23a07b072)
- drivers/gpu/drm/bridge/ti-dlpc3433.c (6352cd451ddb)
- drivers/media/i2c/ar0521.c (852b50aeed15)
- drivers/tty/serial/max310x.c (Added i2c support, 2e1f2d9a9bdb)
- drivers/usb/typec/anx7411.c (fe6d8a9c8e64)
- drivers/usb/typec/ucsi/ucsi_stm32g0.c (72849d4fcee7)
- A few changes due to (mostly trivial) conflicts with upstream changes
- drivers/gpu/drm/bridge/ti-sn65dsi83.c (fc8adb13d844)
- drivers/iio/adc/ad799x.c (078d37b73f05)
- drivers/iio/gyro/itg3200_core.c (fa55750642d0)
- drivers/iio/light/bh1750.c (7eff2dcec69c)
- drivers/iio/light/gp2ap002.c (7b79cda9e297)
- drivers/iio/light/tsl2563.c (76faa32077b0)
- drivers/iio/light/us5182d.c (a79163d19ef7)
- drivers/iio/light/vcnl4000.c (cd4d10b134c2)
- drivers/iio/light/vcnl4035.c (b904854e14bb)
- drivers/iio/magnetometer/ak8974.c (74f4595ab7f8)
- drivers/iio/magnetometer/yamaha-yas530.c (e5933cf48779)
- sound/soc/codecs/sgtl5000.c (bf2aebccddef)
- Remove a comment form drivers/net/mctp/mctp-i2c.c that doesn't match
any more. (Noticed by Matt Johnston)
- Removed a stray change to lib/Kconfig.kasan that I needed for build
testing but that wasn't ment to be included. (Noticed by Andrey
Ryabinin).
Currently this series conflicts with changes to
drivers/input/keyboard/adp5588-keys.c that are waiting in next to reach
Linus' tree. The conflict resolution looks as follows:
diff --cc drivers/input/keyboard/adp5588-keys.c
index b5666d650994,1a1a05d7cd42..000000000000
--- a/drivers/input/keyboard/adp5588-keys.c
+++ b/drivers/input/keyboard/adp5588-keys.c
@@@ -584,43 -590,21 +590,20 @@@ static int adp5588_probe(struct i2c_cli
dev_info(&client->dev, "Rev.%d keypad, irq %d\n", revid, client->irq);
return 0;
-
- err_free_irq:
- free_irq(client->irq, kpad);
- cancel_delayed_work_sync(&kpad->work);
- err_unreg_dev:
- input_unregister_device(input);
- input = NULL;
- err_free_mem:
- input_free_device(input);
- kfree(kpad);
-
- return error;
}
-static int adp5588_remove(struct i2c_client *client)
+static void adp5588_remove(struct i2c_client *client)
{
- struct adp5588_kpad *kpad = i2c_get_clientdata(client);
-
adp5588_write(client, CFG, 0);
- free_irq(client->irq, kpad);
- cancel_delayed_work_sync(&kpad->work);
- input_unregister_device(kpad->input);
- adp5588_gpio_remove(kpad);
- kfree(kpad);
+
+ /* all resources will be freed by devm */
- return 0;
}
- #ifdef CONFIG_PM
- static int adp5588_suspend(struct device *dev)
+ static int __maybe_unused adp5588_suspend(struct device *dev)
{
- struct adp5588_kpad *kpad = dev_get_drvdata(dev);
- struct i2c_client *client = kpad->client;
+ struct i2c_client *client = to_i2c_client(dev);
disable_irq(client->irq);
- cancel_delayed_work_sync(&kpad->work);
-
- if (device_may_wakeup(&client->dev))
- enable_irq_wake(client->irq);
return 0;
}
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 --]
^ permalink raw reply [flat|nested] 25+ messages in thread
end of thread, other threads:[~2022-08-11 12:41 UTC | newest]
Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20220628140313.74984-1-u.kleine-koenig@pengutronix.de>
2022-06-28 14:03 ` [PATCH 1/6] drm/i2c/sil164: Drop no-op remove function Uwe Kleine-König
2022-06-28 14:03 ` [PATCH 2/6] leds: lm3697: Remove duplicated error reporting in .remove() Uwe Kleine-König
2022-06-28 14:03 ` [PATCH 3/6] leds: lm3601x: Don't use mutex after it was destroyed Uwe Kleine-König
2022-06-28 14:03 ` [PATCH 4/6] leds: lm3601x: Improve error reporting for problems during .remove() Uwe Kleine-König
2022-06-28 14:03 ` [PATCH 5/6] gpio: pca953x: Make platform teardown callback return void Uwe Kleine-König
2022-06-28 19:09 ` Andy Shevchenko
2022-06-28 20:15 ` Uwe Kleine-König
[not found] ` <20220628140313.74984-7-u.kleine-koenig@pengutronix.de>
[not found] ` <60cc6796236f23c028a9ae76dbe00d1917df82a5.camel@codeconstruct.com.au>
2022-06-29 7:23 ` [PATCH 6/6] i2c: Make remove " Uwe Kleine-König
2022-06-29 7:37 ` Javier Martinez Canillas
2022-06-29 7:55 ` Christophe Leroy
2022-06-29 8:09 ` Javier Martinez Canillas
2022-06-29 7:40 ` Heikki Krogerus
2022-06-29 10:40 ` Andy Shevchenko
2022-06-29 10:53 ` Petr Machata
[not found] ` <CAPAsAGwP4Mw_CJfsi7oapABdTBwO1HfiQux6X4UahspU74VjtQ@mail.gmail.com>
2022-06-29 13:35 ` Uwe Kleine-König
2022-06-29 14:25 ` Maximilian Luz
2022-06-29 21:20 ` Luca Ceresoli
2022-07-05 10:08 ` Jean Delvare
2022-07-05 10:36 ` Uwe Kleine-König
2022-07-06 9:13 ` Vladimir Oltean
2022-07-06 9:31 ` Uwe Kleine-König
2022-07-04 8:39 ` [PATCH 0/6] " Uwe Kleine-König
2022-07-16 15:15 ` Uwe Kleine-König
2022-07-18 4:18 ` Krzysztof Hałasa
2022-08-11 12:40 ` Uwe Kleine-König
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).