linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/89] i2c: Convert to platform remove callback returning void
@ 2023-05-08 20:51 Uwe Kleine-König
  2023-05-08 20:51 ` [PATCH 01/89] i2c: altera: " Uwe Kleine-König
                   ` (89 more replies)
  0 siblings, 90 replies; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:51 UTC (permalink / raw)
  To: Thor Thayer, Elie Morisse, Shyam Sundar S K, Brendan Higgins,
	Codrin Ciubotariu, Nicolas Ferre, Alexandre Belloni,
	Claudiu Beznea, Wolfram Sang, ye xingchen, Krzysztof Adamski,
	Ray Jui, Scott Branden, Greg Kroah-Hartman, Allison Randal,
	Thomas Gleixner, Florian Fainelli, Wolfram Sang, Kamal Dasu,
	Michal Simek, Hans de Goede, Jochen Friedrich, Benson Leung,
	Krzysztof Kozlowski, Bartosz Golaszewski, Jarkko Nikula,
	Baruch Siach, Jean-Marie Verdun, Nick Hawkins, Dong Aisheng,
	Shawn Guo, Sascha Hauer, Oleksij Rempel, Jean Delvare,
	Paul Cercueil, Chris Pringle, Vladimir Zapolskiy, Neil Armstrong,
	Kevin Hilman, Julia Lawall, Conor Dooley, Daire McNamara,
	Khalil Blaiech, Asmaa Mnebhi, Vadim Pasternak, Michael Shych,
	Chris Packham, Qii Wang, Matthias Brugger, Stefan Roese,
	Gregory CLEMENT, Matthias Schiffer, Stefan Wahren, Avi Fishman,
	Tomer Maimon, Tali Perry, Peter Korsgaard, Andrew Lunn,
	Robert Richter, Tony Lindgren, Aaro Koskinen, Janusz Krzysztofik,
	Vignesh R, Michael Ellerman, Hector Martin, Sven Peter,
	Rob Herring, Srinivas Kandagatla, Sebastian Reichel,
	Miquel Raynal, Loic Poulain, Robert Foss, Andy Gross,
	Bjorn Andersson, Chris Brandt, Heiko Stuebner, Phil Edworthy,
	Andy Shevchenko, Philipp Zabel, Jim Cromie, Patrice Chotard,
	Pierre-Yves MORDRET, Alain Volmat, Maxime Coquelin,
	Alexandre Torgue, Chen-Yu Tsai, Jernej Skrabec, Samuel Holland,
	Ard Biesheuvel, Thierry Reding, Jonathan Hunter, Laxman Dewangan,
	Kunihiko Hayashi, Masami Hiramatsu, Linus Walleij, Andi Shyti,
	Wei Chen, George Cherian, Peter Rosin, Peter Korsgaard
  Cc: linux-i2c, kernel, Benjamin Herrenschmidt, Joel Stanley,
	Andrew Jeffery, openbmc, linux-arm-kernel, linux-aspeed,
	Broadcom internal kernel review list, linux-rpi-kernel,
	linuxppc-dev, Guenter Roeck, chrome-platform, Mika Westerberg,
	Jan Dabros, linux-renesas-soc, Alim Akhtar, linux-samsung-soc,
	Fabio Estevam, NXP Linux Team, linux-mips, Jerome Brunet,
	Martin Blumenstingl, linux-amlogic, linux-riscv,
	AngeloGioacchino Del Regno, linux-mediatek, Patrick Venture,
	Nancy Yuen, Benjamin Fair, linux-omap, Nicholas Piggin,
	Christophe Leroy, Alyssa Rosenzweig, asahi, linux-arm-msm,
	Konrad Dybcio, linux-rockchip, linux-stm32, linux-sunxi,
	linux-tegra, Dmitry Osipenko

Hello,

this series convers the drivers below drivers/i2c to the .remove_new()
callback of struct platform_driver(). The motivation is to make the
remove callback less prone for errors and wrong assumptions. See commit
5c5a7680e67b ("platform: Provide a remove callback that returns no
value") for a more detailed rationale.

All but one driver already returned zero unconditionally in their
.remove() callback, so converting them to .remove_new() is trivial.
i2c-davinci has two patches in this series, first the error path is
improved to not return an error code, then it's converted as the others
drivers are.

The two davinci patches are also the only interdependency in this
series. I was unsure if I should split the series in two, the busses and
the mux changes; if convenient these can be applied independent of each
other.

Best regards
Uwe

Uwe Kleine-König (89):
  i2c: altera: Convert to platform remove callback returning void
  i2c: amd-mp2-plat: Convert to platform remove callback returning void
  i2c: aspeed: Convert to platform remove callback returning void
  i2c: at91-core: Convert to platform remove callback returning void
  i2c: au1550: Convert to platform remove callback returning void
  i2c: axxia: Convert to platform remove callback returning void
  i2c: bcm-iproc: Convert to platform remove callback returning void
  i2c: bcm-kona: Convert to platform remove callback returning void
  i2c: bcm2835: Convert to platform remove callback returning void
  i2c: brcmstb: Convert to platform remove callback returning void
  i2c: cadence: Convert to platform remove callback returning void
  i2c: cbus-gpio: Convert to platform remove callback returning void
  i2c: cht-wc: Convert to platform remove callback returning void
  i2c: cpm: Convert to platform remove callback returning void
  i2c: cros-ec-tunnel: Convert to platform remove callback returning
    void
  i2c: davinci: Improve error reporting for problems during .remove()
  i2c: davinci: Convert to platform remove callback returning void
  i2c: designware-platdrv: Convert to platform remove callback returning
    void
  i2c: digicolor: Convert to platform remove callback returning void
  i2c: dln2: Convert to platform remove callback returning void
  i2c: emev2: Convert to platform remove callback returning void
  i2c: exynos5: Convert to platform remove callback returning void
  i2c: gpio: Convert to platform remove callback returning void
  i2c: gxp: Convert to platform remove callback returning void
  i2c: highlander: Convert to platform remove callback returning void
  i2c: hix5hd2: Convert to platform remove callback returning void
  i2c: ibm_iic: Convert to platform remove callback returning void
  i2c: img-scb: Convert to platform remove callback returning void
  i2c: imx-lpi2c: Convert to platform remove callback returning void
  i2c: imx: Convert to platform remove callback returning void
  i2c: iop3xx: Convert to platform remove callback returning void
  i2c: isch: Convert to platform remove callback returning void
  i2c: jz4780: Convert to platform remove callback returning void
  i2c: kempld: Convert to platform remove callback returning void
  i2c: lpc2k: Convert to platform remove callback returning void
  i2c: meson: Convert to platform remove callback returning void
  i2c: microchip-corei2c: Convert to platform remove callback returning
    void
  i2c: mlxbf: Convert to platform remove callback returning void
  i2c: mlxcpld: Convert to platform remove callback returning void
  i2c: mpc: Convert to platform remove callback returning void
  i2c: mt65xx: Convert to platform remove callback returning void
  i2c: mt7621: Convert to platform remove callback returning void
  i2c: mv64xxx: Convert to platform remove callback returning void
  i2c: mxs: Convert to platform remove callback returning void
  i2c: npcm7xx: Convert to platform remove callback returning void
  i2c: ocores: Convert to platform remove callback returning void
  i2c: octeon-platdrv: Convert to platform remove callback returning
    void
  i2c: omap: Convert to platform remove callback returning void
  i2c: opal: Convert to platform remove callback returning void
  i2c: pasemi-platform: Convert to platform remove callback returning
    void
  i2c: pca-platform: Convert to platform remove callback returning void
  i2c: pnx: Convert to platform remove callback returning void
  i2c: powermac: Convert to platform remove callback returning void
  i2c: pxa: Convert to platform remove callback returning void
  i2c: qcom-cci: Convert to platform remove callback returning void
  i2c: qcom-geni: Convert to platform remove callback returning void
  i2c: qup: Convert to platform remove callback returning void
  i2c: rcar: Convert to platform remove callback returning void
  i2c: riic: Convert to platform remove callback returning void
  i2c: rk3x: Convert to platform remove callback returning void
  i2c: rzv2m: Convert to platform remove callback returning void
  i2c: s3c2410: Convert to platform remove callback returning void
  i2c: scmi: Convert to platform remove callback returning void
  i2c: scx200_acb: Convert to platform remove callback returning void
  i2c: sh7760: Convert to platform remove callback returning void
  i2c: sh_mobile: Convert to platform remove callback returning void
  i2c: simtec: Convert to platform remove callback returning void
  i2c: st: Convert to platform remove callback returning void
  i2c: stm32f4: Convert to platform remove callback returning void
  i2c: stm32f7: Convert to platform remove callback returning void
  i2c: sun6i-p2wi: Convert to platform remove callback returning void
  i2c: synquacer: Convert to platform remove callback returning void
  i2c: tegra-bpmp: Convert to platform remove callback returning void
  i2c: tegra: Convert to platform remove callback returning void
  i2c: uniphier-f: Convert to platform remove callback returning void
  i2c: uniphier: Convert to platform remove callback returning void
  i2c: versatile: Convert to platform remove callback returning void
  i2c: viperboard: Convert to platform remove callback returning void
  i2c: wmt: Convert to platform remove callback returning void
  i2c: xgene-slimpro: Convert to platform remove callback returning void
  i2c: xiic: Convert to platform remove callback returning void
  i2c: xlp9xx: Convert to platform remove callback returning void
  i2c: mux: arb-gpio-challenge: Convert to platform remove callback
    returning void
  i2c: mux: demux-pinctrl: Convert to platform remove callback returning
    void
  i2c: mux: gpio: Convert to platform remove callback returning void
  i2c: mux: gpmux: Convert to platform remove callback returning void
  i2c: mux: mlxcpld: Convert to platform remove callback returning void
  i2c: mux: pinctrl: Convert to platform remove callback returning void
  i2c: mux: reg: Convert to platform remove callback returning void

 drivers/i2c/busses/i2c-altera.c             |  6 ++----
 drivers/i2c/busses/i2c-amd-mp2-plat.c       |  5 ++---
 drivers/i2c/busses/i2c-aspeed.c             |  6 ++----
 drivers/i2c/busses/i2c-at91-core.c          |  6 ++----
 drivers/i2c/busses/i2c-au1550.c             |  5 ++---
 drivers/i2c/busses/i2c-axxia.c              |  6 ++----
 drivers/i2c/busses/i2c-bcm-iproc.c          |  6 ++----
 drivers/i2c/busses/i2c-bcm-kona.c           |  6 ++----
 drivers/i2c/busses/i2c-bcm2835.c            |  6 ++----
 drivers/i2c/busses/i2c-brcmstb.c            |  5 ++---
 drivers/i2c/busses/i2c-cadence.c            |  6 ++----
 drivers/i2c/busses/i2c-cbus-gpio.c          |  6 ++----
 drivers/i2c/busses/i2c-cht-wc.c             |  6 ++----
 drivers/i2c/busses/i2c-cpm.c                |  6 ++----
 drivers/i2c/busses/i2c-cros-ec-tunnel.c     |  6 ++----
 drivers/i2c/busses/i2c-davinci.c            | 14 ++++++--------
 drivers/i2c/busses/i2c-designware-platdrv.c |  6 ++----
 drivers/i2c/busses/i2c-digicolor.c          |  6 ++----
 drivers/i2c/busses/i2c-dln2.c               |  6 ++----
 drivers/i2c/busses/i2c-emev2.c              |  6 ++----
 drivers/i2c/busses/i2c-exynos5.c            |  6 ++----
 drivers/i2c/busses/i2c-gpio.c               |  6 ++----
 drivers/i2c/busses/i2c-gxp.c                |  6 ++----
 drivers/i2c/busses/i2c-highlander.c         |  6 ++----
 drivers/i2c/busses/i2c-hix5hd2.c            |  6 ++----
 drivers/i2c/busses/i2c-ibm_iic.c            |  6 ++----
 drivers/i2c/busses/i2c-img-scb.c            |  6 ++----
 drivers/i2c/busses/i2c-imx-lpi2c.c          |  6 ++----
 drivers/i2c/busses/i2c-imx.c                |  6 ++----
 drivers/i2c/busses/i2c-iop3xx.c             |  6 ++----
 drivers/i2c/busses/i2c-isch.c               |  6 ++----
 drivers/i2c/busses/i2c-jz4780.c             |  5 ++---
 drivers/i2c/busses/i2c-kempld.c             |  6 ++----
 drivers/i2c/busses/i2c-lpc2k.c              |  6 ++----
 drivers/i2c/busses/i2c-meson.c              |  6 ++----
 drivers/i2c/busses/i2c-microchip-corei2c.c  |  6 ++----
 drivers/i2c/busses/i2c-mlxbf.c              |  6 ++----
 drivers/i2c/busses/i2c-mlxcpld.c            |  6 ++----
 drivers/i2c/busses/i2c-mpc.c                |  6 ++----
 drivers/i2c/busses/i2c-mt65xx.c             |  6 ++----
 drivers/i2c/busses/i2c-mt7621.c             |  6 ++----
 drivers/i2c/busses/i2c-mv64xxx.c            |  6 ++----
 drivers/i2c/busses/i2c-mxs.c                |  6 ++----
 drivers/i2c/busses/i2c-npcm7xx.c            |  5 ++---
 drivers/i2c/busses/i2c-ocores.c             |  6 ++----
 drivers/i2c/busses/i2c-octeon-platdrv.c     |  5 ++---
 drivers/i2c/busses/i2c-omap.c               |  6 ++----
 drivers/i2c/busses/i2c-opal.c               |  6 ++----
 drivers/i2c/busses/i2c-pasemi-platform.c    |  5 ++---
 drivers/i2c/busses/i2c-pca-platform.c       |  6 ++----
 drivers/i2c/busses/i2c-pnx.c                |  6 ++----
 drivers/i2c/busses/i2c-powermac.c           |  6 ++----
 drivers/i2c/busses/i2c-pxa.c                |  6 ++----
 drivers/i2c/busses/i2c-qcom-cci.c           |  6 ++----
 drivers/i2c/busses/i2c-qcom-geni.c          |  5 ++---
 drivers/i2c/busses/i2c-qup.c                |  5 ++---
 drivers/i2c/busses/i2c-rcar.c               |  6 ++----
 drivers/i2c/busses/i2c-riic.c               |  6 ++----
 drivers/i2c/busses/i2c-rk3x.c               |  6 ++----
 drivers/i2c/busses/i2c-rzv2m.c              |  6 ++----
 drivers/i2c/busses/i2c-s3c2410.c            |  6 ++----
 drivers/i2c/busses/i2c-scmi.c               |  6 ++----
 drivers/i2c/busses/i2c-sh7760.c             |  6 ++----
 drivers/i2c/busses/i2c-sh_mobile.c          |  5 ++---
 drivers/i2c/busses/i2c-simtec.c             |  6 ++----
 drivers/i2c/busses/i2c-st.c                 |  6 ++----
 drivers/i2c/busses/i2c-stm32f4.c            |  6 ++----
 drivers/i2c/busses/i2c-stm32f7.c            |  6 ++----
 drivers/i2c/busses/i2c-sun6i-p2wi.c         |  6 ++----
 drivers/i2c/busses/i2c-synquacer.c          |  6 ++----
 drivers/i2c/busses/i2c-tegra-bpmp.c         |  6 ++----
 drivers/i2c/busses/i2c-tegra.c              |  6 ++----
 drivers/i2c/busses/i2c-uniphier-f.c         |  6 ++----
 drivers/i2c/busses/i2c-uniphier.c           |  6 ++----
 drivers/i2c/busses/i2c-versatile.c          |  5 ++---
 drivers/i2c/busses/i2c-viperboard.c         |  6 ++----
 drivers/i2c/busses/i2c-wmt.c                |  6 ++----
 drivers/i2c/busses/i2c-xgene-slimpro.c      |  6 ++----
 drivers/i2c/busses/i2c-xiic.c               |  6 ++----
 drivers/i2c/busses/i2c-xlp9xx.c             |  6 ++----
 drivers/i2c/busses/scx200_acb.c             |  6 ++----
 drivers/i2c/muxes/i2c-arb-gpio-challenge.c  |  5 ++---
 drivers/i2c/muxes/i2c-demux-pinctrl.c       |  6 ++----
 drivers/i2c/muxes/i2c-mux-gpio.c            |  6 ++----
 drivers/i2c/muxes/i2c-mux-gpmux.c           |  6 ++----
 drivers/i2c/muxes/i2c-mux-mlxcpld.c         |  5 ++---
 drivers/i2c/muxes/i2c-mux-pinctrl.c         |  6 ++----
 drivers/i2c/muxes/i2c-mux-reg.c             |  6 ++----
 88 files changed, 180 insertions(+), 343 deletions(-)

base-commit: ac9a78681b921877518763ba0e89202254349d1b
-- 
2.39.2


^ permalink raw reply	[flat|nested] 140+ messages in thread

* [PATCH 01/89] i2c: altera: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
@ 2023-05-08 20:51 ` Uwe Kleine-König
  2023-05-08 20:51 ` [PATCH 02/89] i2c: amd-mp2-plat: " Uwe Kleine-König
                   ` (88 subsequent siblings)
  89 siblings, 0 replies; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:51 UTC (permalink / raw)
  To: Thor Thayer, Wolfram Sang; +Cc: linux-i2c, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/busses/i2c-altera.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/i2c-altera.c b/drivers/i2c/busses/i2c-altera.c
index 50e7f3f670b6..252fbd175fb1 100644
--- a/drivers/i2c/busses/i2c-altera.c
+++ b/drivers/i2c/busses/i2c-altera.c
@@ -465,14 +465,12 @@ static int altr_i2c_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int altr_i2c_remove(struct platform_device *pdev)
+static void altr_i2c_remove(struct platform_device *pdev)
 {
 	struct altr_i2c_dev *idev = platform_get_drvdata(pdev);
 
 	clk_disable_unprepare(idev->i2c_clk);
 	i2c_del_adapter(&idev->adapter);
-
-	return 0;
 }
 
 /* Match table for of_platform binding */
@@ -484,7 +482,7 @@ MODULE_DEVICE_TABLE(of, altr_i2c_of_match);
 
 static struct platform_driver altr_i2c_driver = {
 	.probe = altr_i2c_probe,
-	.remove = altr_i2c_remove,
+	.remove_new = altr_i2c_remove,
 	.driver = {
 		.name = "altera-i2c",
 		.of_match_table = altr_i2c_of_match,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 02/89] i2c: amd-mp2-plat: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
  2023-05-08 20:51 ` [PATCH 01/89] i2c: altera: " Uwe Kleine-König
@ 2023-05-08 20:51 ` Uwe Kleine-König
  2023-05-08 20:51 ` [PATCH 03/89] i2c: aspeed: " Uwe Kleine-König
                   ` (87 subsequent siblings)
  89 siblings, 0 replies; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:51 UTC (permalink / raw)
  To: Elie Morisse, Shyam Sundar S K, Wolfram Sang; +Cc: linux-i2c, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/busses/i2c-amd-mp2-plat.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/i2c/busses/i2c-amd-mp2-plat.c b/drivers/i2c/busses/i2c-amd-mp2-plat.c
index 423fe0c8a471..112fe2bc5662 100644
--- a/drivers/i2c/busses/i2c-amd-mp2-plat.c
+++ b/drivers/i2c/busses/i2c-amd-mp2-plat.c
@@ -322,7 +322,7 @@ static int i2c_amd_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int i2c_amd_remove(struct platform_device *pdev)
+static void i2c_amd_remove(struct platform_device *pdev)
 {
 	struct amd_i2c_dev *i2c_dev = platform_get_drvdata(pdev);
 	struct amd_i2c_common *i2c_common = &i2c_dev->common;
@@ -336,7 +336,6 @@ static int i2c_amd_remove(struct platform_device *pdev)
 	i2c_unlock_bus(&i2c_dev->adap, I2C_LOCK_ROOT_ADAPTER);
 
 	i2c_del_adapter(&i2c_dev->adap);
-	return 0;
 }
 
 static const struct acpi_device_id i2c_amd_acpi_match[] = {
@@ -347,7 +346,7 @@ MODULE_DEVICE_TABLE(acpi, i2c_amd_acpi_match);
 
 static struct platform_driver i2c_amd_plat_driver = {
 	.probe = i2c_amd_probe,
-	.remove = i2c_amd_remove,
+	.remove_new = i2c_amd_remove,
 	.driver = {
 		.name = "i2c_amd_mp2",
 		.acpi_match_table = ACPI_PTR(i2c_amd_acpi_match),
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 03/89] i2c: aspeed: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
  2023-05-08 20:51 ` [PATCH 01/89] i2c: altera: " Uwe Kleine-König
  2023-05-08 20:51 ` [PATCH 02/89] i2c: amd-mp2-plat: " Uwe Kleine-König
@ 2023-05-08 20:51 ` Uwe Kleine-König
  2023-05-08 20:51 ` [PATCH 04/89] i2c: at91-core: " Uwe Kleine-König
                   ` (86 subsequent siblings)
  89 siblings, 0 replies; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:51 UTC (permalink / raw)
  To: Brendan Higgins, Wolfram Sang
  Cc: Benjamin Herrenschmidt, Joel Stanley, Andrew Jeffery, linux-i2c,
	openbmc, linux-arm-kernel, linux-aspeed, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/busses/i2c-aspeed.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/i2c-aspeed.c b/drivers/i2c/busses/i2c-aspeed.c
index d3c99c5b3247..2e5acfeb76c8 100644
--- a/drivers/i2c/busses/i2c-aspeed.c
+++ b/drivers/i2c/busses/i2c-aspeed.c
@@ -1061,7 +1061,7 @@ static int aspeed_i2c_probe_bus(struct platform_device *pdev)
 	return 0;
 }
 
-static int aspeed_i2c_remove_bus(struct platform_device *pdev)
+static void aspeed_i2c_remove_bus(struct platform_device *pdev)
 {
 	struct aspeed_i2c_bus *bus = platform_get_drvdata(pdev);
 	unsigned long flags;
@@ -1077,13 +1077,11 @@ static int aspeed_i2c_remove_bus(struct platform_device *pdev)
 	reset_control_assert(bus->rst);
 
 	i2c_del_adapter(&bus->adap);
-
-	return 0;
 }
 
 static struct platform_driver aspeed_i2c_bus_driver = {
 	.probe		= aspeed_i2c_probe_bus,
-	.remove		= aspeed_i2c_remove_bus,
+	.remove_new	= aspeed_i2c_remove_bus,
 	.driver		= {
 		.name		= "aspeed-i2c-bus",
 		.of_match_table	= aspeed_i2c_bus_of_table,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 04/89] i2c: at91-core: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (2 preceding siblings ...)
  2023-05-08 20:51 ` [PATCH 03/89] i2c: aspeed: " Uwe Kleine-König
@ 2023-05-08 20:51 ` Uwe Kleine-König
  2023-05-09  4:42   ` Claudiu.Beznea
  2023-05-08 20:51 ` [PATCH 05/89] i2c: au1550: " Uwe Kleine-König
                   ` (85 subsequent siblings)
  89 siblings, 1 reply; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:51 UTC (permalink / raw)
  To: Codrin Ciubotariu, Nicolas Ferre, Alexandre Belloni,
	Claudiu Beznea, Wolfram Sang
  Cc: linux-i2c, moderated list:ARM/Microchip, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/busses/i2c-at91-core.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/i2c-at91-core.c b/drivers/i2c/busses/i2c-at91-core.c
index 2df9df585131..05ad3bc3578a 100644
--- a/drivers/i2c/busses/i2c-at91-core.c
+++ b/drivers/i2c/busses/i2c-at91-core.c
@@ -273,7 +273,7 @@ static int at91_twi_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int at91_twi_remove(struct platform_device *pdev)
+static void at91_twi_remove(struct platform_device *pdev)
 {
 	struct at91_twi_dev *dev = platform_get_drvdata(pdev);
 
@@ -282,8 +282,6 @@ static int at91_twi_remove(struct platform_device *pdev)
 
 	pm_runtime_disable(dev->dev);
 	pm_runtime_set_suspended(dev->dev);
-
-	return 0;
 }
 
 static int __maybe_unused at91_twi_runtime_suspend(struct device *dev)
@@ -342,7 +340,7 @@ static const struct dev_pm_ops __maybe_unused at91_twi_pm = {
 
 static struct platform_driver at91_twi_driver = {
 	.probe		= at91_twi_probe,
-	.remove		= at91_twi_remove,
+	.remove_new	= at91_twi_remove,
 	.id_table	= at91_twi_devtypes,
 	.driver		= {
 		.name	= "at91_i2c",
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 05/89] i2c: au1550: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (3 preceding siblings ...)
  2023-05-08 20:51 ` [PATCH 04/89] i2c: at91-core: " Uwe Kleine-König
@ 2023-05-08 20:51 ` Uwe Kleine-König
  2023-05-08 20:51 ` [PATCH 06/89] i2c: axxia: " Uwe Kleine-König
                   ` (84 subsequent siblings)
  89 siblings, 0 replies; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:51 UTC (permalink / raw)
  To: Wolfram Sang, ye xingchen, Wolfram Sang; +Cc: linux-i2c, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/busses/i2c-au1550.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/i2c/busses/i2c-au1550.c b/drivers/i2c/busses/i2c-au1550.c
index 7b42d35b1294..e66c12ecf270 100644
--- a/drivers/i2c/busses/i2c-au1550.c
+++ b/drivers/i2c/busses/i2c-au1550.c
@@ -334,13 +334,12 @@ i2c_au1550_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int i2c_au1550_remove(struct platform_device *pdev)
+static void i2c_au1550_remove(struct platform_device *pdev)
 {
 	struct i2c_au1550_data *priv = platform_get_drvdata(pdev);
 
 	i2c_del_adapter(&priv->adap);
 	i2c_au1550_disable(priv);
-	return 0;
 }
 
 #ifdef CONFIG_PM
@@ -379,7 +378,7 @@ static struct platform_driver au1xpsc_smbus_driver = {
 		.pm	= AU1XPSC_SMBUS_PMOPS,
 	},
 	.probe		= i2c_au1550_probe,
-	.remove		= i2c_au1550_remove,
+	.remove_new	= i2c_au1550_remove,
 };
 
 module_platform_driver(au1xpsc_smbus_driver);
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 06/89] i2c: axxia: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (4 preceding siblings ...)
  2023-05-08 20:51 ` [PATCH 05/89] i2c: au1550: " Uwe Kleine-König
@ 2023-05-08 20:51 ` Uwe Kleine-König
  2023-05-08 20:51 ` [PATCH 07/89] i2c: bcm-iproc: " Uwe Kleine-König
                   ` (83 subsequent siblings)
  89 siblings, 0 replies; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:51 UTC (permalink / raw)
  To: Krzysztof Adamski, Wolfram Sang; +Cc: linux-i2c, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/busses/i2c-axxia.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/i2c-axxia.c b/drivers/i2c/busses/i2c-axxia.c
index c1c74ce08407..d7f1e98777ac 100644
--- a/drivers/i2c/busses/i2c-axxia.c
+++ b/drivers/i2c/busses/i2c-axxia.c
@@ -804,14 +804,12 @@ static int axxia_i2c_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int axxia_i2c_remove(struct platform_device *pdev)
+static void axxia_i2c_remove(struct platform_device *pdev)
 {
 	struct axxia_i2c_dev *idev = platform_get_drvdata(pdev);
 
 	clk_disable_unprepare(idev->i2c_clk);
 	i2c_del_adapter(&idev->adapter);
-
-	return 0;
 }
 
 /* Match table for of_platform binding */
@@ -824,7 +822,7 @@ MODULE_DEVICE_TABLE(of, axxia_i2c_of_match);
 
 static struct platform_driver axxia_i2c_driver = {
 	.probe = axxia_i2c_probe,
-	.remove = axxia_i2c_remove,
+	.remove_new = axxia_i2c_remove,
 	.driver = {
 		.name = "axxia-i2c",
 		.of_match_table = axxia_i2c_of_match,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 07/89] i2c: bcm-iproc: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (5 preceding siblings ...)
  2023-05-08 20:51 ` [PATCH 06/89] i2c: axxia: " Uwe Kleine-König
@ 2023-05-08 20:51 ` Uwe Kleine-König
  2023-05-08 20:59   ` Florian Fainelli
  2023-05-08 20:51 ` [PATCH 08/89] i2c: bcm-kona: " Uwe Kleine-König
                   ` (82 subsequent siblings)
  89 siblings, 1 reply; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:51 UTC (permalink / raw)
  To: Ray Jui, Scott Branden, Greg Kroah-Hartman, Allison Randal,
	Thomas Gleixner, Wolfram Sang
  Cc: Broadcom internal kernel review list, linux-i2c,
	linux-arm-kernel, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/busses/i2c-bcm-iproc.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/i2c-bcm-iproc.c b/drivers/i2c/busses/i2c-bcm-iproc.c
index 85d8a6b04885..2d8342fdc25d 100644
--- a/drivers/i2c/busses/i2c-bcm-iproc.c
+++ b/drivers/i2c/busses/i2c-bcm-iproc.c
@@ -1107,7 +1107,7 @@ static int bcm_iproc_i2c_probe(struct platform_device *pdev)
 	return i2c_add_adapter(adap);
 }
 
-static int bcm_iproc_i2c_remove(struct platform_device *pdev)
+static void bcm_iproc_i2c_remove(struct platform_device *pdev)
 {
 	struct bcm_iproc_i2c_dev *iproc_i2c = platform_get_drvdata(pdev);
 
@@ -1123,8 +1123,6 @@ static int bcm_iproc_i2c_remove(struct platform_device *pdev)
 
 	i2c_del_adapter(&iproc_i2c->adapter);
 	bcm_iproc_i2c_enable_disable(iproc_i2c, false);
-
-	return 0;
 }
 
 #ifdef CONFIG_PM_SLEEP
@@ -1260,7 +1258,7 @@ static struct platform_driver bcm_iproc_i2c_driver = {
 		.pm = BCM_IPROC_I2C_PM_OPS,
 	},
 	.probe = bcm_iproc_i2c_probe,
-	.remove = bcm_iproc_i2c_remove,
+	.remove_new = bcm_iproc_i2c_remove,
 };
 module_platform_driver(bcm_iproc_i2c_driver);
 
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 08/89] i2c: bcm-kona: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (6 preceding siblings ...)
  2023-05-08 20:51 ` [PATCH 07/89] i2c: bcm-iproc: " Uwe Kleine-König
@ 2023-05-08 20:51 ` Uwe Kleine-König
  2023-05-08 20:59   ` Florian Fainelli
  2023-05-08 20:51 ` [PATCH 09/89] i2c: bcm2835: " Uwe Kleine-König
                   ` (81 subsequent siblings)
  89 siblings, 1 reply; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:51 UTC (permalink / raw)
  To: Florian Fainelli, Ray Jui, Scott Branden, Wolfram Sang,
	Greg Kroah-Hartman, Allison Randal, Thomas Gleixner,
	Wolfram Sang
  Cc: Broadcom internal kernel review list, linux-i2c, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/busses/i2c-bcm-kona.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/i2c-bcm-kona.c b/drivers/i2c/busses/i2c-bcm-kona.c
index f3e369f0fd40..a57088ec2b06 100644
--- a/drivers/i2c/busses/i2c-bcm-kona.c
+++ b/drivers/i2c/busses/i2c-bcm-kona.c
@@ -859,13 +859,11 @@ static int bcm_kona_i2c_probe(struct platform_device *pdev)
 	return rc;
 }
 
-static int bcm_kona_i2c_remove(struct platform_device *pdev)
+static void bcm_kona_i2c_remove(struct platform_device *pdev)
 {
 	struct bcm_kona_i2c_dev *dev = platform_get_drvdata(pdev);
 
 	i2c_del_adapter(&dev->adapter);
-
-	return 0;
 }
 
 static const struct of_device_id bcm_kona_i2c_of_match[] = {
@@ -880,7 +878,7 @@ static struct platform_driver bcm_kona_i2c_driver = {
 		   .of_match_table = bcm_kona_i2c_of_match,
 		   },
 	.probe = bcm_kona_i2c_probe,
-	.remove = bcm_kona_i2c_remove,
+	.remove_new = bcm_kona_i2c_remove,
 };
 module_platform_driver(bcm_kona_i2c_driver);
 
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 09/89] i2c: bcm2835: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (7 preceding siblings ...)
  2023-05-08 20:51 ` [PATCH 08/89] i2c: bcm-kona: " Uwe Kleine-König
@ 2023-05-08 20:51 ` Uwe Kleine-König
  2023-05-08 20:59   ` Florian Fainelli
  2023-05-08 20:51 ` [PATCH 10/89] i2c: brcmstb: " Uwe Kleine-König
                   ` (80 subsequent siblings)
  89 siblings, 1 reply; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:51 UTC (permalink / raw)
  To: Florian Fainelli, Ray Jui, Scott Branden, Wolfram Sang, ye xingchen
  Cc: Broadcom internal kernel review list, linux-i2c,
	linux-rpi-kernel, linux-arm-kernel, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/busses/i2c-bcm2835.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/i2c-bcm2835.c b/drivers/i2c/busses/i2c-bcm2835.c
index 09a077b31bfe..8ce6d3f49551 100644
--- a/drivers/i2c/busses/i2c-bcm2835.c
+++ b/drivers/i2c/busses/i2c-bcm2835.c
@@ -503,7 +503,7 @@ static int bcm2835_i2c_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int bcm2835_i2c_remove(struct platform_device *pdev)
+static void bcm2835_i2c_remove(struct platform_device *pdev)
 {
 	struct bcm2835_i2c_dev *i2c_dev = platform_get_drvdata(pdev);
 
@@ -512,8 +512,6 @@ static int bcm2835_i2c_remove(struct platform_device *pdev)
 
 	free_irq(i2c_dev->irq, i2c_dev);
 	i2c_del_adapter(&i2c_dev->adapter);
-
-	return 0;
 }
 
 static const struct of_device_id bcm2835_i2c_of_match[] = {
@@ -525,7 +523,7 @@ MODULE_DEVICE_TABLE(of, bcm2835_i2c_of_match);
 
 static struct platform_driver bcm2835_i2c_driver = {
 	.probe		= bcm2835_i2c_probe,
-	.remove		= bcm2835_i2c_remove,
+	.remove_new	= bcm2835_i2c_remove,
 	.driver		= {
 		.name	= "i2c-bcm2835",
 		.of_match_table = bcm2835_i2c_of_match,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 10/89] i2c: brcmstb: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (8 preceding siblings ...)
  2023-05-08 20:51 ` [PATCH 09/89] i2c: bcm2835: " Uwe Kleine-König
@ 2023-05-08 20:51 ` Uwe Kleine-König
  2023-05-08 20:59   ` Florian Fainelli
  2023-05-08 20:51 ` [PATCH 11/89] i2c: cadence: " Uwe Kleine-König
                   ` (79 subsequent siblings)
  89 siblings, 1 reply; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:51 UTC (permalink / raw)
  To: Kamal Dasu, Florian Fainelli, Wolfram Sang
  Cc: Broadcom internal kernel review list, linux-i2c,
	linux-arm-kernel, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/busses/i2c-brcmstb.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/i2c/busses/i2c-brcmstb.c b/drivers/i2c/busses/i2c-brcmstb.c
index ef942714642a..cf92cbcb8c86 100644
--- a/drivers/i2c/busses/i2c-brcmstb.c
+++ b/drivers/i2c/busses/i2c-brcmstb.c
@@ -690,12 +690,11 @@ static int brcmstb_i2c_probe(struct platform_device *pdev)
 	return rc;
 }
 
-static int brcmstb_i2c_remove(struct platform_device *pdev)
+static void brcmstb_i2c_remove(struct platform_device *pdev)
 {
 	struct brcmstb_i2c_dev *dev = platform_get_drvdata(pdev);
 
 	i2c_del_adapter(&dev->adapter);
-	return 0;
 }
 
 #ifdef CONFIG_PM_SLEEP
@@ -736,7 +735,7 @@ static struct platform_driver brcmstb_i2c_driver = {
 		   .pm = &brcmstb_i2c_pm,
 		   },
 	.probe = brcmstb_i2c_probe,
-	.remove = brcmstb_i2c_remove,
+	.remove_new = brcmstb_i2c_remove,
 };
 module_platform_driver(brcmstb_i2c_driver);
 
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 11/89] i2c: cadence: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (9 preceding siblings ...)
  2023-05-08 20:51 ` [PATCH 10/89] i2c: brcmstb: " Uwe Kleine-König
@ 2023-05-08 20:51 ` Uwe Kleine-König
  2023-05-08 20:51 ` [PATCH 12/89] i2c: cbus-gpio: " Uwe Kleine-König
                   ` (78 subsequent siblings)
  89 siblings, 0 replies; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:51 UTC (permalink / raw)
  To: Michal Simek, Wolfram Sang; +Cc: linux-arm-kernel, linux-i2c, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/busses/i2c-cadence.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/i2c-cadence.c b/drivers/i2c/busses/i2c-cadence.c
index 3a4edf7e75f9..9849f4502570 100644
--- a/drivers/i2c/busses/i2c-cadence.c
+++ b/drivers/i2c/busses/i2c-cadence.c
@@ -1415,7 +1415,7 @@ static int cdns_i2c_probe(struct platform_device *pdev)
  *
  * Return: 0 always
  */
-static int cdns_i2c_remove(struct platform_device *pdev)
+static void cdns_i2c_remove(struct platform_device *pdev)
 {
 	struct cdns_i2c *id = platform_get_drvdata(pdev);
 
@@ -1427,8 +1427,6 @@ static int cdns_i2c_remove(struct platform_device *pdev)
 	clk_notifier_unregister(id->clk, &id->clk_rate_change_nb);
 	reset_control_assert(id->reset);
 	clk_disable_unprepare(id->clk);
-
-	return 0;
 }
 
 static struct platform_driver cdns_i2c_drv = {
@@ -1438,7 +1436,7 @@ static struct platform_driver cdns_i2c_drv = {
 		.pm = &cdns_i2c_dev_pm_ops,
 	},
 	.probe  = cdns_i2c_probe,
-	.remove = cdns_i2c_remove,
+	.remove_new = cdns_i2c_remove,
 };
 
 module_platform_driver(cdns_i2c_drv);
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 12/89] i2c: cbus-gpio: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (10 preceding siblings ...)
  2023-05-08 20:51 ` [PATCH 11/89] i2c: cadence: " Uwe Kleine-König
@ 2023-05-08 20:51 ` Uwe Kleine-König
  2023-05-08 20:51 ` [PATCH 13/89] i2c: cht-wc: " Uwe Kleine-König
                   ` (77 subsequent siblings)
  89 siblings, 0 replies; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:51 UTC (permalink / raw)
  To: Wolfram Sang, Wolfram Sang; +Cc: linux-i2c, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/busses/i2c-cbus-gpio.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/i2c-cbus-gpio.c b/drivers/i2c/busses/i2c-cbus-gpio.c
index d97c61eec95c..fdc1758a3275 100644
--- a/drivers/i2c/busses/i2c-cbus-gpio.c
+++ b/drivers/i2c/busses/i2c-cbus-gpio.c
@@ -200,13 +200,11 @@ static const struct i2c_algorithm cbus_i2c_algo = {
 	.functionality		= cbus_i2c_func,
 };
 
-static int cbus_i2c_remove(struct platform_device *pdev)
+static void cbus_i2c_remove(struct platform_device *pdev)
 {
 	struct i2c_adapter *adapter = platform_get_drvdata(pdev);
 
 	i2c_del_adapter(adapter);
-
-	return 0;
 }
 
 static int cbus_i2c_probe(struct platform_device *pdev)
@@ -266,7 +264,7 @@ MODULE_DEVICE_TABLE(of, i2c_cbus_dt_ids);
 
 static struct platform_driver cbus_i2c_driver = {
 	.probe	= cbus_i2c_probe,
-	.remove	= cbus_i2c_remove,
+	.remove_new = cbus_i2c_remove,
 	.driver	= {
 		.name	= "i2c-cbus-gpio",
 		.of_match_table = of_match_ptr(i2c_cbus_dt_ids),
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 13/89] i2c: cht-wc: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (11 preceding siblings ...)
  2023-05-08 20:51 ` [PATCH 12/89] i2c: cbus-gpio: " Uwe Kleine-König
@ 2023-05-08 20:51 ` Uwe Kleine-König
  2023-05-09  8:13   ` Hans de Goede
  2023-05-08 20:51 ` [PATCH 14/89] i2c: cpm: " Uwe Kleine-König
                   ` (76 subsequent siblings)
  89 siblings, 1 reply; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:51 UTC (permalink / raw)
  To: Hans de Goede, Wolfram Sang; +Cc: linux-i2c, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/busses/i2c-cht-wc.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/i2c-cht-wc.c b/drivers/i2c/busses/i2c-cht-wc.c
index 2b2c3d090089..0209933b9a84 100644
--- a/drivers/i2c/busses/i2c-cht-wc.c
+++ b/drivers/i2c/busses/i2c-cht-wc.c
@@ -529,15 +529,13 @@ static int cht_wc_i2c_adap_i2c_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int cht_wc_i2c_adap_i2c_remove(struct platform_device *pdev)
+static void cht_wc_i2c_adap_i2c_remove(struct platform_device *pdev)
 {
 	struct cht_wc_i2c_adap *adap = platform_get_drvdata(pdev);
 
 	i2c_unregister_device(adap->client);
 	i2c_del_adapter(&adap->adapter);
 	irq_domain_remove(adap->irq_domain);
-
-	return 0;
 }
 
 static const struct platform_device_id cht_wc_i2c_adap_id_table[] = {
@@ -548,7 +546,7 @@ MODULE_DEVICE_TABLE(platform, cht_wc_i2c_adap_id_table);
 
 static struct platform_driver cht_wc_i2c_adap_driver = {
 	.probe = cht_wc_i2c_adap_i2c_probe,
-	.remove = cht_wc_i2c_adap_i2c_remove,
+	.remove_new = cht_wc_i2c_adap_i2c_remove,
 	.driver = {
 		.name = "cht_wcove_ext_chgr",
 	},
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 14/89] i2c: cpm: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (12 preceding siblings ...)
  2023-05-08 20:51 ` [PATCH 13/89] i2c: cht-wc: " Uwe Kleine-König
@ 2023-05-08 20:51 ` Uwe Kleine-König
  2023-05-16 10:59   ` Jochen Friedrich
  2023-05-08 20:51 ` [PATCH 15/89] i2c: cros-ec-tunnel: " Uwe Kleine-König
                   ` (75 subsequent siblings)
  89 siblings, 1 reply; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:51 UTC (permalink / raw)
  To: Jochen Friedrich, Wolfram Sang; +Cc: linuxppc-dev, linux-i2c, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/busses/i2c-cpm.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/i2c-cpm.c b/drivers/i2c/busses/i2c-cpm.c
index 24d584a1c9a7..732daf6a932b 100644
--- a/drivers/i2c/busses/i2c-cpm.c
+++ b/drivers/i2c/busses/i2c-cpm.c
@@ -676,7 +676,7 @@ static int cpm_i2c_probe(struct platform_device *ofdev)
 	return result;
 }
 
-static int cpm_i2c_remove(struct platform_device *ofdev)
+static void cpm_i2c_remove(struct platform_device *ofdev)
 {
 	struct cpm_i2c *cpm = platform_get_drvdata(ofdev);
 
@@ -685,8 +685,6 @@ static int cpm_i2c_remove(struct platform_device *ofdev)
 	cpm_i2c_shutdown(cpm);
 
 	kfree(cpm);
-
-	return 0;
 }
 
 static const struct of_device_id cpm_i2c_match[] = {
@@ -703,7 +701,7 @@ MODULE_DEVICE_TABLE(of, cpm_i2c_match);
 
 static struct platform_driver cpm_i2c_driver = {
 	.probe		= cpm_i2c_probe,
-	.remove		= cpm_i2c_remove,
+	.remove_new	= cpm_i2c_remove,
 	.driver = {
 		.name = "fsl-i2c-cpm",
 		.of_match_table = cpm_i2c_match,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 15/89] i2c: cros-ec-tunnel: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (13 preceding siblings ...)
  2023-05-08 20:51 ` [PATCH 14/89] i2c: cpm: " Uwe Kleine-König
@ 2023-05-08 20:51 ` Uwe Kleine-König
  2023-05-09 15:09   ` Krzysztof Kozlowski
  2023-05-08 20:51 ` [PATCH 16/89] i2c: davinci: Improve error reporting for problems during .remove() Uwe Kleine-König
                   ` (74 subsequent siblings)
  89 siblings, 1 reply; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:51 UTC (permalink / raw)
  To: Benson Leung, Wolfram Sang, Krzysztof Kozlowski, Wolfram Sang
  Cc: Guenter Roeck, linux-i2c, chrome-platform, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/busses/i2c-cros-ec-tunnel.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/i2c-cros-ec-tunnel.c b/drivers/i2c/busses/i2c-cros-ec-tunnel.c
index 8b3ff5bb14d8..2737fd8abd32 100644
--- a/drivers/i2c/busses/i2c-cros-ec-tunnel.c
+++ b/drivers/i2c/busses/i2c-cros-ec-tunnel.c
@@ -283,13 +283,11 @@ static int ec_i2c_probe(struct platform_device *pdev)
 	return err;
 }
 
-static int ec_i2c_remove(struct platform_device *dev)
+static void ec_i2c_remove(struct platform_device *dev)
 {
 	struct ec_i2c_device *bus = platform_get_drvdata(dev);
 
 	i2c_del_adapter(&bus->adap);
-
-	return 0;
 }
 
 static const struct of_device_id cros_ec_i2c_of_match[] __maybe_unused = {
@@ -306,7 +304,7 @@ MODULE_DEVICE_TABLE(acpi, cros_ec_i2c_tunnel_acpi_id);
 
 static struct platform_driver ec_i2c_tunnel_driver = {
 	.probe = ec_i2c_probe,
-	.remove = ec_i2c_remove,
+	.remove_new = ec_i2c_remove,
 	.driver = {
 		.name = "cros-ec-i2c-tunnel",
 		.acpi_match_table = ACPI_PTR(cros_ec_i2c_tunnel_acpi_id),
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 16/89] i2c: davinci: Improve error reporting for problems during .remove()
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (14 preceding siblings ...)
  2023-05-08 20:51 ` [PATCH 15/89] i2c: cros-ec-tunnel: " Uwe Kleine-König
@ 2023-05-08 20:51 ` Uwe Kleine-König
  2023-05-11  9:02   ` Bartosz Golaszewski
  2023-05-08 20:51 ` [PATCH 17/89] i2c: davinci: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (73 subsequent siblings)
  89 siblings, 1 reply; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:51 UTC (permalink / raw)
  To: Bartosz Golaszewski, Wolfram Sang; +Cc: linux-arm-kernel, linux-i2c, kernel

If pm_runtime_get() fails in .remove() the driver used to return the
error to the driver core. The only effect of this (compared to returning
zero) is a generic warning that the error value is ignored. (The device
is unbound then anyhow.)

Emit a better warning and return zero to suppress the generic (and
little helpful) message. Also disable runtime PM in the error case.

This prepares changing platform device remove callbacks to return void.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/busses/i2c-davinci.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/i2c-davinci.c b/drivers/i2c/busses/i2c-davinci.c
index 9750310f2c96..7ba7e6cbcc97 100644
--- a/drivers/i2c/busses/i2c-davinci.c
+++ b/drivers/i2c/busses/i2c-davinci.c
@@ -894,11 +894,11 @@ static int davinci_i2c_remove(struct platform_device *pdev)
 
 	i2c_del_adapter(&dev->adapter);
 
-	ret = pm_runtime_resume_and_get(&pdev->dev);
+	ret = pm_runtime_get_sync(&pdev->dev);
 	if (ret < 0)
-		return ret;
-
-	davinci_i2c_write_reg(dev, DAVINCI_I2C_MDR_REG, 0);
+		dev_err(&pdev->dev, "Failed to resume device\n");
+	else
+		davinci_i2c_write_reg(dev, DAVINCI_I2C_MDR_REG, 0);
 
 	pm_runtime_dont_use_autosuspend(dev->dev);
 	pm_runtime_put_sync(dev->dev);
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 17/89] i2c: davinci: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (15 preceding siblings ...)
  2023-05-08 20:51 ` [PATCH 16/89] i2c: davinci: Improve error reporting for problems during .remove() Uwe Kleine-König
@ 2023-05-08 20:51 ` Uwe Kleine-König
  2023-05-11  9:03   ` Bartosz Golaszewski
  2023-05-08 20:51 ` [PATCH 18/89] i2c: designware-platdrv: " Uwe Kleine-König
                   ` (72 subsequent siblings)
  89 siblings, 1 reply; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:51 UTC (permalink / raw)
  To: Bartosz Golaszewski, Wolfram Sang; +Cc: linux-arm-kernel, linux-i2c, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/busses/i2c-davinci.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/i2c-davinci.c b/drivers/i2c/busses/i2c-davinci.c
index 7ba7e6cbcc97..b77f9288c0de 100644
--- a/drivers/i2c/busses/i2c-davinci.c
+++ b/drivers/i2c/busses/i2c-davinci.c
@@ -885,7 +885,7 @@ static int davinci_i2c_probe(struct platform_device *pdev)
 	return r;
 }
 
-static int davinci_i2c_remove(struct platform_device *pdev)
+static void davinci_i2c_remove(struct platform_device *pdev)
 {
 	struct davinci_i2c_dev *dev = platform_get_drvdata(pdev);
 	int ret;
@@ -903,8 +903,6 @@ static int davinci_i2c_remove(struct platform_device *pdev)
 	pm_runtime_dont_use_autosuspend(dev->dev);
 	pm_runtime_put_sync(dev->dev);
 	pm_runtime_disable(dev->dev);
-
-	return 0;
 }
 
 #ifdef CONFIG_PM
@@ -945,7 +943,7 @@ MODULE_ALIAS("platform:i2c_davinci");
 
 static struct platform_driver davinci_i2c_driver = {
 	.probe		= davinci_i2c_probe,
-	.remove		= davinci_i2c_remove,
+	.remove_new	= davinci_i2c_remove,
 	.driver		= {
 		.name	= "i2c_davinci",
 		.pm	= davinci_i2c_pm_ops,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 18/89] i2c: designware-platdrv: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (16 preceding siblings ...)
  2023-05-08 20:51 ` [PATCH 17/89] i2c: davinci: Convert to platform remove callback returning void Uwe Kleine-König
@ 2023-05-08 20:51 ` Uwe Kleine-König
  2023-05-11  8:28   ` Jarkko Nikula
  2023-05-08 20:51 ` [PATCH 19/89] i2c: digicolor: " Uwe Kleine-König
                   ` (71 subsequent siblings)
  89 siblings, 1 reply; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:51 UTC (permalink / raw)
  To: Jarkko Nikula, Wolfram Sang
  Cc: Andy Shevchenko, Mika Westerberg, Jan Dabros, linux-i2c, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/busses/i2c-designware-platdrv.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/busses/i2c-designware-platdrv.c
index 89ad88c54754..b404dcd6a646 100644
--- a/drivers/i2c/busses/i2c-designware-platdrv.c
+++ b/drivers/i2c/busses/i2c-designware-platdrv.c
@@ -384,7 +384,7 @@ static int dw_i2c_plat_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int dw_i2c_plat_remove(struct platform_device *pdev)
+static void dw_i2c_plat_remove(struct platform_device *pdev)
 {
 	struct dw_i2c_dev *dev = platform_get_drvdata(pdev);
 
@@ -401,8 +401,6 @@ static int dw_i2c_plat_remove(struct platform_device *pdev)
 	i2c_dw_remove_lock_support(dev);
 
 	reset_control_assert(dev->rst);
-
-	return 0;
 }
 
 #ifdef CONFIG_PM_SLEEP
@@ -481,7 +479,7 @@ MODULE_ALIAS("platform:i2c_designware");
 
 static struct platform_driver dw_i2c_driver = {
 	.probe = dw_i2c_plat_probe,
-	.remove = dw_i2c_plat_remove,
+	.remove_new = dw_i2c_plat_remove,
 	.driver		= {
 		.name	= "i2c_designware",
 		.of_match_table = of_match_ptr(dw_i2c_of_match),
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 19/89] i2c: digicolor: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (17 preceding siblings ...)
  2023-05-08 20:51 ` [PATCH 18/89] i2c: designware-platdrv: " Uwe Kleine-König
@ 2023-05-08 20:51 ` Uwe Kleine-König
  2023-05-09  3:15   ` Baruch Siach
  2023-05-08 20:51 ` [PATCH 20/89] i2c: dln2: " Uwe Kleine-König
                   ` (70 subsequent siblings)
  89 siblings, 1 reply; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:51 UTC (permalink / raw)
  To: Baruch Siach, Wolfram Sang, Wolfram Sang
  Cc: linux-i2c, linux-arm-kernel, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/busses/i2c-digicolor.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/i2c-digicolor.c b/drivers/i2c/busses/i2c-digicolor.c
index 50925d97fa42..3462f2bc0fa8 100644
--- a/drivers/i2c/busses/i2c-digicolor.c
+++ b/drivers/i2c/busses/i2c-digicolor.c
@@ -347,14 +347,12 @@ static int dc_i2c_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int dc_i2c_remove(struct platform_device *pdev)
+static void dc_i2c_remove(struct platform_device *pdev)
 {
 	struct dc_i2c *i2c = platform_get_drvdata(pdev);
 
 	i2c_del_adapter(&i2c->adap);
 	clk_disable_unprepare(i2c->clk);
-
-	return 0;
 }
 
 static const struct of_device_id dc_i2c_match[] = {
@@ -365,7 +363,7 @@ MODULE_DEVICE_TABLE(of, dc_i2c_match);
 
 static struct platform_driver dc_i2c_driver = {
 	.probe   = dc_i2c_probe,
-	.remove  = dc_i2c_remove,
+	.remove_new = dc_i2c_remove,
 	.driver  = {
 		.name  = "digicolor-i2c",
 		.of_match_table = dc_i2c_match,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 20/89] i2c: dln2: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (18 preceding siblings ...)
  2023-05-08 20:51 ` [PATCH 19/89] i2c: digicolor: " Uwe Kleine-König
@ 2023-05-08 20:51 ` Uwe Kleine-König
  2023-05-08 20:51 ` [PATCH 21/89] i2c: emev2: " Uwe Kleine-König
                   ` (69 subsequent siblings)
  89 siblings, 0 replies; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:51 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: linux-i2c, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/busses/i2c-dln2.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/i2c-dln2.c b/drivers/i2c/busses/i2c-dln2.c
index 2a2089db71a5..4f02cc2fb567 100644
--- a/drivers/i2c/busses/i2c-dln2.c
+++ b/drivers/i2c/busses/i2c-dln2.c
@@ -236,20 +236,18 @@ static int dln2_i2c_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int dln2_i2c_remove(struct platform_device *pdev)
+static void dln2_i2c_remove(struct platform_device *pdev)
 {
 	struct dln2_i2c *dln2 = platform_get_drvdata(pdev);
 
 	i2c_del_adapter(&dln2->adapter);
 	dln2_i2c_enable(dln2, false);
-
-	return 0;
 }
 
 static struct platform_driver dln2_i2c_driver = {
 	.driver.name	= "dln2-i2c",
 	.probe		= dln2_i2c_probe,
-	.remove		= dln2_i2c_remove,
+	.remove_new	= dln2_i2c_remove,
 };
 
 module_platform_driver(dln2_i2c_driver);
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 21/89] i2c: emev2: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (19 preceding siblings ...)
  2023-05-08 20:51 ` [PATCH 20/89] i2c: dln2: " Uwe Kleine-König
@ 2023-05-08 20:51 ` Uwe Kleine-König
  2023-05-09  7:01   ` Geert Uytterhoeven
  2023-05-08 20:51 ` [PATCH 22/89] i2c: exynos5: " Uwe Kleine-König
                   ` (68 subsequent siblings)
  89 siblings, 1 reply; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:51 UTC (permalink / raw)
  To: Wolfram Sang, Wolfram Sang; +Cc: linux-renesas-soc, linux-i2c, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/busses/i2c-emev2.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/i2c-emev2.c b/drivers/i2c/busses/i2c-emev2.c
index f2e537b137b2..4ba93cd91c0f 100644
--- a/drivers/i2c/busses/i2c-emev2.c
+++ b/drivers/i2c/busses/i2c-emev2.c
@@ -419,14 +419,12 @@ static int em_i2c_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int em_i2c_remove(struct platform_device *dev)
+static void em_i2c_remove(struct platform_device *dev)
 {
 	struct em_i2c_device *priv = platform_get_drvdata(dev);
 
 	i2c_del_adapter(&priv->adap);
 	clk_disable_unprepare(priv->sclk);
-
-	return 0;
 }
 
 static const struct of_device_id em_i2c_ids[] = {
@@ -436,7 +434,7 @@ static const struct of_device_id em_i2c_ids[] = {
 
 static struct platform_driver em_i2c_driver = {
 	.probe = em_i2c_probe,
-	.remove = em_i2c_remove,
+	.remove_new = em_i2c_remove,
 	.driver = {
 		.name = "em-i2c",
 		.of_match_table = em_i2c_ids,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 22/89] i2c: exynos5: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (20 preceding siblings ...)
  2023-05-08 20:51 ` [PATCH 21/89] i2c: emev2: " Uwe Kleine-König
@ 2023-05-08 20:51 ` Uwe Kleine-König
  2023-05-09 15:08   ` Krzysztof Kozlowski
  2023-05-08 20:52 ` [PATCH 23/89] i2c: gpio: " Uwe Kleine-König
                   ` (67 subsequent siblings)
  89 siblings, 1 reply; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:51 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Wolfram Sang, Wolfram Sang
  Cc: Alim Akhtar, linux-i2c, linux-arm-kernel, linux-samsung-soc, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/busses/i2c-exynos5.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/i2c-exynos5.c b/drivers/i2c/busses/i2c-exynos5.c
index 4a6260d04db2..f378cd479e55 100644
--- a/drivers/i2c/busses/i2c-exynos5.c
+++ b/drivers/i2c/busses/i2c-exynos5.c
@@ -882,7 +882,7 @@ static int exynos5_i2c_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int exynos5_i2c_remove(struct platform_device *pdev)
+static void exynos5_i2c_remove(struct platform_device *pdev)
 {
 	struct exynos5_i2c *i2c = platform_get_drvdata(pdev);
 
@@ -890,8 +890,6 @@ static int exynos5_i2c_remove(struct platform_device *pdev)
 
 	clk_unprepare(i2c->clk);
 	clk_unprepare(i2c->pclk);
-
-	return 0;
 }
 
 #ifdef CONFIG_PM_SLEEP
@@ -945,7 +943,7 @@ static const struct dev_pm_ops exynos5_i2c_dev_pm_ops = {
 
 static struct platform_driver exynos5_i2c_driver = {
 	.probe		= exynos5_i2c_probe,
-	.remove		= exynos5_i2c_remove,
+	.remove_new	= exynos5_i2c_remove,
 	.driver		= {
 		.name	= "exynos5-hsi2c",
 		.pm	= &exynos5_i2c_dev_pm_ops,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 23/89] i2c: gpio: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (21 preceding siblings ...)
  2023-05-08 20:51 ` [PATCH 22/89] i2c: exynos5: " Uwe Kleine-König
@ 2023-05-08 20:52 ` Uwe Kleine-König
  2023-05-08 20:52 ` [PATCH 24/89] i2c: gxp: " Uwe Kleine-König
                   ` (66 subsequent siblings)
  89 siblings, 0 replies; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:52 UTC (permalink / raw)
  To: Wolfram Sang, Wolfram Sang; +Cc: linux-i2c, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/busses/i2c-gpio.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/i2c-gpio.c b/drivers/i2c/busses/i2c-gpio.c
index 1794c0399f22..e5a5b9e8bf2c 100644
--- a/drivers/i2c/busses/i2c-gpio.c
+++ b/drivers/i2c/busses/i2c-gpio.c
@@ -475,7 +475,7 @@ static int i2c_gpio_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int i2c_gpio_remove(struct platform_device *pdev)
+static void i2c_gpio_remove(struct platform_device *pdev)
 {
 	struct i2c_gpio_private_data *priv;
 	struct i2c_adapter *adap;
@@ -486,8 +486,6 @@ static int i2c_gpio_remove(struct platform_device *pdev)
 	adap = &priv->adap;
 
 	i2c_del_adapter(adap);
-
-	return 0;
 }
 
 static const struct of_device_id i2c_gpio_dt_ids[] = {
@@ -510,7 +508,7 @@ static struct platform_driver i2c_gpio_driver = {
 		.acpi_match_table = i2c_gpio_acpi_match,
 	},
 	.probe		= i2c_gpio_probe,
-	.remove		= i2c_gpio_remove,
+	.remove_new	= i2c_gpio_remove,
 };
 
 static int __init i2c_gpio_init(void)
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 24/89] i2c: gxp: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (22 preceding siblings ...)
  2023-05-08 20:52 ` [PATCH 23/89] i2c: gpio: " Uwe Kleine-König
@ 2023-05-08 20:52 ` Uwe Kleine-König
  2023-05-08 20:52 ` [PATCH 25/89] i2c: highlander: " Uwe Kleine-König
                   ` (65 subsequent siblings)
  89 siblings, 0 replies; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:52 UTC (permalink / raw)
  To: Jean-Marie Verdun, Nick Hawkins, Wolfram Sang; +Cc: linux-i2c, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/busses/i2c-gxp.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/i2c-gxp.c b/drivers/i2c/busses/i2c-gxp.c
index 8ea3fb5e4c7f..70b0de07ed99 100644
--- a/drivers/i2c/busses/i2c-gxp.c
+++ b/drivers/i2c/busses/i2c-gxp.c
@@ -577,15 +577,13 @@ static int gxp_i2c_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int gxp_i2c_remove(struct platform_device *pdev)
+static void gxp_i2c_remove(struct platform_device *pdev)
 {
 	struct gxp_i2c_drvdata *drvdata = platform_get_drvdata(pdev);
 
 	/* Disable interrupt */
 	regmap_update_bits(i2cg_map, GXP_I2CINTEN, BIT(drvdata->engine), 0);
 	i2c_del_adapter(&drvdata->adapter);
-
-	return 0;
 }
 
 static const struct of_device_id gxp_i2c_of_match[] = {
@@ -596,7 +594,7 @@ MODULE_DEVICE_TABLE(of, gxp_i2c_of_match);
 
 static struct platform_driver gxp_i2c_driver = {
 	.probe	= gxp_i2c_probe,
-	.remove = gxp_i2c_remove,
+	.remove_new = gxp_i2c_remove,
 	.driver = {
 		.name = "gxp-i2c",
 		.of_match_table = gxp_i2c_of_match,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 25/89] i2c: highlander: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (23 preceding siblings ...)
  2023-05-08 20:52 ` [PATCH 24/89] i2c: gxp: " Uwe Kleine-König
@ 2023-05-08 20:52 ` Uwe Kleine-König
  2023-05-08 20:52 ` [PATCH 26/89] i2c: hix5hd2: " Uwe Kleine-König
                   ` (64 subsequent siblings)
  89 siblings, 0 replies; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:52 UTC (permalink / raw)
  To: Wolfram Sang, Wolfram Sang; +Cc: linux-i2c, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/busses/i2c-highlander.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/i2c-highlander.c b/drivers/i2c/busses/i2c-highlander.c
index 4374a8677271..7922bc917c33 100644
--- a/drivers/i2c/busses/i2c-highlander.c
+++ b/drivers/i2c/busses/i2c-highlander.c
@@ -435,7 +435,7 @@ static int highlander_i2c_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int highlander_i2c_remove(struct platform_device *pdev)
+static void highlander_i2c_remove(struct platform_device *pdev)
 {
 	struct highlander_i2c_dev *dev = platform_get_drvdata(pdev);
 
@@ -446,8 +446,6 @@ static int highlander_i2c_remove(struct platform_device *pdev)
 
 	iounmap(dev->base);
 	kfree(dev);
-
-	return 0;
 }
 
 static struct platform_driver highlander_i2c_driver = {
@@ -456,7 +454,7 @@ static struct platform_driver highlander_i2c_driver = {
 	},
 
 	.probe		= highlander_i2c_probe,
-	.remove		= highlander_i2c_remove,
+	.remove_new	= highlander_i2c_remove,
 };
 
 module_platform_driver(highlander_i2c_driver);
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 26/89] i2c: hix5hd2: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (24 preceding siblings ...)
  2023-05-08 20:52 ` [PATCH 25/89] i2c: highlander: " Uwe Kleine-König
@ 2023-05-08 20:52 ` Uwe Kleine-König
  2023-05-08 20:52 ` [PATCH 27/89] i2c: ibm_iic: " Uwe Kleine-König
                   ` (63 subsequent siblings)
  89 siblings, 0 replies; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:52 UTC (permalink / raw)
  To: Wolfram Sang, Wolfram Sang; +Cc: linux-i2c, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/busses/i2c-hix5hd2.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/i2c-hix5hd2.c b/drivers/i2c/busses/i2c-hix5hd2.c
index 0e34cbaca22d..64feaa9dca61 100644
--- a/drivers/i2c/busses/i2c-hix5hd2.c
+++ b/drivers/i2c/busses/i2c-hix5hd2.c
@@ -464,7 +464,7 @@ static int hix5hd2_i2c_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int hix5hd2_i2c_remove(struct platform_device *pdev)
+static void hix5hd2_i2c_remove(struct platform_device *pdev)
 {
 	struct hix5hd2_i2c_priv *priv = platform_get_drvdata(pdev);
 
@@ -472,8 +472,6 @@ static int hix5hd2_i2c_remove(struct platform_device *pdev)
 	pm_runtime_disable(priv->dev);
 	pm_runtime_set_suspended(priv->dev);
 	clk_disable_unprepare(priv->clk);
-
-	return 0;
 }
 
 #ifdef CONFIG_PM
@@ -511,7 +509,7 @@ MODULE_DEVICE_TABLE(of, hix5hd2_i2c_match);
 
 static struct platform_driver hix5hd2_i2c_driver = {
 	.probe		= hix5hd2_i2c_probe,
-	.remove		= hix5hd2_i2c_remove,
+	.remove_new	= hix5hd2_i2c_remove,
 	.driver		= {
 		.name	= "hix5hd2-i2c",
 		.pm	= &hix5hd2_i2c_pm_ops,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 27/89] i2c: ibm_iic: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (25 preceding siblings ...)
  2023-05-08 20:52 ` [PATCH 26/89] i2c: hix5hd2: " Uwe Kleine-König
@ 2023-05-08 20:52 ` Uwe Kleine-König
  2023-05-08 20:52 ` [PATCH 28/89] i2c: img-scb: " Uwe Kleine-König
                   ` (62 subsequent siblings)
  89 siblings, 0 replies; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:52 UTC (permalink / raw)
  To: Wolfram Sang, Wolfram Sang; +Cc: linux-i2c, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/busses/i2c-ibm_iic.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/i2c-ibm_iic.c b/drivers/i2c/busses/i2c-ibm_iic.c
index eeb80e34f9ad..2d11577ded38 100644
--- a/drivers/i2c/busses/i2c-ibm_iic.c
+++ b/drivers/i2c/busses/i2c-ibm_iic.c
@@ -769,7 +769,7 @@ static int iic_probe(struct platform_device *ofdev)
 /*
  * Cleanup initialized IIC interface
  */
-static int iic_remove(struct platform_device *ofdev)
+static void iic_remove(struct platform_device *ofdev)
 {
 	struct ibm_iic_private *dev = platform_get_drvdata(ofdev);
 
@@ -782,8 +782,6 @@ static int iic_remove(struct platform_device *ofdev)
 
 	iounmap(dev->vaddr);
 	kfree(dev);
-
-	return 0;
 }
 
 static const struct of_device_id ibm_iic_match[] = {
@@ -798,7 +796,7 @@ static struct platform_driver ibm_iic_driver = {
 		.of_match_table = ibm_iic_match,
 	},
 	.probe	= iic_probe,
-	.remove	= iic_remove,
+	.remove_new = iic_remove,
 };
 
 module_platform_driver(ibm_iic_driver);
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 28/89] i2c: img-scb: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (26 preceding siblings ...)
  2023-05-08 20:52 ` [PATCH 27/89] i2c: ibm_iic: " Uwe Kleine-König
@ 2023-05-08 20:52 ` Uwe Kleine-König
  2023-05-08 20:52 ` [PATCH 29/89] i2c: imx-lpi2c: " Uwe Kleine-König
                   ` (61 subsequent siblings)
  89 siblings, 0 replies; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:52 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: linux-i2c, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/busses/i2c-img-scb.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/i2c-img-scb.c b/drivers/i2c/busses/i2c-img-scb.c
index 8e987945ed45..fea2940dbf2e 100644
--- a/drivers/i2c/busses/i2c-img-scb.c
+++ b/drivers/i2c/busses/i2c-img-scb.c
@@ -1413,7 +1413,7 @@ static int img_i2c_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int img_i2c_remove(struct platform_device *dev)
+static void img_i2c_remove(struct platform_device *dev)
 {
 	struct img_i2c *i2c = platform_get_drvdata(dev);
 
@@ -1421,8 +1421,6 @@ static int img_i2c_remove(struct platform_device *dev)
 	pm_runtime_disable(&dev->dev);
 	if (!pm_runtime_status_suspended(&dev->dev))
 		img_i2c_runtime_suspend(&dev->dev);
-
-	return 0;
 }
 
 static int img_i2c_runtime_suspend(struct device *dev)
@@ -1506,7 +1504,7 @@ static struct platform_driver img_scb_i2c_driver = {
 		.pm		= &img_i2c_pm,
 	},
 	.probe = img_i2c_probe,
-	.remove = img_i2c_remove,
+	.remove_new = img_i2c_remove,
 };
 module_platform_driver(img_scb_i2c_driver);
 
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 29/89] i2c: imx-lpi2c: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (27 preceding siblings ...)
  2023-05-08 20:52 ` [PATCH 28/89] i2c: img-scb: " Uwe Kleine-König
@ 2023-05-08 20:52 ` Uwe Kleine-König
  2023-05-08 20:52 ` [PATCH 30/89] i2c: imx: " Uwe Kleine-König
                   ` (60 subsequent siblings)
  89 siblings, 0 replies; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:52 UTC (permalink / raw)
  To: Dong Aisheng, Shawn Guo, Sascha Hauer, Wolfram Sang
  Cc: Fabio Estevam, NXP Linux Team, linux-i2c, linux-arm-kernel, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/busses/i2c-imx-lpi2c.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/i2c-imx-lpi2c.c b/drivers/i2c/busses/i2c-imx-lpi2c.c
index 1af0a637d7f1..48e695880d0a 100644
--- a/drivers/i2c/busses/i2c-imx-lpi2c.c
+++ b/drivers/i2c/busses/i2c-imx-lpi2c.c
@@ -623,7 +623,7 @@ static int lpi2c_imx_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int lpi2c_imx_remove(struct platform_device *pdev)
+static void lpi2c_imx_remove(struct platform_device *pdev)
 {
 	struct lpi2c_imx_struct *lpi2c_imx = platform_get_drvdata(pdev);
 
@@ -631,8 +631,6 @@ static int lpi2c_imx_remove(struct platform_device *pdev)
 
 	pm_runtime_disable(&pdev->dev);
 	pm_runtime_dont_use_autosuspend(&pdev->dev);
-
-	return 0;
 }
 
 static int __maybe_unused lpi2c_runtime_suspend(struct device *dev)
@@ -669,7 +667,7 @@ static const struct dev_pm_ops lpi2c_pm_ops = {
 
 static struct platform_driver lpi2c_imx_driver = {
 	.probe = lpi2c_imx_probe,
-	.remove = lpi2c_imx_remove,
+	.remove_new = lpi2c_imx_remove,
 	.driver = {
 		.name = DRIVER_NAME,
 		.of_match_table = lpi2c_imx_of_match,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 30/89] i2c: imx: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (28 preceding siblings ...)
  2023-05-08 20:52 ` [PATCH 29/89] i2c: imx-lpi2c: " Uwe Kleine-König
@ 2023-05-08 20:52 ` Uwe Kleine-König
  2023-05-08 20:52 ` [PATCH 31/89] i2c: iop3xx: " Uwe Kleine-König
                   ` (59 subsequent siblings)
  89 siblings, 0 replies; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:52 UTC (permalink / raw)
  To: Oleksij Rempel, Shawn Guo, Sascha Hauer, Wolfram Sang
  Cc: Fabio Estevam, NXP Linux Team, linux-i2c, linux-arm-kernel, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/busses/i2c-imx.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c
index 42189a5f2905..65128a73e8a3 100644
--- a/drivers/i2c/busses/i2c-imx.c
+++ b/drivers/i2c/busses/i2c-imx.c
@@ -1561,7 +1561,7 @@ static int i2c_imx_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int i2c_imx_remove(struct platform_device *pdev)
+static void i2c_imx_remove(struct platform_device *pdev)
 {
 	struct imx_i2c_struct *i2c_imx = platform_get_drvdata(pdev);
 	int irq, ret;
@@ -1592,8 +1592,6 @@ static int i2c_imx_remove(struct platform_device *pdev)
 
 	pm_runtime_put_noidle(&pdev->dev);
 	pm_runtime_disable(&pdev->dev);
-
-	return 0;
 }
 
 static int __maybe_unused i2c_imx_runtime_suspend(struct device *dev)
@@ -1624,7 +1622,7 @@ static const struct dev_pm_ops i2c_imx_pm_ops = {
 
 static struct platform_driver i2c_imx_driver = {
 	.probe = i2c_imx_probe,
-	.remove = i2c_imx_remove,
+	.remove_new = i2c_imx_remove,
 	.driver = {
 		.name = DRIVER_NAME,
 		.pm = &i2c_imx_pm_ops,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 31/89] i2c: iop3xx: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (29 preceding siblings ...)
  2023-05-08 20:52 ` [PATCH 30/89] i2c: imx: " Uwe Kleine-König
@ 2023-05-08 20:52 ` Uwe Kleine-König
  2023-05-08 20:52 ` [PATCH 32/89] i2c: isch: " Uwe Kleine-König
                   ` (58 subsequent siblings)
  89 siblings, 0 replies; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:52 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: linux-i2c, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/busses/i2c-iop3xx.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/i2c-iop3xx.c b/drivers/i2c/busses/i2c-iop3xx.c
index 4a6ff54d87fe..f2f7ebeeaecb 100644
--- a/drivers/i2c/busses/i2c-iop3xx.c
+++ b/drivers/i2c/busses/i2c-iop3xx.c
@@ -388,7 +388,7 @@ static const struct i2c_algorithm iop3xx_i2c_algo = {
 	.functionality	= iop3xx_i2c_func,
 };
 
-static int
+static void
 iop3xx_i2c_remove(struct platform_device *pdev)
 {
 	struct i2c_adapter *padapter = platform_get_drvdata(pdev);
@@ -408,8 +408,6 @@ iop3xx_i2c_remove(struct platform_device *pdev)
 	release_mem_region(res->start, IOP3XX_I2C_IO_SIZE);
 	kfree(adapter_data);
 	kfree(padapter);
-
-	return 0;
 }
 
 static int
@@ -529,7 +527,7 @@ MODULE_DEVICE_TABLE(of, i2c_iop3xx_match);
 
 static struct platform_driver iop3xx_i2c_driver = {
 	.probe		= iop3xx_i2c_probe,
-	.remove		= iop3xx_i2c_remove,
+	.remove_new	= iop3xx_i2c_remove,
 	.driver		= {
 		.name	= "IOP3xx-I2C",
 		.of_match_table = i2c_iop3xx_match,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 32/89] i2c: isch: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (30 preceding siblings ...)
  2023-05-08 20:52 ` [PATCH 31/89] i2c: iop3xx: " Uwe Kleine-König
@ 2023-05-08 20:52 ` Uwe Kleine-König
  2023-05-09 11:04   ` Jean Delvare
  2023-05-08 20:52 ` [PATCH 33/89] i2c: jz4780: " Uwe Kleine-König
                   ` (57 subsequent siblings)
  89 siblings, 1 reply; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:52 UTC (permalink / raw)
  To: Jean Delvare, Wolfram Sang; +Cc: linux-i2c, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/busses/i2c-isch.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/i2c-isch.c b/drivers/i2c/busses/i2c-isch.c
index 2dc7ada06ac5..1dc1ceaa4443 100644
--- a/drivers/i2c/busses/i2c-isch.c
+++ b/drivers/i2c/busses/i2c-isch.c
@@ -286,14 +286,12 @@ static int smbus_sch_probe(struct platform_device *dev)
 	return retval;
 }
 
-static int smbus_sch_remove(struct platform_device *pdev)
+static void smbus_sch_remove(struct platform_device *pdev)
 {
 	if (sch_smba) {
 		i2c_del_adapter(&sch_adapter);
 		sch_smba = 0;
 	}
-
-	return 0;
 }
 
 static struct platform_driver smbus_sch_driver = {
@@ -301,7 +299,7 @@ static struct platform_driver smbus_sch_driver = {
 		.name = "isch_smbus",
 	},
 	.probe		= smbus_sch_probe,
-	.remove		= smbus_sch_remove,
+	.remove_new	= smbus_sch_remove,
 };
 
 module_platform_driver(smbus_sch_driver);
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 33/89] i2c: jz4780: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (31 preceding siblings ...)
  2023-05-08 20:52 ` [PATCH 32/89] i2c: isch: " Uwe Kleine-König
@ 2023-05-08 20:52 ` Uwe Kleine-König
  2023-05-08 20:52 ` [PATCH 34/89] i2c: kempld: " Uwe Kleine-König
                   ` (56 subsequent siblings)
  89 siblings, 0 replies; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:52 UTC (permalink / raw)
  To: Paul Cercueil, Wolfram Sang; +Cc: linux-mips, linux-i2c, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/busses/i2c-jz4780.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/i2c/busses/i2c-jz4780.c b/drivers/i2c/busses/i2c-jz4780.c
index baa7319eee53..0dfe60399521 100644
--- a/drivers/i2c/busses/i2c-jz4780.c
+++ b/drivers/i2c/busses/i2c-jz4780.c
@@ -845,18 +845,17 @@ static int jz4780_i2c_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int jz4780_i2c_remove(struct platform_device *pdev)
+static void jz4780_i2c_remove(struct platform_device *pdev)
 {
 	struct jz4780_i2c *i2c = platform_get_drvdata(pdev);
 
 	clk_disable_unprepare(i2c->clk);
 	i2c_del_adapter(&i2c->adap);
-	return 0;
 }
 
 static struct platform_driver jz4780_i2c_driver = {
 	.probe		= jz4780_i2c_probe,
-	.remove		= jz4780_i2c_remove,
+	.remove_new	= jz4780_i2c_remove,
 	.driver		= {
 		.name	= "jz4780-i2c",
 		.of_match_table = jz4780_i2c_of_matches,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 34/89] i2c: kempld: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (32 preceding siblings ...)
  2023-05-08 20:52 ` [PATCH 33/89] i2c: jz4780: " Uwe Kleine-König
@ 2023-05-08 20:52 ` Uwe Kleine-König
  2023-05-09  7:52   ` Chris Pringle
  2023-05-08 20:52 ` [PATCH 35/89] i2c: lpc2k: " Uwe Kleine-König
                   ` (55 subsequent siblings)
  89 siblings, 1 reply; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:52 UTC (permalink / raw)
  To: Wolfram Sang, Chris Pringle; +Cc: linux-i2c, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/busses/i2c-kempld.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/i2c-kempld.c b/drivers/i2c/busses/i2c-kempld.c
index cf857cf22507..281058e3ea46 100644
--- a/drivers/i2c/busses/i2c-kempld.c
+++ b/drivers/i2c/busses/i2c-kempld.c
@@ -329,7 +329,7 @@ static int kempld_i2c_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int kempld_i2c_remove(struct platform_device *pdev)
+static void kempld_i2c_remove(struct platform_device *pdev)
 {
 	struct kempld_i2c_data *i2c = platform_get_drvdata(pdev);
 	struct kempld_device_data *pld = i2c->pld;
@@ -348,8 +348,6 @@ static int kempld_i2c_remove(struct platform_device *pdev)
 	kempld_release_mutex(pld);
 
 	i2c_del_adapter(&i2c->adap);
-
-	return 0;
 }
 
 #ifdef CONFIG_PM
@@ -389,7 +387,7 @@ static struct platform_driver kempld_i2c_driver = {
 		.name = "kempld-i2c",
 	},
 	.probe		= kempld_i2c_probe,
-	.remove		= kempld_i2c_remove,
+	.remove_new	= kempld_i2c_remove,
 	.suspend	= kempld_i2c_suspend,
 	.resume		= kempld_i2c_resume,
 };
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 35/89] i2c: lpc2k: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (33 preceding siblings ...)
  2023-05-08 20:52 ` [PATCH 34/89] i2c: kempld: " Uwe Kleine-König
@ 2023-05-08 20:52 ` Uwe Kleine-König
  2023-05-08 20:52 ` [PATCH 36/89] i2c: meson: " Uwe Kleine-König
                   ` (54 subsequent siblings)
  89 siblings, 0 replies; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:52 UTC (permalink / raw)
  To: Vladimir Zapolskiy, Wolfram Sang; +Cc: linux-arm-kernel, linux-i2c, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/busses/i2c-lpc2k.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/i2c-lpc2k.c b/drivers/i2c/busses/i2c-lpc2k.c
index 8fff6fbb7065..469fe907723e 100644
--- a/drivers/i2c/busses/i2c-lpc2k.c
+++ b/drivers/i2c/busses/i2c-lpc2k.c
@@ -435,14 +435,12 @@ static int i2c_lpc2k_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int i2c_lpc2k_remove(struct platform_device *dev)
+static void i2c_lpc2k_remove(struct platform_device *dev)
 {
 	struct lpc2k_i2c *i2c = platform_get_drvdata(dev);
 
 	i2c_del_adapter(&i2c->adap);
 	clk_disable_unprepare(i2c->clk);
-
-	return 0;
 }
 
 #ifdef CONFIG_PM
@@ -483,7 +481,7 @@ MODULE_DEVICE_TABLE(of, lpc2k_i2c_match);
 
 static struct platform_driver i2c_lpc2k_driver = {
 	.probe	= i2c_lpc2k_probe,
-	.remove	= i2c_lpc2k_remove,
+	.remove_new = i2c_lpc2k_remove,
 	.driver	= {
 		.name		= "lpc2k-i2c",
 		.pm		= I2C_LPC2K_DEV_PM_OPS,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 36/89] i2c: meson: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (34 preceding siblings ...)
  2023-05-08 20:52 ` [PATCH 35/89] i2c: lpc2k: " Uwe Kleine-König
@ 2023-05-08 20:52 ` Uwe Kleine-König
  2023-05-10 20:41   ` Martin Blumenstingl
  2023-05-08 20:52 ` [PATCH 37/89] i2c: microchip-corei2c: " Uwe Kleine-König
                   ` (53 subsequent siblings)
  89 siblings, 1 reply; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:52 UTC (permalink / raw)
  To: Neil Armstrong, Kevin Hilman, Wolfram Sang, Julia Lawall, Wolfram Sang
  Cc: Jerome Brunet, Martin Blumenstingl, linux-i2c, linux-arm-kernel,
	linux-amlogic, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/busses/i2c-meson.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/i2c-meson.c b/drivers/i2c/busses/i2c-meson.c
index 889eff06b78f..16026c895bb6 100644
--- a/drivers/i2c/busses/i2c-meson.c
+++ b/drivers/i2c/busses/i2c-meson.c
@@ -535,14 +535,12 @@ static int meson_i2c_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int meson_i2c_remove(struct platform_device *pdev)
+static void meson_i2c_remove(struct platform_device *pdev)
 {
 	struct meson_i2c *i2c = platform_get_drvdata(pdev);
 
 	i2c_del_adapter(&i2c->adap);
 	clk_disable_unprepare(i2c->clk);
-
-	return 0;
 }
 
 static const struct meson_i2c_data i2c_meson6_data = {
@@ -568,7 +566,7 @@ MODULE_DEVICE_TABLE(of, meson_i2c_match);
 
 static struct platform_driver meson_i2c_driver = {
 	.probe   = meson_i2c_probe,
-	.remove  = meson_i2c_remove,
+	.remove_new = meson_i2c_remove,
 	.driver  = {
 		.name  = "meson-i2c",
 		.of_match_table = meson_i2c_match,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 37/89] i2c: microchip-corei2c: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (35 preceding siblings ...)
  2023-05-08 20:52 ` [PATCH 36/89] i2c: meson: " Uwe Kleine-König
@ 2023-05-08 20:52 ` Uwe Kleine-König
  2023-05-08 21:00   ` Conor Dooley
  2023-05-08 20:52 ` [PATCH 38/89] i2c: mlxbf: " Uwe Kleine-König
                   ` (52 subsequent siblings)
  89 siblings, 1 reply; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:52 UTC (permalink / raw)
  To: Conor Dooley, Daire McNamara, Wolfram Sang; +Cc: linux-riscv, linux-i2c, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/busses/i2c-microchip-corei2c.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/i2c-microchip-corei2c.c b/drivers/i2c/busses/i2c-microchip-corei2c.c
index 4d7e9b25f018..7f58f7eaabb6 100644
--- a/drivers/i2c/busses/i2c-microchip-corei2c.c
+++ b/drivers/i2c/busses/i2c-microchip-corei2c.c
@@ -446,14 +446,12 @@ static int mchp_corei2c_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int mchp_corei2c_remove(struct platform_device *pdev)
+static void mchp_corei2c_remove(struct platform_device *pdev)
 {
 	struct mchp_corei2c_dev *idev = platform_get_drvdata(pdev);
 
 	clk_disable_unprepare(idev->i2c_clk);
 	i2c_del_adapter(&idev->adapter);
-
-	return 0;
 }
 
 static const struct of_device_id mchp_corei2c_of_match[] = {
@@ -465,7 +463,7 @@ MODULE_DEVICE_TABLE(of, mchp_corei2c_of_match);
 
 static struct platform_driver mchp_corei2c_driver = {
 	.probe = mchp_corei2c_probe,
-	.remove = mchp_corei2c_remove,
+	.remove_new = mchp_corei2c_remove,
 	.driver = {
 		.name = "microchip-corei2c",
 		.of_match_table = mchp_corei2c_of_match,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 38/89] i2c: mlxbf: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (36 preceding siblings ...)
  2023-05-08 20:52 ` [PATCH 37/89] i2c: microchip-corei2c: " Uwe Kleine-König
@ 2023-05-08 20:52 ` Uwe Kleine-König
  2023-05-08 21:01   ` Asmaa Mnebhi
  2023-05-08 20:52 ` [PATCH 39/89] i2c: mlxcpld: " Uwe Kleine-König
                   ` (51 subsequent siblings)
  89 siblings, 1 reply; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:52 UTC (permalink / raw)
  To: Khalil Blaiech, Asmaa Mnebhi, Wolfram Sang; +Cc: linux-i2c, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/busses/i2c-mlxbf.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/i2c-mlxbf.c b/drivers/i2c/busses/i2c-mlxbf.c
index 1810d5791b3d..ae66bdd1b737 100644
--- a/drivers/i2c/busses/i2c-mlxbf.c
+++ b/drivers/i2c/busses/i2c-mlxbf.c
@@ -2433,7 +2433,7 @@ static int mlxbf_i2c_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int mlxbf_i2c_remove(struct platform_device *pdev)
+static void mlxbf_i2c_remove(struct platform_device *pdev)
 {
 	struct mlxbf_i2c_priv *priv = platform_get_drvdata(pdev);
 	struct device *dev = &pdev->dev;
@@ -2474,13 +2474,11 @@ static int mlxbf_i2c_remove(struct platform_device *pdev)
 	devm_free_irq(dev, priv->irq, priv);
 
 	i2c_del_adapter(&priv->adap);
-
-	return 0;
 }
 
 static struct platform_driver mlxbf_i2c_driver = {
 	.probe = mlxbf_i2c_probe,
-	.remove = mlxbf_i2c_remove,
+	.remove_new = mlxbf_i2c_remove,
 	.driver = {
 		.name = "i2c-mlxbf",
 		.acpi_match_table = ACPI_PTR(mlxbf_i2c_acpi_ids),
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 39/89] i2c: mlxcpld: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (37 preceding siblings ...)
  2023-05-08 20:52 ` [PATCH 38/89] i2c: mlxbf: " Uwe Kleine-König
@ 2023-05-08 20:52 ` Uwe Kleine-König
  2023-05-09  5:55   ` Vadim Pasternak
  2023-05-08 20:52 ` [PATCH 40/89] i2c: mpc: " Uwe Kleine-König
                   ` (50 subsequent siblings)
  89 siblings, 1 reply; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:52 UTC (permalink / raw)
  To: Vadim Pasternak, Michael Shych, Wolfram Sang; +Cc: linux-i2c, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/busses/i2c-mlxcpld.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/i2c-mlxcpld.c b/drivers/i2c/busses/i2c-mlxcpld.c
index 081f51ef0551..c42fd4b329e4 100644
--- a/drivers/i2c/busses/i2c-mlxcpld.c
+++ b/drivers/i2c/busses/i2c-mlxcpld.c
@@ -571,19 +571,17 @@ static int mlxcpld_i2c_probe(struct platform_device *pdev)
 	return err;
 }
 
-static int mlxcpld_i2c_remove(struct platform_device *pdev)
+static void mlxcpld_i2c_remove(struct platform_device *pdev)
 {
 	struct mlxcpld_i2c_priv *priv = platform_get_drvdata(pdev);
 
 	i2c_del_adapter(&priv->adap);
 	mutex_destroy(&priv->lock);
-
-	return 0;
 }
 
 static struct platform_driver mlxcpld_i2c_driver = {
 	.probe		= mlxcpld_i2c_probe,
-	.remove		= mlxcpld_i2c_remove,
+	.remove_new	= mlxcpld_i2c_remove,
 	.driver = {
 		.name = MLXCPLD_I2C_DEVICE_NAME,
 	},
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 40/89] i2c: mpc: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (38 preceding siblings ...)
  2023-05-08 20:52 ` [PATCH 39/89] i2c: mlxcpld: " Uwe Kleine-König
@ 2023-05-08 20:52 ` Uwe Kleine-König
  2023-05-08 21:11   ` Chris Packham
  2023-05-08 20:52 ` [PATCH 41/89] i2c: mt65xx: " Uwe Kleine-König
                   ` (49 subsequent siblings)
  89 siblings, 1 reply; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:52 UTC (permalink / raw)
  To: Chris Packham, Wolfram Sang; +Cc: linux-i2c, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/busses/i2c-mpc.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/i2c-mpc.c b/drivers/i2c/busses/i2c-mpc.c
index cfd074ee6d54..a308afb3cca5 100644
--- a/drivers/i2c/busses/i2c-mpc.c
+++ b/drivers/i2c/busses/i2c-mpc.c
@@ -890,15 +890,13 @@ static int fsl_i2c_probe(struct platform_device *op)
 	return result;
 };
 
-static int fsl_i2c_remove(struct platform_device *op)
+static void fsl_i2c_remove(struct platform_device *op)
 {
 	struct mpc_i2c *i2c = platform_get_drvdata(op);
 
 	i2c_del_adapter(&i2c->adap);
 
 	clk_disable_unprepare(i2c->clk_per);
-
-	return 0;
 };
 
 static int __maybe_unused mpc_i2c_suspend(struct device *dev)
@@ -959,7 +957,7 @@ MODULE_DEVICE_TABLE(of, mpc_i2c_of_match);
 /* Structure for a device driver */
 static struct platform_driver mpc_i2c_driver = {
 	.probe		= fsl_i2c_probe,
-	.remove		= fsl_i2c_remove,
+	.remove_new	= fsl_i2c_remove,
 	.driver = {
 		.name = DRV_NAME,
 		.of_match_table = mpc_i2c_of_match,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 41/89] i2c: mt65xx: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (39 preceding siblings ...)
  2023-05-08 20:52 ` [PATCH 40/89] i2c: mpc: " Uwe Kleine-König
@ 2023-05-08 20:52 ` Uwe Kleine-König
  2023-05-10 16:55   ` Matthias Brugger
  2023-05-08 20:52 ` [PATCH 42/89] i2c: mt7621: " Uwe Kleine-König
                   ` (48 subsequent siblings)
  89 siblings, 1 reply; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:52 UTC (permalink / raw)
  To: Qii Wang, Matthias Brugger, Wolfram Sang
  Cc: AngeloGioacchino Del Regno, linux-i2c, kernel, linux-arm-kernel,
	linux-mediatek

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/busses/i2c-mt65xx.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/i2c-mt65xx.c b/drivers/i2c/busses/i2c-mt65xx.c
index a43c4d77739a..7ca3f2221ba6 100644
--- a/drivers/i2c/busses/i2c-mt65xx.c
+++ b/drivers/i2c/busses/i2c-mt65xx.c
@@ -1505,15 +1505,13 @@ static int mtk_i2c_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int mtk_i2c_remove(struct platform_device *pdev)
+static void mtk_i2c_remove(struct platform_device *pdev)
 {
 	struct mtk_i2c *i2c = platform_get_drvdata(pdev);
 
 	i2c_del_adapter(&i2c->adap);
 
 	clk_bulk_unprepare(I2C_MT65XX_CLK_MAX, i2c->clocks);
-
-	return 0;
 }
 
 #ifdef CONFIG_PM_SLEEP
@@ -1555,7 +1553,7 @@ static const struct dev_pm_ops mtk_i2c_pm = {
 
 static struct platform_driver mtk_i2c_driver = {
 	.probe = mtk_i2c_probe,
-	.remove = mtk_i2c_remove,
+	.remove_new = mtk_i2c_remove,
 	.driver = {
 		.name = I2C_DRV_NAME,
 		.pm = &mtk_i2c_pm,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 42/89] i2c: mt7621: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (40 preceding siblings ...)
  2023-05-08 20:52 ` [PATCH 41/89] i2c: mt65xx: " Uwe Kleine-König
@ 2023-05-08 20:52 ` Uwe Kleine-König
  2023-05-10 16:56   ` Matthias Brugger
  2023-05-08 20:52 ` [PATCH 43/89] i2c: mv64xxx: " Uwe Kleine-König
                   ` (47 subsequent siblings)
  89 siblings, 1 reply; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:52 UTC (permalink / raw)
  To: Stefan Roese, Matthias Brugger, Wolfram Sang
  Cc: AngeloGioacchino Del Regno, linux-i2c, kernel, linux-arm-kernel,
	linux-mediatek

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/busses/i2c-mt7621.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/i2c-mt7621.c b/drivers/i2c/busses/i2c-mt7621.c
index 20eda5738ac4..f9c294e2bd3c 100644
--- a/drivers/i2c/busses/i2c-mt7621.c
+++ b/drivers/i2c/busses/i2c-mt7621.c
@@ -332,19 +332,17 @@ static int mtk_i2c_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int mtk_i2c_remove(struct platform_device *pdev)
+static void mtk_i2c_remove(struct platform_device *pdev)
 {
 	struct mtk_i2c *i2c = platform_get_drvdata(pdev);
 
 	clk_disable_unprepare(i2c->clk);
 	i2c_del_adapter(&i2c->adap);
-
-	return 0;
 }
 
 static struct platform_driver mtk_i2c_driver = {
 	.probe		= mtk_i2c_probe,
-	.remove		= mtk_i2c_remove,
+	.remove_new	= mtk_i2c_remove,
 	.driver		= {
 		.name	= "i2c-mt7621",
 		.of_match_table = i2c_mtk_dt_ids,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 43/89] i2c: mv64xxx: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (41 preceding siblings ...)
  2023-05-08 20:52 ` [PATCH 42/89] i2c: mt7621: " Uwe Kleine-König
@ 2023-05-08 20:52 ` Uwe Kleine-König
  2023-05-08 20:52 ` [PATCH 44/89] i2c: mxs: " Uwe Kleine-König
                   ` (46 subsequent siblings)
  89 siblings, 0 replies; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:52 UTC (permalink / raw)
  To: Gregory CLEMENT, Wolfram Sang; +Cc: linux-i2c, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/busses/i2c-mv64xxx.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/i2c-mv64xxx.c b/drivers/i2c/busses/i2c-mv64xxx.c
index 047dfef7a657..30fd688e12d9 100644
--- a/drivers/i2c/busses/i2c-mv64xxx.c
+++ b/drivers/i2c/busses/i2c-mv64xxx.c
@@ -1073,7 +1073,7 @@ mv64xxx_i2c_probe(struct platform_device *pd)
 	return rc;
 }
 
-static int
+static void
 mv64xxx_i2c_remove(struct platform_device *pd)
 {
 	struct mv64xxx_i2c_data		*drv_data = platform_get_drvdata(pd);
@@ -1083,8 +1083,6 @@ mv64xxx_i2c_remove(struct platform_device *pd)
 	pm_runtime_disable(&pd->dev);
 	if (!pm_runtime_status_suspended(&pd->dev))
 		mv64xxx_i2c_runtime_suspend(&pd->dev);
-
-	return 0;
 }
 
 static const struct dev_pm_ops mv64xxx_i2c_pm_ops = {
@@ -1096,7 +1094,7 @@ static const struct dev_pm_ops mv64xxx_i2c_pm_ops = {
 
 static struct platform_driver mv64xxx_i2c_driver = {
 	.probe	= mv64xxx_i2c_probe,
-	.remove	= mv64xxx_i2c_remove,
+	.remove_new = mv64xxx_i2c_remove,
 	.driver	= {
 		.name	= MV64XXX_I2C_CTLR_NAME,
 		.pm     = &mv64xxx_i2c_pm_ops,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 44/89] i2c: mxs: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (42 preceding siblings ...)
  2023-05-08 20:52 ` [PATCH 43/89] i2c: mv64xxx: " Uwe Kleine-König
@ 2023-05-08 20:52 ` Uwe Kleine-König
  2023-05-08 20:52 ` [PATCH 45/89] i2c: npcm7xx: " Uwe Kleine-König
                   ` (45 subsequent siblings)
  89 siblings, 0 replies; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:52 UTC (permalink / raw)
  To: Shawn Guo, Sascha Hauer, Wolfram Sang, Matthias Schiffer,
	Stefan Wahren, Wolfram Sang
  Cc: Fabio Estevam, NXP Linux Team, linux-i2c, linux-arm-kernel, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/busses/i2c-mxs.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/i2c-mxs.c b/drivers/i2c/busses/i2c-mxs.c
index e0f3b3545cfe..1d76f1c4dc06 100644
--- a/drivers/i2c/busses/i2c-mxs.c
+++ b/drivers/i2c/busses/i2c-mxs.c
@@ -864,7 +864,7 @@ static int mxs_i2c_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int mxs_i2c_remove(struct platform_device *pdev)
+static void mxs_i2c_remove(struct platform_device *pdev)
 {
 	struct mxs_i2c_dev *i2c = platform_get_drvdata(pdev);
 
@@ -874,8 +874,6 @@ static int mxs_i2c_remove(struct platform_device *pdev)
 		dma_release_channel(i2c->dmach);
 
 	writel(MXS_I2C_CTRL0_SFTRST, i2c->regs + MXS_I2C_CTRL0_SET);
-
-	return 0;
 }
 
 static struct platform_driver mxs_i2c_driver = {
@@ -884,7 +882,7 @@ static struct platform_driver mxs_i2c_driver = {
 		   .of_match_table = mxs_i2c_dt_ids,
 		   },
 	.probe = mxs_i2c_probe,
-	.remove = mxs_i2c_remove,
+	.remove_new = mxs_i2c_remove,
 };
 
 static int __init mxs_i2c_init(void)
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 45/89] i2c: npcm7xx: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (43 preceding siblings ...)
  2023-05-08 20:52 ` [PATCH 44/89] i2c: mxs: " Uwe Kleine-König
@ 2023-05-08 20:52 ` Uwe Kleine-König
  2023-05-09  6:32   ` Tali Perry
  2023-05-08 20:52 ` [PATCH 46/89] i2c: ocores: " Uwe Kleine-König
                   ` (44 subsequent siblings)
  89 siblings, 1 reply; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:52 UTC (permalink / raw)
  To: Avi Fishman, Tomer Maimon, Tali Perry, Wolfram Sang
  Cc: Patrick Venture, Nancy Yuen, Benjamin Fair, openbmc, linux-i2c, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/busses/i2c-npcm7xx.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/i2c/busses/i2c-npcm7xx.c b/drivers/i2c/busses/i2c-npcm7xx.c
index 38d5864d0cb5..53b65ffb6a64 100644
--- a/drivers/i2c/busses/i2c-npcm7xx.c
+++ b/drivers/i2c/busses/i2c-npcm7xx.c
@@ -2361,7 +2361,7 @@ static int npcm_i2c_probe_bus(struct platform_device *pdev)
 	return 0;
 }
 
-static int npcm_i2c_remove_bus(struct platform_device *pdev)
+static void npcm_i2c_remove_bus(struct platform_device *pdev)
 {
 	unsigned long lock_flags;
 	struct npcm_i2c *bus = platform_get_drvdata(pdev);
@@ -2371,7 +2371,6 @@ static int npcm_i2c_remove_bus(struct platform_device *pdev)
 	npcm_i2c_disable(bus);
 	spin_unlock_irqrestore(&bus->lock, lock_flags);
 	i2c_del_adapter(&bus->adap);
-	return 0;
 }
 
 static const struct of_device_id npcm_i2c_bus_of_table[] = {
@@ -2383,7 +2382,7 @@ MODULE_DEVICE_TABLE(of, npcm_i2c_bus_of_table);
 
 static struct platform_driver npcm_i2c_bus_driver = {
 	.probe = npcm_i2c_probe_bus,
-	.remove = npcm_i2c_remove_bus,
+	.remove_new = npcm_i2c_remove_bus,
 	.driver = {
 		.name = "nuvoton-i2c",
 		.of_match_table = npcm_i2c_bus_of_table,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 46/89] i2c: ocores: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (44 preceding siblings ...)
  2023-05-08 20:52 ` [PATCH 45/89] i2c: npcm7xx: " Uwe Kleine-König
@ 2023-05-08 20:52 ` Uwe Kleine-König
  2023-05-08 20:52 ` [PATCH 47/89] i2c: octeon-platdrv: " Uwe Kleine-König
                   ` (43 subsequent siblings)
  89 siblings, 0 replies; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:52 UTC (permalink / raw)
  To: Peter Korsgaard, Andrew Lunn, Wolfram Sang; +Cc: linux-i2c, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/busses/i2c-ocores.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/i2c-ocores.c b/drivers/i2c/busses/i2c-ocores.c
index 2e575856c5cd..0742b84a11eb 100644
--- a/drivers/i2c/busses/i2c-ocores.c
+++ b/drivers/i2c/busses/i2c-ocores.c
@@ -743,7 +743,7 @@ static int ocores_i2c_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int ocores_i2c_remove(struct platform_device *pdev)
+static void ocores_i2c_remove(struct platform_device *pdev)
 {
 	struct ocores_i2c *i2c = platform_get_drvdata(pdev);
 	u8 ctrl = oc_getreg(i2c, OCI2C_CONTROL);
@@ -757,8 +757,6 @@ static int ocores_i2c_remove(struct platform_device *pdev)
 
 	if (!IS_ERR(i2c->clk))
 		clk_disable_unprepare(i2c->clk);
-
-	return 0;
 }
 
 #ifdef CONFIG_PM_SLEEP
@@ -804,7 +802,7 @@ static SIMPLE_DEV_PM_OPS(ocores_i2c_pm, ocores_i2c_suspend, ocores_i2c_resume);
 
 static struct platform_driver ocores_i2c_driver = {
 	.probe   = ocores_i2c_probe,
-	.remove  = ocores_i2c_remove,
+	.remove_new = ocores_i2c_remove,
 	.driver  = {
 		.name = "ocores-i2c",
 		.of_match_table = ocores_i2c_match,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 47/89] i2c: octeon-platdrv: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (45 preceding siblings ...)
  2023-05-08 20:52 ` [PATCH 46/89] i2c: ocores: " Uwe Kleine-König
@ 2023-05-08 20:52 ` Uwe Kleine-König
  2023-05-08 20:52 ` [PATCH 48/89] i2c: omap: " Uwe Kleine-König
                   ` (42 subsequent siblings)
  89 siblings, 0 replies; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:52 UTC (permalink / raw)
  To: Robert Richter, Wolfram Sang; +Cc: linux-i2c, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/busses/i2c-octeon-platdrv.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/i2c/busses/i2c-octeon-platdrv.c b/drivers/i2c/busses/i2c-octeon-platdrv.c
index 0c227963c8d6..7d54b3203f71 100644
--- a/drivers/i2c/busses/i2c-octeon-platdrv.c
+++ b/drivers/i2c/busses/i2c-octeon-platdrv.c
@@ -253,12 +253,11 @@ static int octeon_i2c_probe(struct platform_device *pdev)
 	return result;
 };
 
-static int octeon_i2c_remove(struct platform_device *pdev)
+static void octeon_i2c_remove(struct platform_device *pdev)
 {
 	struct octeon_i2c *i2c = platform_get_drvdata(pdev);
 
 	i2c_del_adapter(&i2c->adap);
-	return 0;
 };
 
 static const struct of_device_id octeon_i2c_match[] = {
@@ -270,7 +269,7 @@ MODULE_DEVICE_TABLE(of, octeon_i2c_match);
 
 static struct platform_driver octeon_i2c_driver = {
 	.probe		= octeon_i2c_probe,
-	.remove		= octeon_i2c_remove,
+	.remove_new	= octeon_i2c_remove,
 	.driver		= {
 		.name	= DRV_NAME,
 		.of_match_table = octeon_i2c_match,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 48/89] i2c: omap: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (46 preceding siblings ...)
  2023-05-08 20:52 ` [PATCH 47/89] i2c: octeon-platdrv: " Uwe Kleine-König
@ 2023-05-08 20:52 ` Uwe Kleine-König
  2023-05-09  6:02   ` Vignesh Raghavendra
  2023-05-08 20:52 ` [PATCH 49/89] i2c: opal: " Uwe Kleine-König
                   ` (41 subsequent siblings)
  89 siblings, 1 reply; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:52 UTC (permalink / raw)
  To: Tony Lindgren, Aaro Koskinen, Janusz Krzysztofik, Vignesh R,
	Wolfram Sang
  Cc: linux-omap, linux-i2c, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/busses/i2c-omap.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index 4199f57a6bf2..58fd6fa3edf1 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -1519,7 +1519,7 @@ omap_i2c_probe(struct platform_device *pdev)
 	return r;
 }
 
-static int omap_i2c_remove(struct platform_device *pdev)
+static void omap_i2c_remove(struct platform_device *pdev)
 {
 	struct omap_i2c_dev	*omap = platform_get_drvdata(pdev);
 	int ret;
@@ -1535,8 +1535,6 @@ static int omap_i2c_remove(struct platform_device *pdev)
 	pm_runtime_dont_use_autosuspend(&pdev->dev);
 	pm_runtime_put_sync(&pdev->dev);
 	pm_runtime_disable(&pdev->dev);
-
-	return 0;
 }
 
 static int __maybe_unused omap_i2c_runtime_suspend(struct device *dev)
@@ -1588,7 +1586,7 @@ static const struct dev_pm_ops omap_i2c_pm_ops = {
 
 static struct platform_driver omap_i2c_driver = {
 	.probe		= omap_i2c_probe,
-	.remove		= omap_i2c_remove,
+	.remove_new	= omap_i2c_remove,
 	.driver		= {
 		.name	= "omap_i2c",
 		.pm	= &omap_i2c_pm_ops,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 49/89] i2c: opal: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (47 preceding siblings ...)
  2023-05-08 20:52 ` [PATCH 48/89] i2c: omap: " Uwe Kleine-König
@ 2023-05-08 20:52 ` Uwe Kleine-König
  2023-05-08 20:52 ` [PATCH 50/89] i2c: pasemi-platform: " Uwe Kleine-König
                   ` (40 subsequent siblings)
  89 siblings, 0 replies; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:52 UTC (permalink / raw)
  To: Michael Ellerman, Wolfram Sang
  Cc: Nicholas Piggin, Christophe Leroy, open list:LINUX FOR POWERPC,
	linux-i2c, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/busses/i2c-opal.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/i2c-opal.c b/drivers/i2c/busses/i2c-opal.c
index 9f773b4f5ed8..17ef87d50f7c 100644
--- a/drivers/i2c/busses/i2c-opal.c
+++ b/drivers/i2c/busses/i2c-opal.c
@@ -232,13 +232,11 @@ static int i2c_opal_probe(struct platform_device *pdev)
 	return rc;
 }
 
-static int i2c_opal_remove(struct platform_device *pdev)
+static void i2c_opal_remove(struct platform_device *pdev)
 {
 	struct i2c_adapter *adapter = platform_get_drvdata(pdev);
 
 	i2c_del_adapter(adapter);
-
-	return 0;
 }
 
 static const struct of_device_id i2c_opal_of_match[] = {
@@ -251,7 +249,7 @@ MODULE_DEVICE_TABLE(of, i2c_opal_of_match);
 
 static struct platform_driver i2c_opal_driver = {
 	.probe	= i2c_opal_probe,
-	.remove	= i2c_opal_remove,
+	.remove_new = i2c_opal_remove,
 	.driver	= {
 		.name		= "i2c-opal",
 		.of_match_table	= i2c_opal_of_match,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 50/89] i2c: pasemi-platform: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (48 preceding siblings ...)
  2023-05-08 20:52 ` [PATCH 49/89] i2c: opal: " Uwe Kleine-König
@ 2023-05-08 20:52 ` Uwe Kleine-König
  2023-05-08 20:52 ` [PATCH 51/89] i2c: pca-platform: " Uwe Kleine-König
                   ` (39 subsequent siblings)
  89 siblings, 0 replies; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:52 UTC (permalink / raw)
  To: Hector Martin, Sven Peter, Michael Ellerman, Wolfram Sang
  Cc: Alyssa Rosenzweig, Nicholas Piggin, Christophe Leroy, asahi,
	linux-arm-kernel, open list:LINUX FOR POWERPC, linux-i2c, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/busses/i2c-pasemi-platform.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/i2c/busses/i2c-pasemi-platform.c b/drivers/i2c/busses/i2c-pasemi-platform.c
index e35945a91dbe..0a44f64897c7 100644
--- a/drivers/i2c/busses/i2c-pasemi-platform.c
+++ b/drivers/i2c/busses/i2c-pasemi-platform.c
@@ -98,12 +98,11 @@ static int pasemi_platform_i2c_probe(struct platform_device *pdev)
 	return error;
 }
 
-static int pasemi_platform_i2c_remove(struct platform_device *pdev)
+static void pasemi_platform_i2c_remove(struct platform_device *pdev)
 {
 	struct pasemi_platform_i2c_data *data = platform_get_drvdata(pdev);
 
 	clk_disable_unprepare(data->clk_ref);
-	return 0;
 }
 
 static const struct of_device_id pasemi_platform_i2c_of_match[] = {
@@ -119,7 +118,7 @@ static struct platform_driver pasemi_platform_i2c_driver = {
 		.of_match_table		= pasemi_platform_i2c_of_match,
 	},
 	.probe	= pasemi_platform_i2c_probe,
-	.remove	= pasemi_platform_i2c_remove,
+	.remove_new = pasemi_platform_i2c_remove,
 };
 module_platform_driver(pasemi_platform_i2c_driver);
 
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 51/89] i2c: pca-platform: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (49 preceding siblings ...)
  2023-05-08 20:52 ` [PATCH 50/89] i2c: pasemi-platform: " Uwe Kleine-König
@ 2023-05-08 20:52 ` Uwe Kleine-König
  2023-05-08 20:52 ` [PATCH 52/89] i2c: pnx: " Uwe Kleine-König
                   ` (38 subsequent siblings)
  89 siblings, 0 replies; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:52 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: linux-i2c, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/busses/i2c-pca-platform.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/i2c-pca-platform.c b/drivers/i2c/busses/i2c-pca-platform.c
index 86d4f75ef8d3..d2a9e7b61c1a 100644
--- a/drivers/i2c/busses/i2c-pca-platform.c
+++ b/drivers/i2c/busses/i2c-pca-platform.c
@@ -221,13 +221,11 @@ static int i2c_pca_pf_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int i2c_pca_pf_remove(struct platform_device *pdev)
+static void i2c_pca_pf_remove(struct platform_device *pdev)
 {
 	struct i2c_pca_pf_data *i2c = platform_get_drvdata(pdev);
 
 	i2c_del_adapter(&i2c->adap);
-
-	return 0;
 }
 
 #ifdef CONFIG_OF
@@ -241,7 +239,7 @@ MODULE_DEVICE_TABLE(of, i2c_pca_of_match_table);
 
 static struct platform_driver i2c_pca_pf_driver = {
 	.probe = i2c_pca_pf_probe,
-	.remove = i2c_pca_pf_remove,
+	.remove_new = i2c_pca_pf_remove,
 	.driver = {
 		.name = "i2c-pca-platform",
 		.of_match_table = of_match_ptr(i2c_pca_of_match_table),
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 52/89] i2c: pnx: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (50 preceding siblings ...)
  2023-05-08 20:52 ` [PATCH 51/89] i2c: pca-platform: " Uwe Kleine-König
@ 2023-05-08 20:52 ` Uwe Kleine-König
  2023-05-08 20:52 ` [PATCH 53/89] i2c: powermac: " Uwe Kleine-König
                   ` (37 subsequent siblings)
  89 siblings, 0 replies; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:52 UTC (permalink / raw)
  To: Vladimir Zapolskiy, Wolfram Sang; +Cc: linux-arm-kernel, linux-i2c, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/busses/i2c-pnx.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/i2c-pnx.c b/drivers/i2c/busses/i2c-pnx.c
index 50f21cdbe90d..82400057f810 100644
--- a/drivers/i2c/busses/i2c-pnx.c
+++ b/drivers/i2c/busses/i2c-pnx.c
@@ -743,14 +743,12 @@ static int i2c_pnx_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int i2c_pnx_remove(struct platform_device *pdev)
+static void i2c_pnx_remove(struct platform_device *pdev)
 {
 	struct i2c_pnx_algo_data *alg_data = platform_get_drvdata(pdev);
 
 	i2c_del_adapter(&alg_data->adapter);
 	clk_disable_unprepare(alg_data->clk);
-
-	return 0;
 }
 
 #ifdef CONFIG_OF
@@ -768,7 +766,7 @@ static struct platform_driver i2c_pnx_driver = {
 		.pm = PNX_I2C_PM,
 	},
 	.probe = i2c_pnx_probe,
-	.remove = i2c_pnx_remove,
+	.remove_new = i2c_pnx_remove,
 };
 
 static int __init i2c_adap_pnx_init(void)
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 53/89] i2c: powermac: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (51 preceding siblings ...)
  2023-05-08 20:52 ` [PATCH 52/89] i2c: pnx: " Uwe Kleine-König
@ 2023-05-08 20:52 ` Uwe Kleine-König
  2023-05-08 20:52 ` [PATCH 54/89] i2c: pxa: " Uwe Kleine-König
                   ` (36 subsequent siblings)
  89 siblings, 0 replies; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:52 UTC (permalink / raw)
  To: Michael Ellerman, Greg Kroah-Hartman, Rob Herring,
	Srinivas Kandagatla, Sebastian Reichel, Miquel Raynal,
	Wolfram Sang
  Cc: Nicholas Piggin, Christophe Leroy, linux-i2c,
	open list:LINUX FOR POWERPC, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/busses/i2c-powermac.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/i2c-powermac.c b/drivers/i2c/busses/i2c-powermac.c
index ec706a3aba26..4996a628fdae 100644
--- a/drivers/i2c/busses/i2c-powermac.c
+++ b/drivers/i2c/busses/i2c-powermac.c
@@ -188,14 +188,12 @@ static const struct i2c_adapter_quirks i2c_powermac_quirks = {
 	.max_num_msgs = 1,
 };
 
-static int i2c_powermac_remove(struct platform_device *dev)
+static void i2c_powermac_remove(struct platform_device *dev)
 {
 	struct i2c_adapter	*adapter = platform_get_drvdata(dev);
 
 	i2c_del_adapter(adapter);
 	memset(adapter, 0, sizeof(*adapter));
-
-	return 0;
 }
 
 static u32 i2c_powermac_get_addr(struct i2c_adapter *adap,
@@ -439,7 +437,7 @@ static int i2c_powermac_probe(struct platform_device *dev)
 
 static struct platform_driver i2c_powermac_driver = {
 	.probe = i2c_powermac_probe,
-	.remove = i2c_powermac_remove,
+	.remove_new = i2c_powermac_remove,
 	.driver = {
 		.name = "i2c-powermac",
 		.bus = &platform_bus_type,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 54/89] i2c: pxa: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (52 preceding siblings ...)
  2023-05-08 20:52 ` [PATCH 53/89] i2c: powermac: " Uwe Kleine-König
@ 2023-05-08 20:52 ` Uwe Kleine-König
  2023-05-08 20:52 ` [PATCH 55/89] i2c: qcom-cci: " Uwe Kleine-König
                   ` (35 subsequent siblings)
  89 siblings, 0 replies; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:52 UTC (permalink / raw)
  To: Wolfram Sang, Chris Packham, Rob Herring, Wolfram Sang; +Cc: linux-i2c, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/busses/i2c-pxa.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c
index f9fa5308556b..937f7eebe906 100644
--- a/drivers/i2c/busses/i2c-pxa.c
+++ b/drivers/i2c/busses/i2c-pxa.c
@@ -1482,15 +1482,13 @@ static int i2c_pxa_probe(struct platform_device *dev)
 	return ret;
 }
 
-static int i2c_pxa_remove(struct platform_device *dev)
+static void i2c_pxa_remove(struct platform_device *dev)
 {
 	struct pxa_i2c *i2c = platform_get_drvdata(dev);
 
 	i2c_del_adapter(&i2c->adap);
 
 	clk_disable_unprepare(i2c->clk);
-
-	return 0;
 }
 
 #ifdef CONFIG_PM
@@ -1525,7 +1523,7 @@ static const struct dev_pm_ops i2c_pxa_dev_pm_ops = {
 
 static struct platform_driver i2c_pxa_driver = {
 	.probe		= i2c_pxa_probe,
-	.remove		= i2c_pxa_remove,
+	.remove_new	= i2c_pxa_remove,
 	.driver		= {
 		.name	= "pxa2xx-i2c",
 		.pm	= I2C_PXA_DEV_PM_OPS,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 55/89] i2c: qcom-cci: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (53 preceding siblings ...)
  2023-05-08 20:52 ` [PATCH 54/89] i2c: pxa: " Uwe Kleine-König
@ 2023-05-08 20:52 ` Uwe Kleine-König
  2023-05-08 20:52 ` [PATCH 56/89] i2c: qcom-geni: " Uwe Kleine-König
                   ` (34 subsequent siblings)
  89 siblings, 0 replies; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:52 UTC (permalink / raw)
  To: Loic Poulain, Robert Foss, Wolfram Sang; +Cc: linux-i2c, linux-arm-msm, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/busses/i2c-qcom-cci.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/i2c-qcom-cci.c b/drivers/i2c/busses/i2c-qcom-cci.c
index 01358472680c..58860014e068 100644
--- a/drivers/i2c/busses/i2c-qcom-cci.c
+++ b/drivers/i2c/busses/i2c-qcom-cci.c
@@ -675,7 +675,7 @@ static int cci_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int cci_remove(struct platform_device *pdev)
+static void cci_remove(struct platform_device *pdev)
 {
 	struct cci *cci = platform_get_drvdata(pdev);
 	int i;
@@ -691,8 +691,6 @@ static int cci_remove(struct platform_device *pdev)
 	disable_irq(cci->irq);
 	pm_runtime_disable(&pdev->dev);
 	pm_runtime_set_suspended(&pdev->dev);
-
-	return 0;
 }
 
 static const struct cci_data cci_v1_data = {
@@ -829,7 +827,7 @@ MODULE_DEVICE_TABLE(of, cci_dt_match);
 
 static struct platform_driver qcom_cci_driver = {
 	.probe  = cci_probe,
-	.remove = cci_remove,
+	.remove_new = cci_remove,
 	.driver = {
 		.name = "i2c-qcom-cci",
 		.of_match_table = cci_dt_match,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 56/89] i2c: qcom-geni: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (54 preceding siblings ...)
  2023-05-08 20:52 ` [PATCH 55/89] i2c: qcom-cci: " Uwe Kleine-König
@ 2023-05-08 20:52 ` Uwe Kleine-König
  2023-05-09  8:46   ` Konrad Dybcio
  2023-05-08 20:52 ` [PATCH 57/89] i2c: qup: " Uwe Kleine-König
                   ` (33 subsequent siblings)
  89 siblings, 1 reply; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:52 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Wolfram Sang
  Cc: Konrad Dybcio, linux-arm-msm, linux-i2c, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/busses/i2c-qcom-geni.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/i2c/busses/i2c-qcom-geni.c b/drivers/i2c/busses/i2c-qcom-geni.c
index 83909b02a03e..b670a67c4fdd 100644
--- a/drivers/i2c/busses/i2c-qcom-geni.c
+++ b/drivers/i2c/busses/i2c-qcom-geni.c
@@ -936,14 +936,13 @@ static int geni_i2c_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int geni_i2c_remove(struct platform_device *pdev)
+static void geni_i2c_remove(struct platform_device *pdev)
 {
 	struct geni_i2c_dev *gi2c = platform_get_drvdata(pdev);
 
 	i2c_del_adapter(&gi2c->adap);
 	release_gpi_dma(gi2c);
 	pm_runtime_disable(gi2c->se.dev);
-	return 0;
 }
 
 static void geni_i2c_shutdown(struct platform_device *pdev)
@@ -1041,7 +1040,7 @@ MODULE_DEVICE_TABLE(of, geni_i2c_dt_match);
 
 static struct platform_driver geni_i2c_driver = {
 	.probe  = geni_i2c_probe,
-	.remove = geni_i2c_remove,
+	.remove_new = geni_i2c_remove,
 	.shutdown = geni_i2c_shutdown,
 	.driver = {
 		.name = "geni_i2c",
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 57/89] i2c: qup: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (55 preceding siblings ...)
  2023-05-08 20:52 ` [PATCH 56/89] i2c: qcom-geni: " Uwe Kleine-König
@ 2023-05-08 20:52 ` Uwe Kleine-König
  2023-05-09  8:47   ` Konrad Dybcio
  2023-05-08 20:52 ` [PATCH 58/89] i2c: rcar: " Uwe Kleine-König
                   ` (32 subsequent siblings)
  89 siblings, 1 reply; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:52 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Wolfram Sang
  Cc: Konrad Dybcio, linux-arm-msm, linux-i2c, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/busses/i2c-qup.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/i2c/busses/i2c-qup.c b/drivers/i2c/busses/i2c-qup.c
index 2e153f2f71b6..6eef1dbd00de 100644
--- a/drivers/i2c/busses/i2c-qup.c
+++ b/drivers/i2c/busses/i2c-qup.c
@@ -1904,7 +1904,7 @@ static int qup_i2c_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int qup_i2c_remove(struct platform_device *pdev)
+static void qup_i2c_remove(struct platform_device *pdev)
 {
 	struct qup_i2c_dev *qup = platform_get_drvdata(pdev);
 
@@ -1918,7 +1918,6 @@ static int qup_i2c_remove(struct platform_device *pdev)
 	i2c_del_adapter(&qup->adap);
 	pm_runtime_disable(qup->dev);
 	pm_runtime_set_suspended(qup->dev);
-	return 0;
 }
 
 #ifdef CONFIG_PM
@@ -1978,7 +1977,7 @@ MODULE_DEVICE_TABLE(of, qup_i2c_dt_match);
 
 static struct platform_driver qup_i2c_driver = {
 	.probe  = qup_i2c_probe,
-	.remove = qup_i2c_remove,
+	.remove_new = qup_i2c_remove,
 	.driver = {
 		.name = "i2c_qup",
 		.pm = &qup_i2c_qup_pm_ops,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 58/89] i2c: rcar: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (56 preceding siblings ...)
  2023-05-08 20:52 ` [PATCH 57/89] i2c: qup: " Uwe Kleine-König
@ 2023-05-08 20:52 ` Uwe Kleine-König
  2023-05-09  7:01   ` Geert Uytterhoeven
  2023-05-08 20:52 ` [PATCH 59/89] i2c: riic: " Uwe Kleine-König
                   ` (31 subsequent siblings)
  89 siblings, 1 reply; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:52 UTC (permalink / raw)
  To: Wolfram Sang, Wolfram Sang; +Cc: linux-renesas-soc, linux-i2c, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/busses/i2c-rcar.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/i2c-rcar.c b/drivers/i2c/busses/i2c-rcar.c
index cef82b205c26..2d9c37410ebd 100644
--- a/drivers/i2c/busses/i2c-rcar.c
+++ b/drivers/i2c/busses/i2c-rcar.c
@@ -1155,7 +1155,7 @@ static int rcar_i2c_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int rcar_i2c_remove(struct platform_device *pdev)
+static void rcar_i2c_remove(struct platform_device *pdev)
 {
 	struct rcar_i2c_priv *priv = platform_get_drvdata(pdev);
 	struct device *dev = &pdev->dev;
@@ -1167,8 +1167,6 @@ static int rcar_i2c_remove(struct platform_device *pdev)
 	if (priv->flags & ID_P_PM_BLOCKED)
 		pm_runtime_put(dev);
 	pm_runtime_disable(dev);
-
-	return 0;
 }
 
 #ifdef CONFIG_PM_SLEEP
@@ -1204,7 +1202,7 @@ static struct platform_driver rcar_i2c_driver = {
 		.pm	= DEV_PM_OPS,
 	},
 	.probe		= rcar_i2c_probe,
-	.remove		= rcar_i2c_remove,
+	.remove_new	= rcar_i2c_remove,
 };
 
 module_platform_driver(rcar_i2c_driver);
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 59/89] i2c: riic: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (57 preceding siblings ...)
  2023-05-08 20:52 ` [PATCH 58/89] i2c: rcar: " Uwe Kleine-König
@ 2023-05-08 20:52 ` Uwe Kleine-König
  2023-05-09  7:02   ` Geert Uytterhoeven
  2023-05-08 20:52 ` [PATCH 60/89] i2c: rk3x: " Uwe Kleine-König
                   ` (30 subsequent siblings)
  89 siblings, 1 reply; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:52 UTC (permalink / raw)
  To: Chris Brandt, Wolfram Sang; +Cc: linux-renesas-soc, linux-i2c, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/busses/i2c-riic.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/i2c-riic.c b/drivers/i2c/busses/i2c-riic.c
index 849848ccb080..5f8c0bd508d2 100644
--- a/drivers/i2c/busses/i2c-riic.c
+++ b/drivers/i2c/busses/i2c-riic.c
@@ -477,7 +477,7 @@ static int riic_i2c_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int riic_i2c_remove(struct platform_device *pdev)
+static void riic_i2c_remove(struct platform_device *pdev)
 {
 	struct riic_dev *riic = platform_get_drvdata(pdev);
 
@@ -486,8 +486,6 @@ static int riic_i2c_remove(struct platform_device *pdev)
 	pm_runtime_put(&pdev->dev);
 	i2c_del_adapter(&riic->adapter);
 	pm_runtime_disable(&pdev->dev);
-
-	return 0;
 }
 
 static const struct of_device_id riic_i2c_dt_ids[] = {
@@ -497,7 +495,7 @@ static const struct of_device_id riic_i2c_dt_ids[] = {
 
 static struct platform_driver riic_i2c_driver = {
 	.probe		= riic_i2c_probe,
-	.remove		= riic_i2c_remove,
+	.remove_new	= riic_i2c_remove,
 	.driver		= {
 		.name	= "i2c-riic",
 		.of_match_table = riic_i2c_dt_ids,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 60/89] i2c: rk3x: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (58 preceding siblings ...)
  2023-05-08 20:52 ` [PATCH 59/89] i2c: riic: " Uwe Kleine-König
@ 2023-05-08 20:52 ` Uwe Kleine-König
  2023-05-13 16:44   ` Heiko Stuebner
  2023-05-08 20:52 ` [PATCH 61/89] i2c: rzv2m: " Uwe Kleine-König
                   ` (29 subsequent siblings)
  89 siblings, 1 reply; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:52 UTC (permalink / raw)
  To: Heiko Stuebner, Wolfram Sang
  Cc: linux-arm-kernel, linux-rockchip, linux-i2c, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/busses/i2c-rk3x.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/i2c-rk3x.c b/drivers/i2c/busses/i2c-rk3x.c
index b31cf4f18f85..a044ca0c35a1 100644
--- a/drivers/i2c/busses/i2c-rk3x.c
+++ b/drivers/i2c/busses/i2c-rk3x.c
@@ -1372,7 +1372,7 @@ static int rk3x_i2c_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int rk3x_i2c_remove(struct platform_device *pdev)
+static void rk3x_i2c_remove(struct platform_device *pdev)
 {
 	struct rk3x_i2c *i2c = platform_get_drvdata(pdev);
 
@@ -1381,15 +1381,13 @@ static int rk3x_i2c_remove(struct platform_device *pdev)
 	clk_notifier_unregister(i2c->clk, &i2c->clk_rate_nb);
 	clk_unprepare(i2c->pclk);
 	clk_unprepare(i2c->clk);
-
-	return 0;
 }
 
 static SIMPLE_DEV_PM_OPS(rk3x_i2c_pm_ops, NULL, rk3x_i2c_resume);
 
 static struct platform_driver rk3x_i2c_driver = {
 	.probe   = rk3x_i2c_probe,
-	.remove  = rk3x_i2c_remove,
+	.remove_new = rk3x_i2c_remove,
 	.driver  = {
 		.name  = "rk3x-i2c",
 		.of_match_table = rk3x_i2c_match,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 61/89] i2c: rzv2m: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (59 preceding siblings ...)
  2023-05-08 20:52 ` [PATCH 60/89] i2c: rk3x: " Uwe Kleine-König
@ 2023-05-08 20:52 ` Uwe Kleine-König
  2023-05-08 20:52 ` [PATCH 62/89] i2c: s3c2410: " Uwe Kleine-König
                   ` (28 subsequent siblings)
  89 siblings, 0 replies; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:52 UTC (permalink / raw)
  To: Wolfram Sang, Phil Edworthy, Andy Shevchenko, Philipp Zabel
  Cc: linux-i2c, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/busses/i2c-rzv2m.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/i2c-rzv2m.c b/drivers/i2c/busses/i2c-rzv2m.c
index 56d0faee5c46..dee9b6e655c5 100644
--- a/drivers/i2c/busses/i2c-rzv2m.c
+++ b/drivers/i2c/busses/i2c-rzv2m.c
@@ -460,7 +460,7 @@ static int rzv2m_i2c_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int rzv2m_i2c_remove(struct platform_device *pdev)
+static void rzv2m_i2c_remove(struct platform_device *pdev)
 {
 	struct rzv2m_i2c_priv *priv = platform_get_drvdata(pdev);
 	struct device *dev = priv->adap.dev.parent;
@@ -468,8 +468,6 @@ static int rzv2m_i2c_remove(struct platform_device *pdev)
 	i2c_del_adapter(&priv->adap);
 	bit_clrl(priv->base + IICB0CTL0, IICB0IICE);
 	pm_runtime_disable(dev);
-
-	return 0;
 }
 
 static int rzv2m_i2c_suspend(struct device *dev)
@@ -523,7 +521,7 @@ static struct platform_driver rzv2m_i2c_driver = {
 		.pm = pm_sleep_ptr(&rzv2m_i2c_pm_ops),
 	},
 	.probe	= rzv2m_i2c_probe,
-	.remove	= rzv2m_i2c_remove,
+	.remove_new = rzv2m_i2c_remove,
 };
 module_platform_driver(rzv2m_i2c_driver);
 
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 62/89] i2c: s3c2410: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (60 preceding siblings ...)
  2023-05-08 20:52 ` [PATCH 61/89] i2c: rzv2m: " Uwe Kleine-König
@ 2023-05-08 20:52 ` Uwe Kleine-König
  2023-05-09 15:09   ` Krzysztof Kozlowski
  2023-05-08 20:52 ` [PATCH 63/89] i2c: scmi: " Uwe Kleine-König
                   ` (27 subsequent siblings)
  89 siblings, 1 reply; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:52 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Wolfram Sang
  Cc: Alim Akhtar, linux-arm-kernel, linux-samsung-soc, linux-i2c, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/busses/i2c-s3c2410.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c
index 45e9df81345a..28f0e5c64f32 100644
--- a/drivers/i2c/busses/i2c-s3c2410.c
+++ b/drivers/i2c/busses/i2c-s3c2410.c
@@ -1114,7 +1114,7 @@ static int s3c24xx_i2c_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int s3c24xx_i2c_remove(struct platform_device *pdev)
+static void s3c24xx_i2c_remove(struct platform_device *pdev)
 {
 	struct s3c24xx_i2c *i2c = platform_get_drvdata(pdev);
 
@@ -1123,8 +1123,6 @@ static int s3c24xx_i2c_remove(struct platform_device *pdev)
 	pm_runtime_disable(&pdev->dev);
 
 	i2c_del_adapter(&i2c->adap);
-
-	return 0;
 }
 
 #ifdef CONFIG_PM_SLEEP
@@ -1172,7 +1170,7 @@ static const struct dev_pm_ops s3c24xx_i2c_dev_pm_ops = {
 
 static struct platform_driver s3c24xx_i2c_driver = {
 	.probe		= s3c24xx_i2c_probe,
-	.remove		= s3c24xx_i2c_remove,
+	.remove_new	= s3c24xx_i2c_remove,
 	.id_table	= s3c24xx_driver_ids,
 	.driver		= {
 		.name	= "s3c-i2c",
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 63/89] i2c: scmi: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (61 preceding siblings ...)
  2023-05-08 20:52 ` [PATCH 62/89] i2c: s3c2410: " Uwe Kleine-König
@ 2023-05-08 20:52 ` Uwe Kleine-König
  2023-05-08 20:52 ` [PATCH 64/89] i2c: scx200_acb: " Uwe Kleine-König
                   ` (26 subsequent siblings)
  89 siblings, 0 replies; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:52 UTC (permalink / raw)
  To: Wolfram Sang, Andy Shevchenko; +Cc: linux-i2c, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/busses/i2c-scmi.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/i2c-scmi.c b/drivers/i2c/busses/i2c-scmi.c
index 0239e134b90f..104570292241 100644
--- a/drivers/i2c/busses/i2c-scmi.c
+++ b/drivers/i2c/busses/i2c-scmi.c
@@ -404,19 +404,17 @@ static int smbus_cmi_probe(struct platform_device *device)
 	return ret;
 }
 
-static int smbus_cmi_remove(struct platform_device *device)
+static void smbus_cmi_remove(struct platform_device *device)
 {
 	struct acpi_smbus_cmi *smbus_cmi = platform_get_drvdata(device);
 
 	i2c_del_adapter(&smbus_cmi->adapter);
 	kfree(smbus_cmi);
-
-	return 0;
 }
 
 static struct platform_driver smbus_cmi_driver = {
 	.probe = smbus_cmi_probe,
-	.remove = smbus_cmi_remove,
+	.remove_new = smbus_cmi_remove,
 	.driver = {
 		.name   = "smbus_cmi",
 		.acpi_match_table = acpi_smbus_cmi_ids,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 64/89] i2c: scx200_acb: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (62 preceding siblings ...)
  2023-05-08 20:52 ` [PATCH 63/89] i2c: scmi: " Uwe Kleine-König
@ 2023-05-08 20:52 ` Uwe Kleine-König
  2023-05-08 20:52 ` [PATCH 65/89] i2c: sh7760: " Uwe Kleine-König
                   ` (25 subsequent siblings)
  89 siblings, 0 replies; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:52 UTC (permalink / raw)
  To: Jim Cromie, Wolfram Sang; +Cc: linux-i2c, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/busses/scx200_acb.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/scx200_acb.c b/drivers/i2c/busses/scx200_acb.c
index 7b42a18bd05c..83c1db610f54 100644
--- a/drivers/i2c/busses/scx200_acb.c
+++ b/drivers/i2c/busses/scx200_acb.c
@@ -523,14 +523,12 @@ static void scx200_cleanup_iface(struct scx200_acb_iface *iface)
 	kfree(iface);
 }
 
-static int scx200_remove(struct platform_device *pdev)
+static void scx200_remove(struct platform_device *pdev)
 {
 	struct scx200_acb_iface *iface;
 
 	iface = platform_get_drvdata(pdev);
 	scx200_cleanup_iface(iface);
-
-	return 0;
 }
 
 static struct platform_driver scx200_pci_driver = {
@@ -538,7 +536,7 @@ static struct platform_driver scx200_pci_driver = {
 		.name = "cs5535-smb",
 	},
 	.probe = scx200_probe,
-	.remove = scx200_remove,
+	.remove_new = scx200_remove,
 };
 
 static const struct pci_device_id scx200_isa[] = {
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 65/89] i2c: sh7760: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (63 preceding siblings ...)
  2023-05-08 20:52 ` [PATCH 64/89] i2c: scx200_acb: " Uwe Kleine-König
@ 2023-05-08 20:52 ` Uwe Kleine-König
  2023-05-08 20:52 ` [PATCH 66/89] i2c: sh_mobile: " Uwe Kleine-König
                   ` (24 subsequent siblings)
  89 siblings, 0 replies; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:52 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: linux-i2c, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/busses/i2c-sh7760.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/i2c-sh7760.c b/drivers/i2c/busses/i2c-sh7760.c
index 319d1fa617c8..60efa3a5e675 100644
--- a/drivers/i2c/busses/i2c-sh7760.c
+++ b/drivers/i2c/busses/i2c-sh7760.c
@@ -536,7 +536,7 @@ static int sh7760_i2c_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int sh7760_i2c_remove(struct platform_device *pdev)
+static void sh7760_i2c_remove(struct platform_device *pdev)
 {
 	struct cami2c *id = platform_get_drvdata(pdev);
 
@@ -546,8 +546,6 @@ static int sh7760_i2c_remove(struct platform_device *pdev)
 	release_resource(id->ioarea);
 	kfree(id->ioarea);
 	kfree(id);
-
-	return 0;
 }
 
 static struct platform_driver sh7760_i2c_drv = {
@@ -555,7 +553,7 @@ static struct platform_driver sh7760_i2c_drv = {
 		.name	= SH7760_I2C_DEVNAME,
 	},
 	.probe		= sh7760_i2c_probe,
-	.remove		= sh7760_i2c_remove,
+	.remove_new	= sh7760_i2c_remove,
 };
 
 module_platform_driver(sh7760_i2c_drv);
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 66/89] i2c: sh_mobile: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (64 preceding siblings ...)
  2023-05-08 20:52 ` [PATCH 65/89] i2c: sh7760: " Uwe Kleine-König
@ 2023-05-08 20:52 ` Uwe Kleine-König
  2023-05-09  7:02   ` Geert Uytterhoeven
  2023-05-08 20:52 ` [PATCH 67/89] i2c: simtec: " Uwe Kleine-König
                   ` (23 subsequent siblings)
  89 siblings, 1 reply; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:52 UTC (permalink / raw)
  To: Wolfram Sang, Wolfram Sang; +Cc: linux-renesas-soc, linux-i2c, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/busses/i2c-sh_mobile.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/i2c/busses/i2c-sh_mobile.c b/drivers/i2c/busses/i2c-sh_mobile.c
index 29330ee64c9c..21717b943a9e 100644
--- a/drivers/i2c/busses/i2c-sh_mobile.c
+++ b/drivers/i2c/busses/i2c-sh_mobile.c
@@ -956,14 +956,13 @@ static int sh_mobile_i2c_probe(struct platform_device *dev)
 	return 0;
 }
 
-static int sh_mobile_i2c_remove(struct platform_device *dev)
+static void sh_mobile_i2c_remove(struct platform_device *dev)
 {
 	struct sh_mobile_i2c_data *pd = platform_get_drvdata(dev);
 
 	i2c_del_adapter(&pd->adap);
 	sh_mobile_i2c_release_dma(pd);
 	pm_runtime_disable(&dev->dev);
-	return 0;
 }
 
 #ifdef CONFIG_PM_SLEEP
@@ -1000,7 +999,7 @@ static struct platform_driver sh_mobile_i2c_driver = {
 		.pm	= DEV_PM_OPS,
 	},
 	.probe		= sh_mobile_i2c_probe,
-	.remove		= sh_mobile_i2c_remove,
+	.remove_new	= sh_mobile_i2c_remove,
 };
 
 static int __init sh_mobile_i2c_adap_init(void)
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 67/89] i2c: simtec: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (65 preceding siblings ...)
  2023-05-08 20:52 ` [PATCH 66/89] i2c: sh_mobile: " Uwe Kleine-König
@ 2023-05-08 20:52 ` Uwe Kleine-König
  2023-05-08 20:52 ` [PATCH 68/89] i2c: st: " Uwe Kleine-König
                   ` (22 subsequent siblings)
  89 siblings, 0 replies; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:52 UTC (permalink / raw)
  To: Wolfram Sang, Wolfram Sang; +Cc: linux-i2c, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/busses/i2c-simtec.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/i2c-simtec.c b/drivers/i2c/busses/i2c-simtec.c
index 87701744752f..18516bc64e04 100644
--- a/drivers/i2c/busses/i2c-simtec.c
+++ b/drivers/i2c/busses/i2c-simtec.c
@@ -126,7 +126,7 @@ static int simtec_i2c_probe(struct platform_device *dev)
 	return ret;
 }
 
-static int simtec_i2c_remove(struct platform_device *dev)
+static void simtec_i2c_remove(struct platform_device *dev)
 {
 	struct simtec_i2c_data *pd = platform_get_drvdata(dev);
 
@@ -135,8 +135,6 @@ static int simtec_i2c_remove(struct platform_device *dev)
 	iounmap(pd->reg);
 	release_mem_region(pd->ioarea->start, resource_size(pd->ioarea));
 	kfree(pd);
-
-	return 0;
 }
 
 /* device driver */
@@ -146,7 +144,7 @@ static struct platform_driver simtec_i2c_driver = {
 		.name		= "simtec-i2c",
 	},
 	.probe		= simtec_i2c_probe,
-	.remove		= simtec_i2c_remove,
+	.remove_new	= simtec_i2c_remove,
 };
 
 module_platform_driver(simtec_i2c_driver);
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 68/89] i2c: st: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (66 preceding siblings ...)
  2023-05-08 20:52 ` [PATCH 67/89] i2c: simtec: " Uwe Kleine-König
@ 2023-05-08 20:52 ` Uwe Kleine-König
  2023-05-09  6:21   ` Patrice CHOTARD
  2023-05-08 20:52 ` [PATCH 69/89] i2c: stm32f4: " Uwe Kleine-König
                   ` (21 subsequent siblings)
  89 siblings, 1 reply; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:52 UTC (permalink / raw)
  To: Patrice Chotard, Wolfram Sang; +Cc: linux-arm-kernel, linux-i2c, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/busses/i2c-st.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/i2c-st.c b/drivers/i2c/busses/i2c-st.c
index f823913b75a6..25c3521cae0e 100644
--- a/drivers/i2c/busses/i2c-st.c
+++ b/drivers/i2c/busses/i2c-st.c
@@ -876,13 +876,11 @@ static int st_i2c_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int st_i2c_remove(struct platform_device *pdev)
+static void st_i2c_remove(struct platform_device *pdev)
 {
 	struct st_i2c_dev *i2c_dev = platform_get_drvdata(pdev);
 
 	i2c_del_adapter(&i2c_dev->adap);
-
-	return 0;
 }
 
 static const struct of_device_id st_i2c_match[] = {
@@ -899,7 +897,7 @@ static struct platform_driver st_i2c_driver = {
 		.pm = pm_sleep_ptr(&st_i2c_pm),
 	},
 	.probe = st_i2c_probe,
-	.remove = st_i2c_remove,
+	.remove_new = st_i2c_remove,
 };
 
 module_platform_driver(st_i2c_driver);
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 69/89] i2c: stm32f4: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (67 preceding siblings ...)
  2023-05-08 20:52 ` [PATCH 68/89] i2c: st: " Uwe Kleine-König
@ 2023-05-08 20:52 ` Uwe Kleine-König
  2023-05-09  7:24   ` Alain Volmat
  2023-05-08 20:52 ` [PATCH 70/89] i2c: stm32f7: " Uwe Kleine-König
                   ` (20 subsequent siblings)
  89 siblings, 1 reply; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:52 UTC (permalink / raw)
  To: Pierre-Yves MORDRET, Alain Volmat, Maxime Coquelin,
	Alexandre Torgue, Wolfram Sang
  Cc: linux-i2c, linux-stm32, linux-arm-kernel, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/busses/i2c-stm32f4.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/i2c-stm32f4.c b/drivers/i2c/busses/i2c-stm32f4.c
index eebce7ecef25..6ad06a5a22b4 100644
--- a/drivers/i2c/busses/i2c-stm32f4.c
+++ b/drivers/i2c/busses/i2c-stm32f4.c
@@ -861,15 +861,13 @@ static int stm32f4_i2c_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int stm32f4_i2c_remove(struct platform_device *pdev)
+static void stm32f4_i2c_remove(struct platform_device *pdev)
 {
 	struct stm32f4_i2c_dev *i2c_dev = platform_get_drvdata(pdev);
 
 	i2c_del_adapter(&i2c_dev->adap);
 
 	clk_unprepare(i2c_dev->clk);
-
-	return 0;
 }
 
 static const struct of_device_id stm32f4_i2c_match[] = {
@@ -884,7 +882,7 @@ static struct platform_driver stm32f4_i2c_driver = {
 		.of_match_table = stm32f4_i2c_match,
 	},
 	.probe = stm32f4_i2c_probe,
-	.remove = stm32f4_i2c_remove,
+	.remove_new = stm32f4_i2c_remove,
 };
 
 module_platform_driver(stm32f4_i2c_driver);
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 70/89] i2c: stm32f7: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (68 preceding siblings ...)
  2023-05-08 20:52 ` [PATCH 69/89] i2c: stm32f4: " Uwe Kleine-König
@ 2023-05-08 20:52 ` Uwe Kleine-König
  2023-05-09  7:25   ` Alain Volmat
  2023-05-08 20:52 ` [PATCH 71/89] i2c: sun6i-p2wi: " Uwe Kleine-König
                   ` (19 subsequent siblings)
  89 siblings, 1 reply; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:52 UTC (permalink / raw)
  To: Pierre-Yves MORDRET, Alain Volmat, Maxime Coquelin,
	Alexandre Torgue, Wolfram Sang
  Cc: linux-i2c, linux-stm32, linux-arm-kernel, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/busses/i2c-stm32f7.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/i2c-stm32f7.c b/drivers/i2c/busses/i2c-stm32f7.c
index d1c59d83a65b..e897d9101434 100644
--- a/drivers/i2c/busses/i2c-stm32f7.c
+++ b/drivers/i2c/busses/i2c-stm32f7.c
@@ -2309,7 +2309,7 @@ static int stm32f7_i2c_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int stm32f7_i2c_remove(struct platform_device *pdev)
+static void stm32f7_i2c_remove(struct platform_device *pdev)
 {
 	struct stm32f7_i2c_dev *i2c_dev = platform_get_drvdata(pdev);
 
@@ -2341,8 +2341,6 @@ static int stm32f7_i2c_remove(struct platform_device *pdev)
 	stm32f7_i2c_write_fm_plus_bits(i2c_dev, false);
 
 	clk_disable_unprepare(i2c_dev->clk);
-
-	return 0;
 }
 
 static int __maybe_unused stm32f7_i2c_runtime_suspend(struct device *dev)
@@ -2486,7 +2484,7 @@ static struct platform_driver stm32f7_i2c_driver = {
 		.pm = &stm32f7_i2c_pm_ops,
 	},
 	.probe = stm32f7_i2c_probe,
-	.remove = stm32f7_i2c_remove,
+	.remove_new = stm32f7_i2c_remove,
 };
 
 module_platform_driver(stm32f7_i2c_driver);
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 71/89] i2c: sun6i-p2wi: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (69 preceding siblings ...)
  2023-05-08 20:52 ` [PATCH 70/89] i2c: stm32f7: " Uwe Kleine-König
@ 2023-05-08 20:52 ` Uwe Kleine-König
  2023-05-10 19:03   ` Jernej Škrabec
  2023-05-08 20:52 ` [PATCH 72/89] i2c: synquacer: " Uwe Kleine-König
                   ` (18 subsequent siblings)
  89 siblings, 1 reply; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:52 UTC (permalink / raw)
  To: Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Wolfram Sang
  Cc: linux-i2c, linux-arm-kernel, linux-sunxi, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/busses/i2c-sun6i-p2wi.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/i2c-sun6i-p2wi.c b/drivers/i2c/busses/i2c-sun6i-p2wi.c
index 9e3483f507ff..3cff1afe0caa 100644
--- a/drivers/i2c/busses/i2c-sun6i-p2wi.c
+++ b/drivers/i2c/busses/i2c-sun6i-p2wi.c
@@ -313,20 +313,18 @@ static int p2wi_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int p2wi_remove(struct platform_device *dev)
+static void p2wi_remove(struct platform_device *dev)
 {
 	struct p2wi *p2wi = platform_get_drvdata(dev);
 
 	reset_control_assert(p2wi->rstc);
 	clk_disable_unprepare(p2wi->clk);
 	i2c_del_adapter(&p2wi->adapter);
-
-	return 0;
 }
 
 static struct platform_driver p2wi_driver = {
 	.probe	= p2wi_probe,
-	.remove	= p2wi_remove,
+	.remove_new = p2wi_remove,
 	.driver	= {
 		.name = "i2c-sunxi-p2wi",
 		.of_match_table = p2wi_of_match_table,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 72/89] i2c: synquacer: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (70 preceding siblings ...)
  2023-05-08 20:52 ` [PATCH 71/89] i2c: sun6i-p2wi: " Uwe Kleine-König
@ 2023-05-08 20:52 ` Uwe Kleine-König
  2023-05-08 22:00   ` Ard Biesheuvel
  2023-05-08 20:52 ` [PATCH 73/89] i2c: tegra-bpmp: " Uwe Kleine-König
                   ` (17 subsequent siblings)
  89 siblings, 1 reply; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:52 UTC (permalink / raw)
  To: Ard Biesheuvel, Wolfram Sang; +Cc: linux-i2c, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/busses/i2c-synquacer.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/i2c-synquacer.c b/drivers/i2c/busses/i2c-synquacer.c
index 50d19cf99a03..4cc196ca8f6d 100644
--- a/drivers/i2c/busses/i2c-synquacer.c
+++ b/drivers/i2c/busses/i2c-synquacer.c
@@ -618,15 +618,13 @@ static int synquacer_i2c_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int synquacer_i2c_remove(struct platform_device *pdev)
+static void synquacer_i2c_remove(struct platform_device *pdev)
 {
 	struct synquacer_i2c *i2c = platform_get_drvdata(pdev);
 
 	i2c_del_adapter(&i2c->adapter);
 	if (!IS_ERR(i2c->pclk))
 		clk_disable_unprepare(i2c->pclk);
-
-	return 0;
 };
 
 static const struct of_device_id synquacer_i2c_dt_ids[] __maybe_unused = {
@@ -645,7 +643,7 @@ MODULE_DEVICE_TABLE(acpi, synquacer_i2c_acpi_ids);
 
 static struct platform_driver synquacer_i2c_driver = {
 	.probe	= synquacer_i2c_probe,
-	.remove	= synquacer_i2c_remove,
+	.remove_new = synquacer_i2c_remove,
 	.driver	= {
 		.name = "synquacer_i2c",
 		.of_match_table = of_match_ptr(synquacer_i2c_dt_ids),
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 73/89] i2c: tegra-bpmp: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (71 preceding siblings ...)
  2023-05-08 20:52 ` [PATCH 72/89] i2c: synquacer: " Uwe Kleine-König
@ 2023-05-08 20:52 ` Uwe Kleine-König
  2023-05-08 20:52 ` [PATCH 74/89] i2c: tegra: " Uwe Kleine-König
                   ` (16 subsequent siblings)
  89 siblings, 0 replies; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:52 UTC (permalink / raw)
  To: Thierry Reding, Jonathan Hunter, Wolfram Sang, Wolfram Sang
  Cc: linux-i2c, linux-tegra, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/busses/i2c-tegra-bpmp.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/i2c-tegra-bpmp.c b/drivers/i2c/busses/i2c-tegra-bpmp.c
index 95139985b2d5..bc3f94561746 100644
--- a/drivers/i2c/busses/i2c-tegra-bpmp.c
+++ b/drivers/i2c/busses/i2c-tegra-bpmp.c
@@ -316,13 +316,11 @@ static int tegra_bpmp_i2c_probe(struct platform_device *pdev)
 	return i2c_add_adapter(&i2c->adapter);
 }
 
-static int tegra_bpmp_i2c_remove(struct platform_device *pdev)
+static void tegra_bpmp_i2c_remove(struct platform_device *pdev)
 {
 	struct tegra_bpmp_i2c *i2c = platform_get_drvdata(pdev);
 
 	i2c_del_adapter(&i2c->adapter);
-
-	return 0;
 }
 
 static const struct of_device_id tegra_bpmp_i2c_of_match[] = {
@@ -337,7 +335,7 @@ static struct platform_driver tegra_bpmp_i2c_driver = {
 		.of_match_table = tegra_bpmp_i2c_of_match,
 	},
 	.probe = tegra_bpmp_i2c_probe,
-	.remove = tegra_bpmp_i2c_remove,
+	.remove_new = tegra_bpmp_i2c_remove,
 };
 module_platform_driver(tegra_bpmp_i2c_driver);
 
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 74/89] i2c: tegra: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (72 preceding siblings ...)
  2023-05-08 20:52 ` [PATCH 73/89] i2c: tegra-bpmp: " Uwe Kleine-König
@ 2023-05-08 20:52 ` Uwe Kleine-König
  2023-05-08 20:52 ` [PATCH 75/89] i2c: uniphier-f: " Uwe Kleine-König
                   ` (15 subsequent siblings)
  89 siblings, 0 replies; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:52 UTC (permalink / raw)
  To: Laxman Dewangan, Thierry Reding, Jonathan Hunter, Wolfram Sang
  Cc: Dmitry Osipenko, linux-i2c, linux-tegra, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/busses/i2c-tegra.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/i2c-tegra.c b/drivers/i2c/busses/i2c-tegra.c
index 157066f06a32..a82d264bf73d 100644
--- a/drivers/i2c/busses/i2c-tegra.c
+++ b/drivers/i2c/busses/i2c-tegra.c
@@ -1868,7 +1868,7 @@ static int tegra_i2c_probe(struct platform_device *pdev)
 	return err;
 }
 
-static int tegra_i2c_remove(struct platform_device *pdev)
+static void tegra_i2c_remove(struct platform_device *pdev)
 {
 	struct tegra_i2c_dev *i2c_dev = platform_get_drvdata(pdev);
 
@@ -1877,8 +1877,6 @@ static int tegra_i2c_remove(struct platform_device *pdev)
 
 	tegra_i2c_release_dma(i2c_dev);
 	tegra_i2c_release_clocks(i2c_dev);
-
-	return 0;
 }
 
 static int __maybe_unused tegra_i2c_runtime_resume(struct device *dev)
@@ -1987,7 +1985,7 @@ MODULE_DEVICE_TABLE(acpi, tegra_i2c_acpi_match);
 
 static struct platform_driver tegra_i2c_driver = {
 	.probe = tegra_i2c_probe,
-	.remove = tegra_i2c_remove,
+	.remove_new = tegra_i2c_remove,
 	.driver = {
 		.name = "tegra-i2c",
 		.of_match_table = tegra_i2c_of_match,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 75/89] i2c: uniphier-f: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (73 preceding siblings ...)
  2023-05-08 20:52 ` [PATCH 74/89] i2c: tegra: " Uwe Kleine-König
@ 2023-05-08 20:52 ` Uwe Kleine-König
  2023-05-08 20:52 ` [PATCH 76/89] i2c: uniphier: " Uwe Kleine-König
                   ` (14 subsequent siblings)
  89 siblings, 0 replies; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:52 UTC (permalink / raw)
  To: Kunihiko Hayashi, Masami Hiramatsu, Wolfram Sang
  Cc: linux-i2c, linux-arm-kernel, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/busses/i2c-uniphier-f.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/i2c-uniphier-f.c b/drivers/i2c/busses/i2c-uniphier-f.c
index d7b622891e52..54b1624ef87e 100644
--- a/drivers/i2c/busses/i2c-uniphier-f.c
+++ b/drivers/i2c/busses/i2c-uniphier-f.c
@@ -586,14 +586,12 @@ static int uniphier_fi2c_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int uniphier_fi2c_remove(struct platform_device *pdev)
+static void uniphier_fi2c_remove(struct platform_device *pdev)
 {
 	struct uniphier_fi2c_priv *priv = platform_get_drvdata(pdev);
 
 	i2c_del_adapter(&priv->adap);
 	clk_disable_unprepare(priv->clk);
-
-	return 0;
 }
 
 static int __maybe_unused uniphier_fi2c_suspend(struct device *dev)
@@ -631,7 +629,7 @@ MODULE_DEVICE_TABLE(of, uniphier_fi2c_match);
 
 static struct platform_driver uniphier_fi2c_drv = {
 	.probe  = uniphier_fi2c_probe,
-	.remove = uniphier_fi2c_remove,
+	.remove_new = uniphier_fi2c_remove,
 	.driver = {
 		.name  = "uniphier-fi2c",
 		.of_match_table = uniphier_fi2c_match,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 76/89] i2c: uniphier: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (74 preceding siblings ...)
  2023-05-08 20:52 ` [PATCH 75/89] i2c: uniphier-f: " Uwe Kleine-König
@ 2023-05-08 20:52 ` Uwe Kleine-König
  2023-05-08 20:52 ` [PATCH 77/89] i2c: versatile: " Uwe Kleine-König
                   ` (13 subsequent siblings)
  89 siblings, 0 replies; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:52 UTC (permalink / raw)
  To: Kunihiko Hayashi, Masami Hiramatsu, Wolfram Sang
  Cc: linux-i2c, linux-arm-kernel, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/busses/i2c-uniphier.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/i2c-uniphier.c b/drivers/i2c/busses/i2c-uniphier.c
index e3ebae381f08..96b1eb7489a3 100644
--- a/drivers/i2c/busses/i2c-uniphier.c
+++ b/drivers/i2c/busses/i2c-uniphier.c
@@ -380,14 +380,12 @@ static int uniphier_i2c_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int uniphier_i2c_remove(struct platform_device *pdev)
+static void uniphier_i2c_remove(struct platform_device *pdev)
 {
 	struct uniphier_i2c_priv *priv = platform_get_drvdata(pdev);
 
 	i2c_del_adapter(&priv->adap);
 	clk_disable_unprepare(priv->clk);
-
-	return 0;
 }
 
 static int __maybe_unused uniphier_i2c_suspend(struct device *dev)
@@ -425,7 +423,7 @@ MODULE_DEVICE_TABLE(of, uniphier_i2c_match);
 
 static struct platform_driver uniphier_i2c_drv = {
 	.probe  = uniphier_i2c_probe,
-	.remove = uniphier_i2c_remove,
+	.remove_new = uniphier_i2c_remove,
 	.driver = {
 		.name  = "uniphier-i2c",
 		.of_match_table = uniphier_i2c_match,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 77/89] i2c: versatile: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (75 preceding siblings ...)
  2023-05-08 20:52 ` [PATCH 76/89] i2c: uniphier: " Uwe Kleine-König
@ 2023-05-08 20:52 ` Uwe Kleine-König
  2023-05-09  7:07   ` Linus Walleij
  2023-05-08 20:52 ` [PATCH 78/89] i2c: viperboard: " Uwe Kleine-König
                   ` (12 subsequent siblings)
  89 siblings, 1 reply; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:52 UTC (permalink / raw)
  To: Linus Walleij, Wolfram Sang; +Cc: linux-arm-kernel, linux-i2c, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/busses/i2c-versatile.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/i2c/busses/i2c-versatile.c b/drivers/i2c/busses/i2c-versatile.c
index 1ab419f8fa52..0a866456db58 100644
--- a/drivers/i2c/busses/i2c-versatile.c
+++ b/drivers/i2c/busses/i2c-versatile.c
@@ -96,12 +96,11 @@ static int i2c_versatile_probe(struct platform_device *dev)
 	return 0;
 }
 
-static int i2c_versatile_remove(struct platform_device *dev)
+static void i2c_versatile_remove(struct platform_device *dev)
 {
 	struct i2c_versatile *i2c = platform_get_drvdata(dev);
 
 	i2c_del_adapter(&i2c->adap);
-	return 0;
 }
 
 static const struct of_device_id i2c_versatile_match[] = {
@@ -112,7 +111,7 @@ MODULE_DEVICE_TABLE(of, i2c_versatile_match);
 
 static struct platform_driver i2c_versatile_driver = {
 	.probe		= i2c_versatile_probe,
-	.remove		= i2c_versatile_remove,
+	.remove_new	= i2c_versatile_remove,
 	.driver		= {
 		.name	= "versatile-i2c",
 		.of_match_table = i2c_versatile_match,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 78/89] i2c: viperboard: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (76 preceding siblings ...)
  2023-05-08 20:52 ` [PATCH 77/89] i2c: versatile: " Uwe Kleine-König
@ 2023-05-08 20:52 ` Uwe Kleine-König
  2023-05-08 20:52 ` [PATCH 79/89] i2c: wmt: " Uwe Kleine-König
                   ` (11 subsequent siblings)
  89 siblings, 0 replies; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:52 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: linux-i2c, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/busses/i2c-viperboard.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/i2c-viperboard.c b/drivers/i2c/busses/i2c-viperboard.c
index 8b5322c3bce0..9e153b5b0e8e 100644
--- a/drivers/i2c/busses/i2c-viperboard.c
+++ b/drivers/i2c/busses/i2c-viperboard.c
@@ -407,20 +407,18 @@ static int vprbrd_i2c_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int vprbrd_i2c_remove(struct platform_device *pdev)
+static void vprbrd_i2c_remove(struct platform_device *pdev)
 {
 	struct vprbrd_i2c *vb_i2c = platform_get_drvdata(pdev);
 
 	i2c_del_adapter(&vb_i2c->i2c);
-
-	return 0;
 }
 
 static struct platform_driver vprbrd_i2c_driver = {
 	.driver.name	= "viperboard-i2c",
 	.driver.owner	= THIS_MODULE,
 	.probe		= vprbrd_i2c_probe,
-	.remove		= vprbrd_i2c_remove,
+	.remove_new	= vprbrd_i2c_remove,
 };
 
 static int __init vprbrd_i2c_init(void)
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 79/89] i2c: wmt: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (77 preceding siblings ...)
  2023-05-08 20:52 ` [PATCH 78/89] i2c: viperboard: " Uwe Kleine-König
@ 2023-05-08 20:52 ` Uwe Kleine-König
  2023-05-08 20:52 ` [PATCH 80/89] i2c: xgene-slimpro: " Uwe Kleine-König
                   ` (10 subsequent siblings)
  89 siblings, 0 replies; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:52 UTC (permalink / raw)
  To: Wolfram Sang, Wolfram Sang; +Cc: linux-arm-kernel, linux-i2c, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/busses/i2c-wmt.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/i2c-wmt.c b/drivers/i2c/busses/i2c-wmt.c
index 7d4bc8736079..736acaa538d2 100644
--- a/drivers/i2c/busses/i2c-wmt.c
+++ b/drivers/i2c/busses/i2c-wmt.c
@@ -436,7 +436,7 @@ static int wmt_i2c_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int wmt_i2c_remove(struct platform_device *pdev)
+static void wmt_i2c_remove(struct platform_device *pdev)
 {
 	struct wmt_i2c_dev *i2c_dev = platform_get_drvdata(pdev);
 
@@ -444,8 +444,6 @@ static int wmt_i2c_remove(struct platform_device *pdev)
 	writew(0, i2c_dev->base + REG_IMR);
 	clk_disable_unprepare(i2c_dev->clk);
 	i2c_del_adapter(&i2c_dev->adapter);
-
-	return 0;
 }
 
 static const struct of_device_id wmt_i2c_dt_ids[] = {
@@ -455,7 +453,7 @@ static const struct of_device_id wmt_i2c_dt_ids[] = {
 
 static struct platform_driver wmt_i2c_driver = {
 	.probe		= wmt_i2c_probe,
-	.remove		= wmt_i2c_remove,
+	.remove_new	= wmt_i2c_remove,
 	.driver		= {
 		.name	= "wmt-i2c",
 		.of_match_table = wmt_i2c_dt_ids,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 80/89] i2c: xgene-slimpro: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (78 preceding siblings ...)
  2023-05-08 20:52 ` [PATCH 79/89] i2c: wmt: " Uwe Kleine-König
@ 2023-05-08 20:52 ` Uwe Kleine-König
  2023-05-08 20:52 ` [PATCH 81/89] i2c: xiic: " Uwe Kleine-König
                   ` (9 subsequent siblings)
  89 siblings, 0 replies; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:52 UTC (permalink / raw)
  To: Andi Shyti, Wei Chen, Wolfram Sang; +Cc: linux-i2c, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/busses/i2c-xgene-slimpro.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/i2c-xgene-slimpro.c b/drivers/i2c/busses/i2c-xgene-slimpro.c
index 3538d36368a9..fbc1ffbd2fa7 100644
--- a/drivers/i2c/busses/i2c-xgene-slimpro.c
+++ b/drivers/i2c/busses/i2c-xgene-slimpro.c
@@ -560,7 +560,7 @@ static int xgene_slimpro_i2c_probe(struct platform_device *pdev)
 	return rc;
 }
 
-static int xgene_slimpro_i2c_remove(struct platform_device *pdev)
+static void xgene_slimpro_i2c_remove(struct platform_device *pdev)
 {
 	struct slimpro_i2c_dev *ctx = platform_get_drvdata(pdev);
 
@@ -570,8 +570,6 @@ static int xgene_slimpro_i2c_remove(struct platform_device *pdev)
 		mbox_free_channel(ctx->mbox_chan);
 	else
 		pcc_mbox_free_channel(ctx->pcc_chan);
-
-	return 0;
 }
 
 static const struct of_device_id xgene_slimpro_i2c_dt_ids[] = {
@@ -591,7 +589,7 @@ MODULE_DEVICE_TABLE(acpi, xgene_slimpro_i2c_acpi_ids);
 
 static struct platform_driver xgene_slimpro_i2c_driver = {
 	.probe	= xgene_slimpro_i2c_probe,
-	.remove	= xgene_slimpro_i2c_remove,
+	.remove_new = xgene_slimpro_i2c_remove,
 	.driver	= {
 		.name	= "xgene-slimpro-i2c",
 		.of_match_table = of_match_ptr(xgene_slimpro_i2c_dt_ids),
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 81/89] i2c: xiic: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (79 preceding siblings ...)
  2023-05-08 20:52 ` [PATCH 80/89] i2c: xgene-slimpro: " Uwe Kleine-König
@ 2023-05-08 20:52 ` Uwe Kleine-König
  2023-05-08 20:52 ` [PATCH 82/89] i2c: xlp9xx: " Uwe Kleine-König
                   ` (8 subsequent siblings)
  89 siblings, 0 replies; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:52 UTC (permalink / raw)
  To: Michal Simek, Wolfram Sang; +Cc: linux-arm-kernel, linux-i2c, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/busses/i2c-xiic.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/i2c-xiic.c b/drivers/i2c/busses/i2c-xiic.c
index 8a3d9817cb41..61288f8dd067 100644
--- a/drivers/i2c/busses/i2c-xiic.c
+++ b/drivers/i2c/busses/i2c-xiic.c
@@ -1335,7 +1335,7 @@ static int xiic_i2c_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int xiic_i2c_remove(struct platform_device *pdev)
+static void xiic_i2c_remove(struct platform_device *pdev)
 {
 	struct xiic_i2c *i2c = platform_get_drvdata(pdev);
 	int ret;
@@ -1356,8 +1356,6 @@ static int xiic_i2c_remove(struct platform_device *pdev)
 	pm_runtime_disable(&pdev->dev);
 	pm_runtime_set_suspended(&pdev->dev);
 	pm_runtime_dont_use_autosuspend(&pdev->dev);
-
-	return 0;
 }
 
 static int __maybe_unused xiic_i2c_runtime_suspend(struct device *dev)
@@ -1390,7 +1388,7 @@ static const struct dev_pm_ops xiic_dev_pm_ops = {
 
 static struct platform_driver xiic_i2c_driver = {
 	.probe   = xiic_i2c_probe,
-	.remove  = xiic_i2c_remove,
+	.remove_new = xiic_i2c_remove,
 	.driver  = {
 		.name = DRIVER_NAME,
 		.of_match_table = of_match_ptr(xiic_of_match),
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 82/89] i2c: xlp9xx: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (80 preceding siblings ...)
  2023-05-08 20:52 ` [PATCH 81/89] i2c: xiic: " Uwe Kleine-König
@ 2023-05-08 20:52 ` Uwe Kleine-König
  2023-05-08 20:53 ` [PATCH 83/89] i2c: mux: arb-gpio-challenge: " Uwe Kleine-König
                   ` (7 subsequent siblings)
  89 siblings, 0 replies; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:52 UTC (permalink / raw)
  To: George Cherian, Wolfram Sang; +Cc: linux-i2c, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/busses/i2c-xlp9xx.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/i2c-xlp9xx.c b/drivers/i2c/busses/i2c-xlp9xx.c
index 4e3b11c0f732..f59e8c544f36 100644
--- a/drivers/i2c/busses/i2c-xlp9xx.c
+++ b/drivers/i2c/busses/i2c-xlp9xx.c
@@ -559,7 +559,7 @@ static int xlp9xx_i2c_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int xlp9xx_i2c_remove(struct platform_device *pdev)
+static void xlp9xx_i2c_remove(struct platform_device *pdev)
 {
 	struct xlp9xx_i2c_dev *priv;
 
@@ -568,8 +568,6 @@ static int xlp9xx_i2c_remove(struct platform_device *pdev)
 	synchronize_irq(priv->irq);
 	i2c_del_adapter(&priv->adapter);
 	xlp9xx_write_i2c_reg(priv, XLP9XX_I2C_CTRL, 0);
-
-	return 0;
 }
 
 #ifdef CONFIG_ACPI
@@ -583,7 +581,7 @@ MODULE_DEVICE_TABLE(acpi, xlp9xx_i2c_acpi_ids);
 
 static struct platform_driver xlp9xx_i2c_driver = {
 	.probe = xlp9xx_i2c_probe,
-	.remove = xlp9xx_i2c_remove,
+	.remove_new = xlp9xx_i2c_remove,
 	.driver = {
 		.name = "xlp9xx-i2c",
 		.acpi_match_table = ACPI_PTR(xlp9xx_i2c_acpi_ids),
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 83/89] i2c: mux: arb-gpio-challenge: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (81 preceding siblings ...)
  2023-05-08 20:52 ` [PATCH 82/89] i2c: xlp9xx: " Uwe Kleine-König
@ 2023-05-08 20:53 ` Uwe Kleine-König
  2023-05-09  6:09   ` Peter Rosin
  2023-05-08 20:53 ` [PATCH 84/89] i2c: mux: demux-pinctrl: " Uwe Kleine-König
                   ` (6 subsequent siblings)
  89 siblings, 1 reply; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:53 UTC (permalink / raw)
  To: Peter Rosin, Wolfram Sang; +Cc: linux-i2c, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/muxes/i2c-arb-gpio-challenge.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/i2c/muxes/i2c-arb-gpio-challenge.c b/drivers/i2c/muxes/i2c-arb-gpio-challenge.c
index 1c78657631f4..24168e9f7df4 100644
--- a/drivers/i2c/muxes/i2c-arb-gpio-challenge.c
+++ b/drivers/i2c/muxes/i2c-arb-gpio-challenge.c
@@ -174,13 +174,12 @@ static int i2c_arbitrator_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int i2c_arbitrator_remove(struct platform_device *pdev)
+static void i2c_arbitrator_remove(struct platform_device *pdev)
 {
 	struct i2c_mux_core *muxc = platform_get_drvdata(pdev);
 
 	i2c_mux_del_adapters(muxc);
 	i2c_put_adapter(muxc->parent);
-	return 0;
 }
 
 static const struct of_device_id i2c_arbitrator_of_match[] = {
@@ -191,7 +190,7 @@ MODULE_DEVICE_TABLE(of, i2c_arbitrator_of_match);
 
 static struct platform_driver i2c_arbitrator_driver = {
 	.probe	= i2c_arbitrator_probe,
-	.remove	= i2c_arbitrator_remove,
+	.remove_new = i2c_arbitrator_remove,
 	.driver	= {
 		.name	= "i2c-arb-gpio-challenge",
 		.of_match_table = i2c_arbitrator_of_match,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 84/89] i2c: mux: demux-pinctrl: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (82 preceding siblings ...)
  2023-05-08 20:53 ` [PATCH 83/89] i2c: mux: arb-gpio-challenge: " Uwe Kleine-König
@ 2023-05-08 20:53 ` Uwe Kleine-König
  2023-05-09  6:10   ` Peter Rosin
  2023-05-08 20:53 ` [PATCH 85/89] i2c: mux: gpio: " Uwe Kleine-König
                   ` (5 subsequent siblings)
  89 siblings, 1 reply; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:53 UTC (permalink / raw)
  To: Wolfram Sang, Peter Rosin, Wolfram Sang; +Cc: linux-i2c, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/muxes/i2c-demux-pinctrl.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/muxes/i2c-demux-pinctrl.c b/drivers/i2c/muxes/i2c-demux-pinctrl.c
index f7a7405d4350..a3a122fae71e 100644
--- a/drivers/i2c/muxes/i2c-demux-pinctrl.c
+++ b/drivers/i2c/muxes/i2c-demux-pinctrl.c
@@ -282,7 +282,7 @@ static int i2c_demux_pinctrl_probe(struct platform_device *pdev)
 	return err;
 }
 
-static int i2c_demux_pinctrl_remove(struct platform_device *pdev)
+static void i2c_demux_pinctrl_remove(struct platform_device *pdev)
 {
 	struct i2c_demux_pinctrl_priv *priv = platform_get_drvdata(pdev);
 	int i;
@@ -296,8 +296,6 @@ static int i2c_demux_pinctrl_remove(struct platform_device *pdev)
 		of_node_put(priv->chan[i].parent_np);
 		of_changeset_destroy(&priv->chan[i].chgset);
 	}
-
-	return 0;
 }
 
 static const struct of_device_id i2c_demux_pinctrl_of_match[] = {
@@ -312,7 +310,7 @@ static struct platform_driver i2c_demux_pinctrl_driver = {
 		.of_match_table = i2c_demux_pinctrl_of_match,
 	},
 	.probe	= i2c_demux_pinctrl_probe,
-	.remove	= i2c_demux_pinctrl_remove,
+	.remove_new = i2c_demux_pinctrl_remove,
 };
 module_platform_driver(i2c_demux_pinctrl_driver);
 
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 85/89] i2c: mux: gpio: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (83 preceding siblings ...)
  2023-05-08 20:53 ` [PATCH 84/89] i2c: mux: demux-pinctrl: " Uwe Kleine-König
@ 2023-05-08 20:53 ` Uwe Kleine-König
  2023-05-09  6:10   ` Peter Rosin
  2023-05-08 20:53 ` [PATCH 86/89] i2c: mux: gpmux: " Uwe Kleine-König
                   ` (4 subsequent siblings)
  89 siblings, 1 reply; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:53 UTC (permalink / raw)
  To: Peter Korsgaard, Peter Rosin, Wolfram Sang; +Cc: linux-i2c, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/muxes/i2c-mux-gpio.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/muxes/i2c-mux-gpio.c b/drivers/i2c/muxes/i2c-mux-gpio.c
index 73a23e117ebe..5d5cbe0130cd 100644
--- a/drivers/i2c/muxes/i2c-mux-gpio.c
+++ b/drivers/i2c/muxes/i2c-mux-gpio.c
@@ -225,14 +225,12 @@ static int i2c_mux_gpio_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int i2c_mux_gpio_remove(struct platform_device *pdev)
+static void i2c_mux_gpio_remove(struct platform_device *pdev)
 {
 	struct i2c_mux_core *muxc = platform_get_drvdata(pdev);
 
 	i2c_mux_del_adapters(muxc);
 	i2c_put_adapter(muxc->parent);
-
-	return 0;
 }
 
 static const struct of_device_id i2c_mux_gpio_of_match[] = {
@@ -243,7 +241,7 @@ MODULE_DEVICE_TABLE(of, i2c_mux_gpio_of_match);
 
 static struct platform_driver i2c_mux_gpio_driver = {
 	.probe	= i2c_mux_gpio_probe,
-	.remove	= i2c_mux_gpio_remove,
+	.remove_new = i2c_mux_gpio_remove,
 	.driver	= {
 		.name	= "i2c-mux-gpio",
 		.of_match_table = i2c_mux_gpio_of_match,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 86/89] i2c: mux: gpmux: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (84 preceding siblings ...)
  2023-05-08 20:53 ` [PATCH 85/89] i2c: mux: gpio: " Uwe Kleine-König
@ 2023-05-08 20:53 ` Uwe Kleine-König
  2023-05-09  6:10   ` Peter Rosin
  2023-05-08 20:53 ` [PATCH 87/89] i2c: mux: mlxcpld: " Uwe Kleine-König
                   ` (3 subsequent siblings)
  89 siblings, 1 reply; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:53 UTC (permalink / raw)
  To: Peter Rosin, Wolfram Sang; +Cc: linux-i2c, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/muxes/i2c-mux-gpmux.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/muxes/i2c-mux-gpmux.c b/drivers/i2c/muxes/i2c-mux-gpmux.c
index 33024acaac02..0405af0e1510 100644
--- a/drivers/i2c/muxes/i2c-mux-gpmux.c
+++ b/drivers/i2c/muxes/i2c-mux-gpmux.c
@@ -142,19 +142,17 @@ static int i2c_mux_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int i2c_mux_remove(struct platform_device *pdev)
+static void i2c_mux_remove(struct platform_device *pdev)
 {
 	struct i2c_mux_core *muxc = platform_get_drvdata(pdev);
 
 	i2c_mux_del_adapters(muxc);
 	i2c_put_adapter(muxc->parent);
-
-	return 0;
 }
 
 static struct platform_driver i2c_mux_driver = {
 	.probe	= i2c_mux_probe,
-	.remove	= i2c_mux_remove,
+	.remove_new = i2c_mux_remove,
 	.driver	= {
 		.name	= "i2c-mux-gpmux",
 		.of_match_table = i2c_mux_of_match,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 87/89] i2c: mux: mlxcpld: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (85 preceding siblings ...)
  2023-05-08 20:53 ` [PATCH 86/89] i2c: mux: gpmux: " Uwe Kleine-König
@ 2023-05-08 20:53 ` Uwe Kleine-König
  2023-05-09  5:55   ` Vadim Pasternak
  2023-05-09  6:11   ` Peter Rosin
  2023-05-08 20:53 ` [PATCH 88/89] i2c: mux: pinctrl: " Uwe Kleine-König
                   ` (2 subsequent siblings)
  89 siblings, 2 replies; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:53 UTC (permalink / raw)
  To: Vadim Pasternak, Michael Shych, Peter Rosin, Wolfram Sang
  Cc: linux-i2c, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/muxes/i2c-mux-mlxcpld.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/i2c/muxes/i2c-mux-mlxcpld.c b/drivers/i2c/muxes/i2c-mux-mlxcpld.c
index 1a879f6a31ef..3dda00f1df78 100644
--- a/drivers/i2c/muxes/i2c-mux-mlxcpld.c
+++ b/drivers/i2c/muxes/i2c-mux-mlxcpld.c
@@ -170,12 +170,11 @@ static int mlxcpld_mux_probe(struct platform_device *pdev)
 	return err;
 }
 
-static int mlxcpld_mux_remove(struct platform_device *pdev)
+static void mlxcpld_mux_remove(struct platform_device *pdev)
 {
 	struct i2c_mux_core *muxc = platform_get_drvdata(pdev);
 
 	i2c_mux_del_adapters(muxc);
-	return 0;
 }
 
 static struct platform_driver mlxcpld_mux_driver = {
@@ -183,7 +182,7 @@ static struct platform_driver mlxcpld_mux_driver = {
 		.name = "i2c-mux-mlxcpld",
 	},
 	.probe = mlxcpld_mux_probe,
-	.remove = mlxcpld_mux_remove,
+	.remove_new = mlxcpld_mux_remove,
 };
 
 module_platform_driver(mlxcpld_mux_driver);
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 88/89] i2c: mux: pinctrl: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (86 preceding siblings ...)
  2023-05-08 20:53 ` [PATCH 87/89] i2c: mux: mlxcpld: " Uwe Kleine-König
@ 2023-05-08 20:53 ` Uwe Kleine-König
  2023-05-09  6:11   ` Peter Rosin
  2023-05-08 20:53 ` [PATCH 89/89] i2c: mux: reg: " Uwe Kleine-König
  2023-06-01  7:33 ` [PATCH 00/89] i2c: " Uwe Kleine-König
  89 siblings, 1 reply; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:53 UTC (permalink / raw)
  To: Peter Rosin, Wolfram Sang; +Cc: linux-i2c, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/muxes/i2c-mux-pinctrl.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/muxes/i2c-mux-pinctrl.c b/drivers/i2c/muxes/i2c-mux-pinctrl.c
index d5ad904756fd..18236b9fa14a 100644
--- a/drivers/i2c/muxes/i2c-mux-pinctrl.c
+++ b/drivers/i2c/muxes/i2c-mux-pinctrl.c
@@ -166,14 +166,12 @@ static int i2c_mux_pinctrl_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int i2c_mux_pinctrl_remove(struct platform_device *pdev)
+static void i2c_mux_pinctrl_remove(struct platform_device *pdev)
 {
 	struct i2c_mux_core *muxc = platform_get_drvdata(pdev);
 
 	i2c_mux_del_adapters(muxc);
 	i2c_put_adapter(muxc->parent);
-
-	return 0;
 }
 
 static const struct of_device_id i2c_mux_pinctrl_of_match[] = {
@@ -188,7 +186,7 @@ static struct platform_driver i2c_mux_pinctrl_driver = {
 		.of_match_table = i2c_mux_pinctrl_of_match,
 	},
 	.probe	= i2c_mux_pinctrl_probe,
-	.remove	= i2c_mux_pinctrl_remove,
+	.remove_new = i2c_mux_pinctrl_remove,
 };
 module_platform_driver(i2c_mux_pinctrl_driver);
 
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* [PATCH 89/89] i2c: mux: reg: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (87 preceding siblings ...)
  2023-05-08 20:53 ` [PATCH 88/89] i2c: mux: pinctrl: " Uwe Kleine-König
@ 2023-05-08 20:53 ` Uwe Kleine-König
  2023-05-09  6:11   ` Peter Rosin
  2023-06-01  7:33 ` [PATCH 00/89] i2c: " Uwe Kleine-König
  89 siblings, 1 reply; 140+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 20:53 UTC (permalink / raw)
  To: Peter Rosin, Wolfram Sang; +Cc: linux-i2c, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/muxes/i2c-mux-reg.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/muxes/i2c-mux-reg.c b/drivers/i2c/muxes/i2c-mux-reg.c
index 30a6de1694e0..9efc1ed01577 100644
--- a/drivers/i2c/muxes/i2c-mux-reg.c
+++ b/drivers/i2c/muxes/i2c-mux-reg.c
@@ -233,14 +233,12 @@ static int i2c_mux_reg_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int i2c_mux_reg_remove(struct platform_device *pdev)
+static void i2c_mux_reg_remove(struct platform_device *pdev)
 {
 	struct i2c_mux_core *muxc = platform_get_drvdata(pdev);
 
 	i2c_mux_del_adapters(muxc);
 	i2c_put_adapter(muxc->parent);
-
-	return 0;
 }
 
 static const struct of_device_id i2c_mux_reg_of_match[] = {
@@ -251,7 +249,7 @@ MODULE_DEVICE_TABLE(of, i2c_mux_reg_of_match);
 
 static struct platform_driver i2c_mux_reg_driver = {
 	.probe	= i2c_mux_reg_probe,
-	.remove	= i2c_mux_reg_remove,
+	.remove_new = i2c_mux_reg_remove,
 	.driver	= {
 		.name	= "i2c-mux-reg",
 		.of_match_table = of_match_ptr(i2c_mux_reg_of_match),
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 140+ messages in thread

* Re: [PATCH 09/89] i2c: bcm2835: Convert to platform remove callback returning void
  2023-05-08 20:51 ` [PATCH 09/89] i2c: bcm2835: " Uwe Kleine-König
@ 2023-05-08 20:59   ` Florian Fainelli
  0 siblings, 0 replies; 140+ messages in thread
From: Florian Fainelli @ 2023-05-08 20:59 UTC (permalink / raw)
  To: Uwe Kleine-König, Florian Fainelli, Ray Jui, Scott Branden,
	Wolfram Sang, ye xingchen
  Cc: Broadcom internal kernel review list, linux-i2c,
	linux-rpi-kernel, linux-arm-kernel, kernel

On 5/8/23 13:51, Uwe Kleine-König wrote:
> The .remove() callback for a platform driver returns an int which makes
> many driver authors wrongly assume it's possible to do error handling by
> returning an error code. However the value returned is (mostly) ignored
> and this typically results in resource leaks. To improve here there is a
> quest to make the remove callback return void. In the first step of this
> quest all drivers are converted to .remove_new() which already returns
> void.
> 
> Trivially convert this driver from always returning zero in the remove
> callback to the void returning variant.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Acked-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian


^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [PATCH 07/89] i2c: bcm-iproc: Convert to platform remove callback returning void
  2023-05-08 20:51 ` [PATCH 07/89] i2c: bcm-iproc: " Uwe Kleine-König
@ 2023-05-08 20:59   ` Florian Fainelli
  0 siblings, 0 replies; 140+ messages in thread
From: Florian Fainelli @ 2023-05-08 20:59 UTC (permalink / raw)
  To: Uwe Kleine-König, Ray Jui, Scott Branden,
	Greg Kroah-Hartman, Allison Randal, Thomas Gleixner,
	Wolfram Sang
  Cc: Broadcom internal kernel review list, linux-i2c,
	linux-arm-kernel, kernel

On 5/8/23 13:51, Uwe Kleine-König wrote:
> The .remove() callback for a platform driver returns an int which makes
> many driver authors wrongly assume it's possible to do error handling by
> returning an error code. However the value returned is (mostly) ignored
> and this typically results in resource leaks. To improve here there is a
> quest to make the remove callback return void. In the first step of this
> quest all drivers are converted to .remove_new() which already returns
> void.
> 
> Trivially convert this driver from always returning zero in the remove
> callback to the void returning variant.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Acked-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian


^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [PATCH 08/89] i2c: bcm-kona: Convert to platform remove callback returning void
  2023-05-08 20:51 ` [PATCH 08/89] i2c: bcm-kona: " Uwe Kleine-König
@ 2023-05-08 20:59   ` Florian Fainelli
  0 siblings, 0 replies; 140+ messages in thread
From: Florian Fainelli @ 2023-05-08 20:59 UTC (permalink / raw)
  To: Uwe Kleine-König, Florian Fainelli, Ray Jui, Scott Branden,
	Wolfram Sang, Greg Kroah-Hartman, Allison Randal,
	Thomas Gleixner, Wolfram Sang
  Cc: Broadcom internal kernel review list, linux-i2c, kernel

On 5/8/23 13:51, Uwe Kleine-König wrote:
> The .remove() callback for a platform driver returns an int which makes
> many driver authors wrongly assume it's possible to do error handling by
> returning an error code. However the value returned is (mostly) ignored
> and this typically results in resource leaks. To improve here there is a
> quest to make the remove callback return void. In the first step of this
> quest all drivers are converted to .remove_new() which already returns
> void.
> 
> Trivially convert this driver from always returning zero in the remove
> callback to the void returning variant.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Acked-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian


^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [PATCH 10/89] i2c: brcmstb: Convert to platform remove callback returning void
  2023-05-08 20:51 ` [PATCH 10/89] i2c: brcmstb: " Uwe Kleine-König
@ 2023-05-08 20:59   ` Florian Fainelli
  0 siblings, 0 replies; 140+ messages in thread
From: Florian Fainelli @ 2023-05-08 20:59 UTC (permalink / raw)
  To: Uwe Kleine-König, Kamal Dasu, Florian Fainelli, Wolfram Sang
  Cc: Broadcom internal kernel review list, linux-i2c,
	linux-arm-kernel, kernel

On 5/8/23 13:51, Uwe Kleine-König wrote:
> The .remove() callback for a platform driver returns an int which makes
> many driver authors wrongly assume it's possible to do error handling by
> returning an error code. However the value returned is (mostly) ignored
> and this typically results in resource leaks. To improve here there is a
> quest to make the remove callback return void. In the first step of this
> quest all drivers are converted to .remove_new() which already returns
> void.
> 
> Trivially convert this driver from always returning zero in the remove
> callback to the void returning variant.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Acked-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian


^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [PATCH 37/89] i2c: microchip-corei2c: Convert to platform remove callback returning void
  2023-05-08 20:52 ` [PATCH 37/89] i2c: microchip-corei2c: " Uwe Kleine-König
@ 2023-05-08 21:00   ` Conor Dooley
  0 siblings, 0 replies; 140+ messages in thread
From: Conor Dooley @ 2023-05-08 21:00 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Conor Dooley, Daire McNamara, Wolfram Sang, linux-riscv,
	linux-i2c, kernel

[-- Attachment #1: Type: text/plain, Size: 798 bytes --]

On Mon, May 08, 2023 at 10:52:14PM +0200, Uwe Kleine-König wrote:
> The .remove() callback for a platform driver returns an int which makes
> many driver authors wrongly assume it's possible to do error handling by
> returning an error code. However the value returned is (mostly) ignored
> and this typically results in resource leaks. To improve here there is a
> quest to make the remove callback return void. In the first step of this
> quest all drivers are converted to .remove_new() which already returns
> void.
> 
> Trivially convert this driver from always returning zero in the remove
> callback to the void returning variant.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Reviewed-by: Conor Dooley <conor.dooley@microchip.com>

Thanks,
Conor.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 140+ messages in thread

* RE: [PATCH 38/89] i2c: mlxbf: Convert to platform remove callback returning void
  2023-05-08 20:52 ` [PATCH 38/89] i2c: mlxbf: " Uwe Kleine-König
@ 2023-05-08 21:01   ` Asmaa Mnebhi
  0 siblings, 0 replies; 140+ messages in thread
From: Asmaa Mnebhi @ 2023-05-08 21:01 UTC (permalink / raw)
  To: Uwe Kleine-König, Khalil Blaiech, Wolfram Sang; +Cc: linux-i2c, kernel

Reviewed-by: Asmaa Mnebhi <asnaa@nvidia.com>

> -----Original Message-----
> From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> Sent: Monday, May 8, 2023 4:52 PM
> To: Khalil Blaiech <kblaiech@nvidia.com>; Asmaa Mnebhi
> <asmaa@nvidia.com>; Wolfram Sang <wsa@kernel.org>
> Cc: linux-i2c@vger.kernel.org; kernel@pengutronix.de
> Subject: [PATCH 38/89] i2c: mlxbf: Convert to platform remove callback
> returning void
> 
> The .remove() callback for a platform driver returns an int which makes many
> driver authors wrongly assume it's possible to do error handling by returning
> an error code. However the value returned is (mostly) ignored and this
> typically results in resource leaks. To improve here there is a quest to make
> the remove callback return void. In the first step of this quest all drivers are
> converted to .remove_new() which already returns void.
> 
> Trivially convert this driver from always returning zero in the remove callback
> to the void returning variant.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
>  drivers/i2c/busses/i2c-mlxbf.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/i2c/busses/i2c-mlxbf.c b/drivers/i2c/busses/i2c-mlxbf.c
> index 1810d5791b3d..ae66bdd1b737 100644
> --- a/drivers/i2c/busses/i2c-mlxbf.c
> +++ b/drivers/i2c/busses/i2c-mlxbf.c
> @@ -2433,7 +2433,7 @@ static int mlxbf_i2c_probe(struct platform_device
> *pdev)
>  	return 0;
>  }
> 
> -static int mlxbf_i2c_remove(struct platform_device *pdev)
> +static void mlxbf_i2c_remove(struct platform_device *pdev)
>  {
>  	struct mlxbf_i2c_priv *priv = platform_get_drvdata(pdev);
>  	struct device *dev = &pdev->dev;
> @@ -2474,13 +2474,11 @@ static int mlxbf_i2c_remove(struct
> platform_device *pdev)
>  	devm_free_irq(dev, priv->irq, priv);
> 
>  	i2c_del_adapter(&priv->adap);
> -
> -	return 0;
>  }
> 
>  static struct platform_driver mlxbf_i2c_driver = {
>  	.probe = mlxbf_i2c_probe,
> -	.remove = mlxbf_i2c_remove,
> +	.remove_new = mlxbf_i2c_remove,
>  	.driver = {
>  		.name = "i2c-mlxbf",
>  		.acpi_match_table = ACPI_PTR(mlxbf_i2c_acpi_ids),
> --
> 2.39.2


^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [PATCH 40/89] i2c: mpc: Convert to platform remove callback returning void
  2023-05-08 20:52 ` [PATCH 40/89] i2c: mpc: " Uwe Kleine-König
@ 2023-05-08 21:11   ` Chris Packham
  0 siblings, 0 replies; 140+ messages in thread
From: Chris Packham @ 2023-05-08 21:11 UTC (permalink / raw)
  To: Uwe Kleine-König, Wolfram Sang; +Cc: linux-i2c, kernel

Hi Uwe,

(thunderbird decided to send my first reply as html. Hopefully this 
makes it as plain text)

On 9/05/23 08:52, Uwe Kleine-König wrote:
> The .remove() callback for a platform driver returns an int which makes
> many driver authors wrongly assume it's possible to do error handling by
> returning an error code. However the value returned is (mostly) ignored
> and this typically results in resource leaks. To improve here there is a
> quest to make the remove callback return void. In the first step of this
> quest all drivers are converted to .remove_new() which already returns
> void.
>
> Trivially convert this driver from always returning zero in the remove
> callback to the void returning variant.
>
> Signed-off-by: Uwe Kleine-König<u.kleine-koenig@pengutronix.de>
Reviewed-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
> ---
>   drivers/i2c/busses/i2c-mpc.c | 6 ++----
>   1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-mpc.c b/drivers/i2c/busses/i2c-mpc.c
> index cfd074ee6d54..a308afb3cca5 100644
> --- a/drivers/i2c/busses/i2c-mpc.c
> +++ b/drivers/i2c/busses/i2c-mpc.c
> @@ -890,15 +890,13 @@ static int fsl_i2c_probe(struct platform_device *op)
>   	return result;
>   };
>   
> -static int fsl_i2c_remove(struct platform_device *op)
> +static void fsl_i2c_remove(struct platform_device *op)
>   {
>   	struct mpc_i2c *i2c = platform_get_drvdata(op);
>   
>   	i2c_del_adapter(&i2c->adap);
>   
>   	clk_disable_unprepare(i2c->clk_per);
> -
> -	return 0;
>   };
>   
>   static int __maybe_unused mpc_i2c_suspend(struct device *dev)
> @@ -959,7 +957,7 @@ MODULE_DEVICE_TABLE(of, mpc_i2c_of_match);
>   /* Structure for a device driver */
>   static struct platform_driver mpc_i2c_driver = {
>   	.probe		= fsl_i2c_probe,
> -	.remove		= fsl_i2c_remove,
> +	.remove_new	= fsl_i2c_remove,
>   	.driver = {
>   		.name = DRV_NAME,
>   		.of_match_table = mpc_i2c_of_match,

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [PATCH 72/89] i2c: synquacer: Convert to platform remove callback returning void
  2023-05-08 20:52 ` [PATCH 72/89] i2c: synquacer: " Uwe Kleine-König
@ 2023-05-08 22:00   ` Ard Biesheuvel
  0 siblings, 0 replies; 140+ messages in thread
From: Ard Biesheuvel @ 2023-05-08 22:00 UTC (permalink / raw)
  To: Uwe Kleine-König; +Cc: Wolfram Sang, linux-i2c, kernel

On Mon, 8 May 2023 at 22:53, Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> wrote:
>
> The .remove() callback for a platform driver returns an int which makes
> many driver authors wrongly assume it's possible to do error handling by
> returning an error code. However the value returned is (mostly) ignored
> and this typically results in resource leaks. To improve here there is a
> quest to make the remove callback return void. In the first step of this
> quest all drivers are converted to .remove_new() which already returns
> void.
>
> Trivially convert this driver from always returning zero in the remove
> callback to the void returning variant.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Acked-by: Ard Biesheuvel <ardb@kernel.org>

> ---
>  drivers/i2c/busses/i2c-synquacer.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-synquacer.c b/drivers/i2c/busses/i2c-synquacer.c
> index 50d19cf99a03..4cc196ca8f6d 100644
> --- a/drivers/i2c/busses/i2c-synquacer.c
> +++ b/drivers/i2c/busses/i2c-synquacer.c
> @@ -618,15 +618,13 @@ static int synquacer_i2c_probe(struct platform_device *pdev)
>         return 0;
>  }
>
> -static int synquacer_i2c_remove(struct platform_device *pdev)
> +static void synquacer_i2c_remove(struct platform_device *pdev)
>  {
>         struct synquacer_i2c *i2c = platform_get_drvdata(pdev);
>
>         i2c_del_adapter(&i2c->adapter);
>         if (!IS_ERR(i2c->pclk))
>                 clk_disable_unprepare(i2c->pclk);
> -
> -       return 0;
>  };
>
>  static const struct of_device_id synquacer_i2c_dt_ids[] __maybe_unused = {
> @@ -645,7 +643,7 @@ MODULE_DEVICE_TABLE(acpi, synquacer_i2c_acpi_ids);
>
>  static struct platform_driver synquacer_i2c_driver = {
>         .probe  = synquacer_i2c_probe,
> -       .remove = synquacer_i2c_remove,
> +       .remove_new = synquacer_i2c_remove,
>         .driver = {
>                 .name = "synquacer_i2c",
>                 .of_match_table = of_match_ptr(synquacer_i2c_dt_ids),
> --
> 2.39.2
>

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [PATCH 19/89] i2c: digicolor: Convert to platform remove callback returning void
  2023-05-08 20:51 ` [PATCH 19/89] i2c: digicolor: " Uwe Kleine-König
@ 2023-05-09  3:15   ` Baruch Siach
  0 siblings, 0 replies; 140+ messages in thread
From: Baruch Siach @ 2023-05-09  3:15 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Wolfram Sang, Wolfram Sang, linux-i2c, linux-arm-kernel, kernel

Hi Uwe,

On Mon, May 08 2023, Uwe Kleine-König wrote:

> The .remove() callback for a platform driver returns an int which makes
> many driver authors wrongly assume it's possible to do error handling by
> returning an error code. However the value returned is (mostly) ignored
> and this typically results in resource leaks. To improve here there is a
> quest to make the remove callback return void. In the first step of this
> quest all drivers are converted to .remove_new() which already returns
> void.
>
> Trivially convert this driver from always returning zero in the remove
> callback to the void returning variant.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---

Acked-by: Baruch Siach <baruch@tkos.co.il>

Thanks,
baruch

>  drivers/i2c/busses/i2c-digicolor.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-digicolor.c b/drivers/i2c/busses/i2c-digicolor.c
> index 50925d97fa42..3462f2bc0fa8 100644
> --- a/drivers/i2c/busses/i2c-digicolor.c
> +++ b/drivers/i2c/busses/i2c-digicolor.c
> @@ -347,14 +347,12 @@ static int dc_i2c_probe(struct platform_device *pdev)
>  	return 0;
>  }
>  
> -static int dc_i2c_remove(struct platform_device *pdev)
> +static void dc_i2c_remove(struct platform_device *pdev)
>  {
>  	struct dc_i2c *i2c = platform_get_drvdata(pdev);
>  
>  	i2c_del_adapter(&i2c->adap);
>  	clk_disable_unprepare(i2c->clk);
> -
> -	return 0;
>  }
>  
>  static const struct of_device_id dc_i2c_match[] = {
> @@ -365,7 +363,7 @@ MODULE_DEVICE_TABLE(of, dc_i2c_match);
>  
>  static struct platform_driver dc_i2c_driver = {
>  	.probe   = dc_i2c_probe,
> -	.remove  = dc_i2c_remove,
> +	.remove_new = dc_i2c_remove,
>  	.driver  = {
>  		.name  = "digicolor-i2c",
>  		.of_match_table = dc_i2c_match,


-- 
                                                     ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch@tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [PATCH 04/89] i2c: at91-core: Convert to platform remove callback returning void
  2023-05-08 20:51 ` [PATCH 04/89] i2c: at91-core: " Uwe Kleine-König
@ 2023-05-09  4:42   ` Claudiu.Beznea
  0 siblings, 0 replies; 140+ messages in thread
From: Claudiu.Beznea @ 2023-05-09  4:42 UTC (permalink / raw)
  To: u.kleine-koenig, codrin.ciubotariu, Nicolas.Ferre,
	alexandre.belloni, wsa
  Cc: linux-i2c, linux-arm-kernel, kernel

On 08.05.2023 23:51, Uwe Kleine-König wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> The .remove() callback for a platform driver returns an int which makes
> many driver authors wrongly assume it's possible to do error handling by
> returning an error code. However the value returned is (mostly) ignored
> and this typically results in resource leaks. To improve here there is a
> quest to make the remove callback return void. In the first step of this
> quest all drivers are converted to .remove_new() which already returns
> void.
> 
> Trivially convert this driver from always returning zero in the remove
> callback to the void returning variant.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>


> ---
>  drivers/i2c/busses/i2c-at91-core.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/i2c/busses/i2c-at91-core.c b/drivers/i2c/busses/i2c-at91-core.c
> index 2df9df585131..05ad3bc3578a 100644
> --- a/drivers/i2c/busses/i2c-at91-core.c
> +++ b/drivers/i2c/busses/i2c-at91-core.c
> @@ -273,7 +273,7 @@ static int at91_twi_probe(struct platform_device *pdev)
>         return 0;
>  }
> 
> -static int at91_twi_remove(struct platform_device *pdev)
> +static void at91_twi_remove(struct platform_device *pdev)
>  {
>         struct at91_twi_dev *dev = platform_get_drvdata(pdev);
> 
> @@ -282,8 +282,6 @@ static int at91_twi_remove(struct platform_device *pdev)
> 
>         pm_runtime_disable(dev->dev);
>         pm_runtime_set_suspended(dev->dev);
> -
> -       return 0;
>  }
> 
>  static int __maybe_unused at91_twi_runtime_suspend(struct device *dev)
> @@ -342,7 +340,7 @@ static const struct dev_pm_ops __maybe_unused at91_twi_pm = {
> 
>  static struct platform_driver at91_twi_driver = {
>         .probe          = at91_twi_probe,
> -       .remove         = at91_twi_remove,
> +       .remove_new     = at91_twi_remove,
>         .id_table       = at91_twi_devtypes,
>         .driver         = {
>                 .name   = "at91_i2c",
> --
> 2.39.2
> 


^ permalink raw reply	[flat|nested] 140+ messages in thread

* RE: [PATCH 39/89] i2c: mlxcpld: Convert to platform remove callback returning void
  2023-05-08 20:52 ` [PATCH 39/89] i2c: mlxcpld: " Uwe Kleine-König
@ 2023-05-09  5:55   ` Vadim Pasternak
  0 siblings, 0 replies; 140+ messages in thread
From: Vadim Pasternak @ 2023-05-09  5:55 UTC (permalink / raw)
  To: Uwe Kleine-König, Michael Shych, Wolfram Sang; +Cc: linux-i2c, kernel



> -----Original Message-----
> From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> Sent: Monday, 8 May 2023 23:52
> To: Vadim Pasternak <vadimp@nvidia.com>; Michael Shych
> <michaelsh@nvidia.com>; Wolfram Sang <wsa@kernel.org>
> Cc: linux-i2c@vger.kernel.org; kernel@pengutronix.de
> Subject: [PATCH 39/89] i2c: mlxcpld: Convert to platform remove callback
> returning void
> 
> The .remove() callback for a platform driver returns an int which makes many
> driver authors wrongly assume it's possible to do error handling by returning
> an error code. However the value returned is (mostly) ignored and this
> typically results in resource leaks. To improve here there is a quest to make
> the remove callback return void. In the first step of this quest all drivers are
> converted to .remove_new() which already returns void.
> 
> Trivially convert this driver from always returning zero in the remove callback
> to the void returning variant.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>


Acked-by: Vadim Pasternak <vadimp@nvidia.com>
> ---
>  drivers/i2c/busses/i2c-mlxcpld.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/i2c/busses/i2c-mlxcpld.c b/drivers/i2c/busses/i2c-
> mlxcpld.c
> index 081f51ef0551..c42fd4b329e4 100644
> --- a/drivers/i2c/busses/i2c-mlxcpld.c
> +++ b/drivers/i2c/busses/i2c-mlxcpld.c
> @@ -571,19 +571,17 @@ static int mlxcpld_i2c_probe(struct
> platform_device *pdev)
>  	return err;
>  }
> 
> -static int mlxcpld_i2c_remove(struct platform_device *pdev)
> +static void mlxcpld_i2c_remove(struct platform_device *pdev)
>  {
>  	struct mlxcpld_i2c_priv *priv = platform_get_drvdata(pdev);
> 
>  	i2c_del_adapter(&priv->adap);
>  	mutex_destroy(&priv->lock);
> -
> -	return 0;
>  }
> 
>  static struct platform_driver mlxcpld_i2c_driver = {
>  	.probe		= mlxcpld_i2c_probe,
> -	.remove		= mlxcpld_i2c_remove,
> +	.remove_new	= mlxcpld_i2c_remove,
>  	.driver = {
>  		.name = MLXCPLD_I2C_DEVICE_NAME,
>  	},
> --
> 2.39.2


^ permalink raw reply	[flat|nested] 140+ messages in thread

* RE: [PATCH 87/89] i2c: mux: mlxcpld: Convert to platform remove callback returning void
  2023-05-08 20:53 ` [PATCH 87/89] i2c: mux: mlxcpld: " Uwe Kleine-König
@ 2023-05-09  5:55   ` Vadim Pasternak
  2023-05-09  6:11   ` Peter Rosin
  1 sibling, 0 replies; 140+ messages in thread
From: Vadim Pasternak @ 2023-05-09  5:55 UTC (permalink / raw)
  To: Uwe Kleine-König, Michael Shych, Peter Rosin, Wolfram Sang
  Cc: linux-i2c, kernel



> -----Original Message-----
> From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> Sent: Monday, 8 May 2023 23:53
> To: Vadim Pasternak <vadimp@nvidia.com>; Michael Shych
> <michaelsh@nvidia.com>; Peter Rosin <peda@axentia.se>; Wolfram Sang
> <wsa@kernel.org>
> Cc: linux-i2c@vger.kernel.org; kernel@pengutronix.de
> Subject: [PATCH 87/89] i2c: mux: mlxcpld: Convert to platform remove
> callback returning void
> 
> The .remove() callback for a platform driver returns an int which makes many
> driver authors wrongly assume it's possible to do error handling by returning
> an error code. However the value returned is (mostly) ignored and this
> typically results in resource leaks. To improve here there is a quest to make
> the remove callback return void. In the first step of this quest all drivers are
> converted to .remove_new() which already returns void.
> 
> Trivially convert this driver from always returning zero in the remove callback
> to the void returning variant.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Acked-by: Vadim Pasternak <vadimp@nvidia.com>
> ---
>  drivers/i2c/muxes/i2c-mux-mlxcpld.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/i2c/muxes/i2c-mux-mlxcpld.c b/drivers/i2c/muxes/i2c-
> mux-mlxcpld.c
> index 1a879f6a31ef..3dda00f1df78 100644
> --- a/drivers/i2c/muxes/i2c-mux-mlxcpld.c
> +++ b/drivers/i2c/muxes/i2c-mux-mlxcpld.c
> @@ -170,12 +170,11 @@ static int mlxcpld_mux_probe(struct
> platform_device *pdev)
>  	return err;
>  }
> 
> -static int mlxcpld_mux_remove(struct platform_device *pdev)
> +static void mlxcpld_mux_remove(struct platform_device *pdev)
>  {
>  	struct i2c_mux_core *muxc = platform_get_drvdata(pdev);
> 
>  	i2c_mux_del_adapters(muxc);
> -	return 0;
>  }
> 
>  static struct platform_driver mlxcpld_mux_driver = { @@ -183,7 +182,7 @@
> static struct platform_driver mlxcpld_mux_driver = {
>  		.name = "i2c-mux-mlxcpld",
>  	},
>  	.probe = mlxcpld_mux_probe,
> -	.remove = mlxcpld_mux_remove,
> +	.remove_new = mlxcpld_mux_remove,
>  };
> 
>  module_platform_driver(mlxcpld_mux_driver);
> --
> 2.39.2


^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [PATCH 48/89] i2c: omap: Convert to platform remove callback returning void
  2023-05-08 20:52 ` [PATCH 48/89] i2c: omap: " Uwe Kleine-König
@ 2023-05-09  6:02   ` Vignesh Raghavendra
  0 siblings, 0 replies; 140+ messages in thread
From: Vignesh Raghavendra @ 2023-05-09  6:02 UTC (permalink / raw)
  To: Uwe Kleine-König, Tony Lindgren, Aaro Koskinen,
	Janusz Krzysztofik, Wolfram Sang
  Cc: linux-omap, linux-i2c, kernel



On 09/05/23 02:22, Uwe Kleine-König wrote:
> The .remove() callback for a platform driver returns an int which makes
> many driver authors wrongly assume it's possible to do error handling by
> returning an error code. However the value returned is (mostly) ignored
> and this typically results in resource leaks. To improve here there is a
> quest to make the remove callback return void. In the first step of this
> quest all drivers are converted to .remove_new() which already returns
> void.
> 
> Trivially convert this driver from always returning zero in the remove
> callback to the void returning variant.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
>  drivers/i2c/busses/i2c-omap.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
> index 4199f57a6bf2..58fd6fa3edf1 100644
> --- a/drivers/i2c/busses/i2c-omap.c
> +++ b/drivers/i2c/busses/i2c-omap.c
> @@ -1519,7 +1519,7 @@ omap_i2c_probe(struct platform_device *pdev)
>  	return r;
>  }
>  
> -static int omap_i2c_remove(struct platform_device *pdev)
> +static void omap_i2c_remove(struct platform_device *pdev)
>  {
>  	struct omap_i2c_dev	*omap = platform_get_drvdata(pdev);
>  	int ret;
> @@ -1535,8 +1535,6 @@ static int omap_i2c_remove(struct platform_device *pdev)
>  	pm_runtime_dont_use_autosuspend(&pdev->dev);
>  	pm_runtime_put_sync(&pdev->dev);
>  	pm_runtime_disable(&pdev->dev);
> -
> -	return 0;
>  }
>  
>  static int __maybe_unused omap_i2c_runtime_suspend(struct device *dev)
> @@ -1588,7 +1586,7 @@ static const struct dev_pm_ops omap_i2c_pm_ops = {
>  
>  static struct platform_driver omap_i2c_driver = {
>  	.probe		= omap_i2c_probe,
> -	.remove		= omap_i2c_remove,
> +	.remove_new	= omap_i2c_remove,
>  	.driver		= {
>  		.name	= "omap_i2c",
>  		.pm	= &omap_i2c_pm_ops,


Reviewed-by: Vignesh Raghavendra <vigneshr@ti.com>


-- 
Regards
Vignesh

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [PATCH 83/89] i2c: mux: arb-gpio-challenge: Convert to platform remove callback returning void
  2023-05-08 20:53 ` [PATCH 83/89] i2c: mux: arb-gpio-challenge: " Uwe Kleine-König
@ 2023-05-09  6:09   ` Peter Rosin
  0 siblings, 0 replies; 140+ messages in thread
From: Peter Rosin @ 2023-05-09  6:09 UTC (permalink / raw)
  To: Uwe Kleine-König, Wolfram Sang; +Cc: linux-i2c, kernel

2023-05-08 at 22:53, Uwe Kleine-König wrote:
> The .remove() callback for a platform driver returns an int which makes
> many driver authors wrongly assume it's possible to do error handling by
> returning an error code. However the value returned is (mostly) ignored
> and this typically results in resource leaks. To improve here there is a
> quest to make the remove callback return void. In the first step of this
> quest all drivers are converted to .remove_new() which already returns
> void.
> 
> Trivially convert this driver from always returning zero in the remove
> callback to the void returning variant.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Acked-by: Peter Rosin <peda@axentia.se>

Cheers,
Peter

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [PATCH 84/89] i2c: mux: demux-pinctrl: Convert to platform remove callback returning void
  2023-05-08 20:53 ` [PATCH 84/89] i2c: mux: demux-pinctrl: " Uwe Kleine-König
@ 2023-05-09  6:10   ` Peter Rosin
  0 siblings, 0 replies; 140+ messages in thread
From: Peter Rosin @ 2023-05-09  6:10 UTC (permalink / raw)
  To: Uwe Kleine-König, Wolfram Sang, Wolfram Sang; +Cc: linux-i2c, kernel

2023-05-08 at 22:53, Uwe Kleine-König wrote:
> The .remove() callback for a platform driver returns an int which makes
> many driver authors wrongly assume it's possible to do error handling by
> returning an error code. However the value returned is (mostly) ignored
> and this typically results in resource leaks. To improve here there is a
> quest to make the remove callback return void. In the first step of this
> quest all drivers are converted to .remove_new() which already returns
> void.
> 
> Trivially convert this driver from always returning zero in the remove
> callback to the void returning variant.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Acked-by: Peter Rosin <peda@axentia.se>

Cheers,
Peter


^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [PATCH 85/89] i2c: mux: gpio: Convert to platform remove callback returning void
  2023-05-08 20:53 ` [PATCH 85/89] i2c: mux: gpio: " Uwe Kleine-König
@ 2023-05-09  6:10   ` Peter Rosin
  0 siblings, 0 replies; 140+ messages in thread
From: Peter Rosin @ 2023-05-09  6:10 UTC (permalink / raw)
  To: Uwe Kleine-König, Peter Korsgaard, Wolfram Sang; +Cc: linux-i2c, kernel

2023-05-08 at 22:53, Uwe Kleine-König wrote:
> The .remove() callback for a platform driver returns an int which makes
> many driver authors wrongly assume it's possible to do error handling by
> returning an error code. However the value returned is (mostly) ignored
> and this typically results in resource leaks. To improve here there is a
> quest to make the remove callback return void. In the first step of this
> quest all drivers are converted to .remove_new() which already returns
> void.
> 
> Trivially convert this driver from always returning zero in the remove
> callback to the void returning variant.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Acked-by: Peter Rosin <peda@axentia.se>

Cheers,
Peter

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [PATCH 86/89] i2c: mux: gpmux: Convert to platform remove callback returning void
  2023-05-08 20:53 ` [PATCH 86/89] i2c: mux: gpmux: " Uwe Kleine-König
@ 2023-05-09  6:10   ` Peter Rosin
  0 siblings, 0 replies; 140+ messages in thread
From: Peter Rosin @ 2023-05-09  6:10 UTC (permalink / raw)
  To: Uwe Kleine-König, Wolfram Sang; +Cc: linux-i2c, kernel

2023-05-08 at 22:53, Uwe Kleine-König wrote:
> The .remove() callback for a platform driver returns an int which makes
> many driver authors wrongly assume it's possible to do error handling by
> returning an error code. However the value returned is (mostly) ignored
> and this typically results in resource leaks. To improve here there is a
> quest to make the remove callback return void. In the first step of this
> quest all drivers are converted to .remove_new() which already returns
> void.
> 
> Trivially convert this driver from always returning zero in the remove
> callback to the void returning variant.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Acked-by: Peter Rosin <peda@axentia.se>

Cheers,
Peter


^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [PATCH 87/89] i2c: mux: mlxcpld: Convert to platform remove callback returning void
  2023-05-08 20:53 ` [PATCH 87/89] i2c: mux: mlxcpld: " Uwe Kleine-König
  2023-05-09  5:55   ` Vadim Pasternak
@ 2023-05-09  6:11   ` Peter Rosin
  1 sibling, 0 replies; 140+ messages in thread
From: Peter Rosin @ 2023-05-09  6:11 UTC (permalink / raw)
  To: Uwe Kleine-König, Vadim Pasternak, Michael Shych, Wolfram Sang
  Cc: linux-i2c, kernel

2023-05-08 at 22:53, Uwe Kleine-König wrote:
> The .remove() callback for a platform driver returns an int which makes
> many driver authors wrongly assume it's possible to do error handling by
> returning an error code. However the value returned is (mostly) ignored
> and this typically results in resource leaks. To improve here there is a
> quest to make the remove callback return void. In the first step of this
> quest all drivers are converted to .remove_new() which already returns
> void.
> 
> Trivially convert this driver from always returning zero in the remove
> callback to the void returning variant.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Acked-by: Peter Rosin <peda@axentia.se>

Cheers,
Peter


^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [PATCH 88/89] i2c: mux: pinctrl: Convert to platform remove callback returning void
  2023-05-08 20:53 ` [PATCH 88/89] i2c: mux: pinctrl: " Uwe Kleine-König
@ 2023-05-09  6:11   ` Peter Rosin
  0 siblings, 0 replies; 140+ messages in thread
From: Peter Rosin @ 2023-05-09  6:11 UTC (permalink / raw)
  To: Uwe Kleine-König, Wolfram Sang; +Cc: linux-i2c, kernel

2023-05-08 at 22:53, Uwe Kleine-König wrote:
> The .remove() callback for a platform driver returns an int which makes
> many driver authors wrongly assume it's possible to do error handling by
> returning an error code. However the value returned is (mostly) ignored
> and this typically results in resource leaks. To improve here there is a
> quest to make the remove callback return void. In the first step of this
> quest all drivers are converted to .remove_new() which already returns
> void.
> 
> Trivially convert this driver from always returning zero in the remove
> callback to the void returning variant.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Acked-by: Peter Rosin <peda@axentia.se>

Cheers,
Peter


^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [PATCH 89/89] i2c: mux: reg: Convert to platform remove callback returning void
  2023-05-08 20:53 ` [PATCH 89/89] i2c: mux: reg: " Uwe Kleine-König
@ 2023-05-09  6:11   ` Peter Rosin
  0 siblings, 0 replies; 140+ messages in thread
From: Peter Rosin @ 2023-05-09  6:11 UTC (permalink / raw)
  To: Uwe Kleine-König, Wolfram Sang; +Cc: linux-i2c, kernel

2023-05-08 at 22:53, Uwe Kleine-König wrote:
> The .remove() callback for a platform driver returns an int which makes
> many driver authors wrongly assume it's possible to do error handling by
> returning an error code. However the value returned is (mostly) ignored
> and this typically results in resource leaks. To improve here there is a
> quest to make the remove callback return void. In the first step of this
> quest all drivers are converted to .remove_new() which already returns
> void.
> 
> Trivially convert this driver from always returning zero in the remove
> callback to the void returning variant.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Acked-by: Peter Rosin <peda@axentia.se>

Cheers,
Peter


^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [PATCH 68/89] i2c: st: Convert to platform remove callback returning void
  2023-05-08 20:52 ` [PATCH 68/89] i2c: st: " Uwe Kleine-König
@ 2023-05-09  6:21   ` Patrice CHOTARD
  0 siblings, 0 replies; 140+ messages in thread
From: Patrice CHOTARD @ 2023-05-09  6:21 UTC (permalink / raw)
  To: Uwe Kleine-König, Wolfram Sang; +Cc: linux-arm-kernel, linux-i2c, kernel

Hi Uwe

On 5/8/23 22:52, Uwe Kleine-König wrote:
> The .remove() callback for a platform driver returns an int which makes
> many driver authors wrongly assume it's possible to do error handling by
> returning an error code. However the value returned is (mostly) ignored
> and this typically results in resource leaks. To improve here there is a
> quest to make the remove callback return void. In the first step of this
> quest all drivers are converted to .remove_new() which already returns
> void.
> 
> Trivially convert this driver from always returning zero in the remove
> callback to the void returning variant.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
>  drivers/i2c/busses/i2c-st.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/i2c/busses/i2c-st.c b/drivers/i2c/busses/i2c-st.c
> index f823913b75a6..25c3521cae0e 100644
> --- a/drivers/i2c/busses/i2c-st.c
> +++ b/drivers/i2c/busses/i2c-st.c
> @@ -876,13 +876,11 @@ static int st_i2c_probe(struct platform_device *pdev)
>  	return 0;
>  }
>  
> -static int st_i2c_remove(struct platform_device *pdev)
> +static void st_i2c_remove(struct platform_device *pdev)
>  {
>  	struct st_i2c_dev *i2c_dev = platform_get_drvdata(pdev);
>  
>  	i2c_del_adapter(&i2c_dev->adap);
> -
> -	return 0;
>  }
>  
>  static const struct of_device_id st_i2c_match[] = {
> @@ -899,7 +897,7 @@ static struct platform_driver st_i2c_driver = {
>  		.pm = pm_sleep_ptr(&st_i2c_pm),
>  	},
>  	.probe = st_i2c_probe,
> -	.remove = st_i2c_remove,
> +	.remove_new = st_i2c_remove,
>  };
>  
>  module_platform_driver(st_i2c_driver);

Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>

Thanks
Patrice

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [PATCH 45/89] i2c: npcm7xx: Convert to platform remove callback returning void
  2023-05-08 20:52 ` [PATCH 45/89] i2c: npcm7xx: " Uwe Kleine-König
@ 2023-05-09  6:32   ` Tali Perry
  0 siblings, 0 replies; 140+ messages in thread
From: Tali Perry @ 2023-05-09  6:32 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Avi Fishman, Tomer Maimon, Wolfram Sang, Patrick Venture,
	Nancy Yuen, Benjamin Fair, openbmc, linux-i2c, kernel

Thanks!

Reviewed-by: Tali Perry <tali.perry@nuvoton.com>


On Mon, May 8, 2023 at 11:53 PM Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> wrote:
>
> The .remove() callback for a platform driver returns an int which makes
> many driver authors wrongly assume it's possible to do error handling by
> returning an error code. However the value returned is (mostly) ignored
> and this typically results in resource leaks. To improve here there is a
> quest to make the remove callback return void. In the first step of this
> quest all drivers are converted to .remove_new() which already returns
> void.
>
> Trivially convert this driver from always returning zero in the remove
> callback to the void returning variant.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
>  drivers/i2c/busses/i2c-npcm7xx.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-npcm7xx.c b/drivers/i2c/busses/i2c-npcm7xx.c
> index 38d5864d0cb5..53b65ffb6a64 100644
> --- a/drivers/i2c/busses/i2c-npcm7xx.c
> +++ b/drivers/i2c/busses/i2c-npcm7xx.c
> @@ -2361,7 +2361,7 @@ static int npcm_i2c_probe_bus(struct platform_device *pdev)
>         return 0;
>  }
>
> -static int npcm_i2c_remove_bus(struct platform_device *pdev)
> +static void npcm_i2c_remove_bus(struct platform_device *pdev)
>  {
>         unsigned long lock_flags;
>         struct npcm_i2c *bus = platform_get_drvdata(pdev);
> @@ -2371,7 +2371,6 @@ static int npcm_i2c_remove_bus(struct platform_device *pdev)
>         npcm_i2c_disable(bus);
>         spin_unlock_irqrestore(&bus->lock, lock_flags);
>         i2c_del_adapter(&bus->adap);
> -       return 0;
>  }
>
>  static const struct of_device_id npcm_i2c_bus_of_table[] = {
> @@ -2383,7 +2382,7 @@ MODULE_DEVICE_TABLE(of, npcm_i2c_bus_of_table);
>
>  static struct platform_driver npcm_i2c_bus_driver = {
>         .probe = npcm_i2c_probe_bus,
> -       .remove = npcm_i2c_remove_bus,
> +       .remove_new = npcm_i2c_remove_bus,
>         .driver = {
>                 .name = "nuvoton-i2c",
>                 .of_match_table = npcm_i2c_bus_of_table,
> --
> 2.39.2
>

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [PATCH 21/89] i2c: emev2: Convert to platform remove callback returning void
  2023-05-08 20:51 ` [PATCH 21/89] i2c: emev2: " Uwe Kleine-König
@ 2023-05-09  7:01   ` Geert Uytterhoeven
  0 siblings, 0 replies; 140+ messages in thread
From: Geert Uytterhoeven @ 2023-05-09  7:01 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Wolfram Sang, Wolfram Sang, linux-renesas-soc, linux-i2c, kernel

On Mon, May 8, 2023 at 10:53 PM Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> wrote:
> The .remove() callback for a platform driver returns an int which makes
> many driver authors wrongly assume it's possible to do error handling by
> returning an error code. However the value returned is (mostly) ignored
> and this typically results in resource leaks. To improve here there is a
> quest to make the remove callback return void. In the first step of this
> quest all drivers are converted to .remove_new() which already returns
> void.
>
> Trivially convert this driver from always returning zero in the remove
> callback to the void returning variant.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [PATCH 58/89] i2c: rcar: Convert to platform remove callback returning void
  2023-05-08 20:52 ` [PATCH 58/89] i2c: rcar: " Uwe Kleine-König
@ 2023-05-09  7:01   ` Geert Uytterhoeven
  0 siblings, 0 replies; 140+ messages in thread
From: Geert Uytterhoeven @ 2023-05-09  7:01 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Wolfram Sang, Wolfram Sang, linux-renesas-soc, linux-i2c, kernel

On Mon, May 8, 2023 at 10:54 PM Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> wrote:
> The .remove() callback for a platform driver returns an int which makes
> many driver authors wrongly assume it's possible to do error handling by
> returning an error code. However the value returned is (mostly) ignored
> and this typically results in resource leaks. To improve here there is a
> quest to make the remove callback return void. In the first step of this
> quest all drivers are converted to .remove_new() which already returns
> void.
>
> Trivially convert this driver from always returning zero in the remove
> callback to the void returning variant.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [PATCH 59/89] i2c: riic: Convert to platform remove callback returning void
  2023-05-08 20:52 ` [PATCH 59/89] i2c: riic: " Uwe Kleine-König
@ 2023-05-09  7:02   ` Geert Uytterhoeven
  0 siblings, 0 replies; 140+ messages in thread
From: Geert Uytterhoeven @ 2023-05-09  7:02 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Chris Brandt, Wolfram Sang, linux-renesas-soc, linux-i2c, kernel

On Mon, May 8, 2023 at 10:54 PM Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> wrote:
> The .remove() callback for a platform driver returns an int which makes
> many driver authors wrongly assume it's possible to do error handling by
> returning an error code. However the value returned is (mostly) ignored
> and this typically results in resource leaks. To improve here there is a
> quest to make the remove callback return void. In the first step of this
> quest all drivers are converted to .remove_new() which already returns
> void.
>
> Trivially convert this driver from always returning zero in the remove
> callback to the void returning variant.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [PATCH 66/89] i2c: sh_mobile: Convert to platform remove callback returning void
  2023-05-08 20:52 ` [PATCH 66/89] i2c: sh_mobile: " Uwe Kleine-König
@ 2023-05-09  7:02   ` Geert Uytterhoeven
  0 siblings, 0 replies; 140+ messages in thread
From: Geert Uytterhoeven @ 2023-05-09  7:02 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Wolfram Sang, Wolfram Sang, linux-renesas-soc, linux-i2c, kernel

On Mon, May 8, 2023 at 10:54 PM Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> wrote:
> The .remove() callback for a platform driver returns an int which makes
> many driver authors wrongly assume it's possible to do error handling by
> returning an error code. However the value returned is (mostly) ignored
> and this typically results in resource leaks. To improve here there is a
> quest to make the remove callback return void. In the first step of this
> quest all drivers are converted to .remove_new() which already returns
> void.
>
> Trivially convert this driver from always returning zero in the remove
> callback to the void returning variant.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [PATCH 77/89] i2c: versatile: Convert to platform remove callback returning void
  2023-05-08 20:52 ` [PATCH 77/89] i2c: versatile: " Uwe Kleine-König
@ 2023-05-09  7:07   ` Linus Walleij
  0 siblings, 0 replies; 140+ messages in thread
From: Linus Walleij @ 2023-05-09  7:07 UTC (permalink / raw)
  To: Uwe Kleine-König; +Cc: Wolfram Sang, linux-arm-kernel, linux-i2c, kernel

On Mon, May 8, 2023 at 10:53 PM Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> wrote:

> The .remove() callback for a platform driver returns an int which makes
> many driver authors wrongly assume it's possible to do error handling by
> returning an error code. However the value returned is (mostly) ignored
> and this typically results in resource leaks. To improve here there is a
> quest to make the remove callback return void. In the first step of this
> quest all drivers are converted to .remove_new() which already returns
> void.
>
> Trivially convert this driver from always returning zero in the remove
> callback to the void returning variant.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [PATCH 69/89] i2c: stm32f4: Convert to platform remove callback returning void
  2023-05-08 20:52 ` [PATCH 69/89] i2c: stm32f4: " Uwe Kleine-König
@ 2023-05-09  7:24   ` Alain Volmat
  0 siblings, 0 replies; 140+ messages in thread
From: Alain Volmat @ 2023-05-09  7:24 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Pierre-Yves MORDRET, Maxime Coquelin, Alexandre Torgue,
	Wolfram Sang, linux-i2c, linux-stm32, linux-arm-kernel, kernel

Hi,

Acked-by: Alain Volmat <alain.volmat@foss.st.com>

Regards,
Alain

On Mon, May 08, 2023 at 10:52:46PM +0200, Uwe Kleine-König wrote:
> The .remove() callback for a platform driver returns an int which makes
> many driver authors wrongly assume it's possible to do error handling by
> returning an error code. However the value returned is (mostly) ignored
> and this typically results in resource leaks. To improve here there is a
> quest to make the remove callback return void. In the first step of this
> quest all drivers are converted to .remove_new() which already returns
> void.
> 
> Trivially convert this driver from always returning zero in the remove
> callback to the void returning variant.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
>  drivers/i2c/busses/i2c-stm32f4.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/i2c/busses/i2c-stm32f4.c b/drivers/i2c/busses/i2c-stm32f4.c
> index eebce7ecef25..6ad06a5a22b4 100644
> --- a/drivers/i2c/busses/i2c-stm32f4.c
> +++ b/drivers/i2c/busses/i2c-stm32f4.c
> @@ -861,15 +861,13 @@ static int stm32f4_i2c_probe(struct platform_device *pdev)
>  	return ret;
>  }
>  
> -static int stm32f4_i2c_remove(struct platform_device *pdev)
> +static void stm32f4_i2c_remove(struct platform_device *pdev)
>  {
>  	struct stm32f4_i2c_dev *i2c_dev = platform_get_drvdata(pdev);
>  
>  	i2c_del_adapter(&i2c_dev->adap);
>  
>  	clk_unprepare(i2c_dev->clk);
> -
> -	return 0;
>  }
>  
>  static const struct of_device_id stm32f4_i2c_match[] = {
> @@ -884,7 +882,7 @@ static struct platform_driver stm32f4_i2c_driver = {
>  		.of_match_table = stm32f4_i2c_match,
>  	},
>  	.probe = stm32f4_i2c_probe,
> -	.remove = stm32f4_i2c_remove,
> +	.remove_new = stm32f4_i2c_remove,
>  };
>  
>  module_platform_driver(stm32f4_i2c_driver);
> -- 
> 2.39.2
> 

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [PATCH 70/89] i2c: stm32f7: Convert to platform remove callback returning void
  2023-05-08 20:52 ` [PATCH 70/89] i2c: stm32f7: " Uwe Kleine-König
@ 2023-05-09  7:25   ` Alain Volmat
  0 siblings, 0 replies; 140+ messages in thread
From: Alain Volmat @ 2023-05-09  7:25 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Pierre-Yves MORDRET, Maxime Coquelin, Alexandre Torgue,
	Wolfram Sang, linux-i2c, linux-stm32, linux-arm-kernel, kernel

Hi,

Acked-by: Alain Volmat <alain.volmat@foss.st.com>

Regards,
Alain

On Mon, May 08, 2023 at 10:52:47PM +0200, Uwe Kleine-König wrote:
> The .remove() callback for a platform driver returns an int which makes
> many driver authors wrongly assume it's possible to do error handling by
> returning an error code. However the value returned is (mostly) ignored
> and this typically results in resource leaks. To improve here there is a
> quest to make the remove callback return void. In the first step of this
> quest all drivers are converted to .remove_new() which already returns
> void.
> 
> Trivially convert this driver from always returning zero in the remove
> callback to the void returning variant.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
>  drivers/i2c/busses/i2c-stm32f7.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/i2c/busses/i2c-stm32f7.c b/drivers/i2c/busses/i2c-stm32f7.c
> index d1c59d83a65b..e897d9101434 100644
> --- a/drivers/i2c/busses/i2c-stm32f7.c
> +++ b/drivers/i2c/busses/i2c-stm32f7.c
> @@ -2309,7 +2309,7 @@ static int stm32f7_i2c_probe(struct platform_device *pdev)
>  	return ret;
>  }
>  
> -static int stm32f7_i2c_remove(struct platform_device *pdev)
> +static void stm32f7_i2c_remove(struct platform_device *pdev)
>  {
>  	struct stm32f7_i2c_dev *i2c_dev = platform_get_drvdata(pdev);
>  
> @@ -2341,8 +2341,6 @@ static int stm32f7_i2c_remove(struct platform_device *pdev)
>  	stm32f7_i2c_write_fm_plus_bits(i2c_dev, false);
>  
>  	clk_disable_unprepare(i2c_dev->clk);
> -
> -	return 0;
>  }
>  
>  static int __maybe_unused stm32f7_i2c_runtime_suspend(struct device *dev)
> @@ -2486,7 +2484,7 @@ static struct platform_driver stm32f7_i2c_driver = {
>  		.pm = &stm32f7_i2c_pm_ops,
>  	},
>  	.probe = stm32f7_i2c_probe,
> -	.remove = stm32f7_i2c_remove,
> +	.remove_new = stm32f7_i2c_remove,
>  };
>  
>  module_platform_driver(stm32f7_i2c_driver);
> -- 
> 2.39.2
> 

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [PATCH 34/89] i2c: kempld: Convert to platform remove callback returning void
  2023-05-08 20:52 ` [PATCH 34/89] i2c: kempld: " Uwe Kleine-König
@ 2023-05-09  7:52   ` Chris Pringle
  0 siblings, 0 replies; 140+ messages in thread
From: Chris Pringle @ 2023-05-09  7:52 UTC (permalink / raw)
  To: Uwe Kleine-König, Wolfram Sang; +Cc: linux-i2c, kernel

On Monday, May 8, 2023 9:52 PM Uwe Kleine-König <u.kleine-koenig@pengutronix.de> wrote: 
> The .remove() callback for a platform driver returns an int which makes many
> driver authors wrongly assume it's possible to do error handling by returning
> an error code. However the value returned is (mostly) ignored and this
> typically results in resource leaks. To improve here there is a quest to make the
> remove callback return void. In the first step of this quest all drivers are
> converted to .remove_new() which already returns void.
> 
> Trivially convert this driver from always returning zero in the remove callback
> to the void returning variant.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Reviewed-by: Chris Pringle <chris.pringle@phabrix.com>

Thanks,
Chris

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [PATCH 13/89] i2c: cht-wc: Convert to platform remove callback returning void
  2023-05-08 20:51 ` [PATCH 13/89] i2c: cht-wc: " Uwe Kleine-König
@ 2023-05-09  8:13   ` Hans de Goede
  0 siblings, 0 replies; 140+ messages in thread
From: Hans de Goede @ 2023-05-09  8:13 UTC (permalink / raw)
  To: Uwe Kleine-König, Wolfram Sang; +Cc: linux-i2c, kernel

Hi,

On 5/8/23 22:51, Uwe Kleine-König wrote:
> The .remove() callback for a platform driver returns an int which makes
> many driver authors wrongly assume it's possible to do error handling by
> returning an error code. However the value returned is (mostly) ignored
> and this typically results in resource leaks. To improve here there is a
> quest to make the remove callback return void. In the first step of this
> quest all drivers are converted to .remove_new() which already returns
> void.
> 
> Trivially convert this driver from always returning zero in the remove
> callback to the void returning variant.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Thanks, patch looks good to me:

Reviewed-by: Hans de Goede <hdegoede@redhat.com>

Regards,

Hans


> ---
>  drivers/i2c/busses/i2c-cht-wc.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/i2c/busses/i2c-cht-wc.c b/drivers/i2c/busses/i2c-cht-wc.c
> index 2b2c3d090089..0209933b9a84 100644
> --- a/drivers/i2c/busses/i2c-cht-wc.c
> +++ b/drivers/i2c/busses/i2c-cht-wc.c
> @@ -529,15 +529,13 @@ static int cht_wc_i2c_adap_i2c_probe(struct platform_device *pdev)
>  	return ret;
>  }
>  
> -static int cht_wc_i2c_adap_i2c_remove(struct platform_device *pdev)
> +static void cht_wc_i2c_adap_i2c_remove(struct platform_device *pdev)
>  {
>  	struct cht_wc_i2c_adap *adap = platform_get_drvdata(pdev);
>  
>  	i2c_unregister_device(adap->client);
>  	i2c_del_adapter(&adap->adapter);
>  	irq_domain_remove(adap->irq_domain);
> -
> -	return 0;
>  }
>  
>  static const struct platform_device_id cht_wc_i2c_adap_id_table[] = {
> @@ -548,7 +546,7 @@ MODULE_DEVICE_TABLE(platform, cht_wc_i2c_adap_id_table);
>  
>  static struct platform_driver cht_wc_i2c_adap_driver = {
>  	.probe = cht_wc_i2c_adap_i2c_probe,
> -	.remove = cht_wc_i2c_adap_i2c_remove,
> +	.remove_new = cht_wc_i2c_adap_i2c_remove,
>  	.driver = {
>  		.name = "cht_wcove_ext_chgr",
>  	},


^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [PATCH 56/89] i2c: qcom-geni: Convert to platform remove callback returning void
  2023-05-08 20:52 ` [PATCH 56/89] i2c: qcom-geni: " Uwe Kleine-König
@ 2023-05-09  8:46   ` Konrad Dybcio
  0 siblings, 0 replies; 140+ messages in thread
From: Konrad Dybcio @ 2023-05-09  8:46 UTC (permalink / raw)
  To: Uwe Kleine-König, Andy Gross, Bjorn Andersson, Wolfram Sang
  Cc: linux-arm-msm, linux-i2c, kernel



On 8.05.2023 22:52, Uwe Kleine-König wrote:
> The .remove() callback for a platform driver returns an int which makes
> many driver authors wrongly assume it's possible to do error handling by
> returning an error code. However the value returned is (mostly) ignored
> and this typically results in resource leaks. To improve here there is a
> quest to make the remove callback return void. In the first step of this
> quest all drivers are converted to .remove_new() which already returns
> void.
> 
> Trivially convert this driver from always returning zero in the remove
> callback to the void returning variant.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>

Konrad
>  drivers/i2c/busses/i2c-qcom-geni.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/i2c/busses/i2c-qcom-geni.c b/drivers/i2c/busses/i2c-qcom-geni.c
> index 83909b02a03e..b670a67c4fdd 100644
> --- a/drivers/i2c/busses/i2c-qcom-geni.c
> +++ b/drivers/i2c/busses/i2c-qcom-geni.c
> @@ -936,14 +936,13 @@ static int geni_i2c_probe(struct platform_device *pdev)
>  	return ret;
>  }
>  
> -static int geni_i2c_remove(struct platform_device *pdev)
> +static void geni_i2c_remove(struct platform_device *pdev)
>  {
>  	struct geni_i2c_dev *gi2c = platform_get_drvdata(pdev);
>  
>  	i2c_del_adapter(&gi2c->adap);
>  	release_gpi_dma(gi2c);
>  	pm_runtime_disable(gi2c->se.dev);
> -	return 0;
>  }
>  
>  static void geni_i2c_shutdown(struct platform_device *pdev)
> @@ -1041,7 +1040,7 @@ MODULE_DEVICE_TABLE(of, geni_i2c_dt_match);
>  
>  static struct platform_driver geni_i2c_driver = {
>  	.probe  = geni_i2c_probe,
> -	.remove = geni_i2c_remove,
> +	.remove_new = geni_i2c_remove,
>  	.shutdown = geni_i2c_shutdown,
>  	.driver = {
>  		.name = "geni_i2c",

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [PATCH 57/89] i2c: qup: Convert to platform remove callback returning void
  2023-05-08 20:52 ` [PATCH 57/89] i2c: qup: " Uwe Kleine-König
@ 2023-05-09  8:47   ` Konrad Dybcio
  0 siblings, 0 replies; 140+ messages in thread
From: Konrad Dybcio @ 2023-05-09  8:47 UTC (permalink / raw)
  To: Uwe Kleine-König, Andy Gross, Bjorn Andersson, Wolfram Sang
  Cc: linux-arm-msm, linux-i2c, kernel



On 8.05.2023 22:52, Uwe Kleine-König wrote:
> The .remove() callback for a platform driver returns an int which makes
> many driver authors wrongly assume it's possible to do error handling by
> returning an error code. However the value returned is (mostly) ignored
> and this typically results in resource leaks. To improve here there is a
> quest to make the remove callback return void. In the first step of this
> quest all drivers are converted to .remove_new() which already returns
> void.
> 
> Trivially convert this driver from always returning zero in the remove
> callback to the void returning variant.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>

Konrad
>  drivers/i2c/busses/i2c-qup.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/i2c/busses/i2c-qup.c b/drivers/i2c/busses/i2c-qup.c
> index 2e153f2f71b6..6eef1dbd00de 100644
> --- a/drivers/i2c/busses/i2c-qup.c
> +++ b/drivers/i2c/busses/i2c-qup.c
> @@ -1904,7 +1904,7 @@ static int qup_i2c_probe(struct platform_device *pdev)
>  	return ret;
>  }
>  
> -static int qup_i2c_remove(struct platform_device *pdev)
> +static void qup_i2c_remove(struct platform_device *pdev)
>  {
>  	struct qup_i2c_dev *qup = platform_get_drvdata(pdev);
>  
> @@ -1918,7 +1918,6 @@ static int qup_i2c_remove(struct platform_device *pdev)
>  	i2c_del_adapter(&qup->adap);
>  	pm_runtime_disable(qup->dev);
>  	pm_runtime_set_suspended(qup->dev);
> -	return 0;
>  }
>  
>  #ifdef CONFIG_PM
> @@ -1978,7 +1977,7 @@ MODULE_DEVICE_TABLE(of, qup_i2c_dt_match);
>  
>  static struct platform_driver qup_i2c_driver = {
>  	.probe  = qup_i2c_probe,
> -	.remove = qup_i2c_remove,
> +	.remove_new = qup_i2c_remove,
>  	.driver = {
>  		.name = "i2c_qup",
>  		.pm = &qup_i2c_qup_pm_ops,

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [PATCH 32/89] i2c: isch: Convert to platform remove callback returning void
  2023-05-08 20:52 ` [PATCH 32/89] i2c: isch: " Uwe Kleine-König
@ 2023-05-09 11:04   ` Jean Delvare
  0 siblings, 0 replies; 140+ messages in thread
From: Jean Delvare @ 2023-05-09 11:04 UTC (permalink / raw)
  To: Uwe Kleine-König; +Cc: Wolfram Sang, linux-i2c, kernel

On Mon, 08 May 2023 22:52:09 +0200, Uwe Kleine-König wrote:
> The .remove() callback for a platform driver returns an int which makes
> many driver authors wrongly assume it's possible to do error handling by
> returning an error code. However the value returned is (mostly) ignored
> and this typically results in resource leaks. To improve here there is a
> quest to make the remove callback return void. In the first step of this
> quest all drivers are converted to .remove_new() which already returns
> void.
> 
> Trivially convert this driver from always returning zero in the remove
> callback to the void returning variant.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
>  drivers/i2c/busses/i2c-isch.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/i2c/busses/i2c-isch.c b/drivers/i2c/busses/i2c-isch.c
> index 2dc7ada06ac5..1dc1ceaa4443 100644
> --- a/drivers/i2c/busses/i2c-isch.c
> +++ b/drivers/i2c/busses/i2c-isch.c
> @@ -286,14 +286,12 @@ static int smbus_sch_probe(struct platform_device *dev)
>  	return retval;
>  }
>  
> -static int smbus_sch_remove(struct platform_device *pdev)
> +static void smbus_sch_remove(struct platform_device *pdev)
>  {
>  	if (sch_smba) {
>  		i2c_del_adapter(&sch_adapter);
>  		sch_smba = 0;
>  	}
> -
> -	return 0;
>  }
>  
>  static struct platform_driver smbus_sch_driver = {
> @@ -301,7 +299,7 @@ static struct platform_driver smbus_sch_driver = {
>  		.name = "isch_smbus",
>  	},
>  	.probe		= smbus_sch_probe,
> -	.remove		= smbus_sch_remove,
> +	.remove_new	= smbus_sch_remove,
>  };
>  
>  module_platform_driver(smbus_sch_driver);

Reviewed-by: Jean Delvare <jdelvare@suse.de>

-- 
Jean Delvare
SUSE L3 Support

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [PATCH 22/89] i2c: exynos5: Convert to platform remove callback returning void
  2023-05-08 20:51 ` [PATCH 22/89] i2c: exynos5: " Uwe Kleine-König
@ 2023-05-09 15:08   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 140+ messages in thread
From: Krzysztof Kozlowski @ 2023-05-09 15:08 UTC (permalink / raw)
  To: Uwe Kleine-König, Wolfram Sang, Wolfram Sang
  Cc: Alim Akhtar, linux-i2c, linux-arm-kernel, linux-samsung-soc, kernel

On 08/05/2023 22:51, Uwe Kleine-König wrote:
> The .remove() callback for a platform driver returns an int which makes
> many driver authors wrongly assume it's possible to do error handling by
> returning an error code. However the value returned is (mostly) ignored
> and this typically results in resource leaks. To improve here there is a
> quest to make the remove callback return void. In the first step of this
> quest all drivers are converted to .remove_new() which already returns
> void.
> 
> Trivially convert this driver from always returning zero in the remove
> callback to the void returning variant.


Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [PATCH 62/89] i2c: s3c2410: Convert to platform remove callback returning void
  2023-05-08 20:52 ` [PATCH 62/89] i2c: s3c2410: " Uwe Kleine-König
@ 2023-05-09 15:09   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 140+ messages in thread
From: Krzysztof Kozlowski @ 2023-05-09 15:09 UTC (permalink / raw)
  To: Uwe Kleine-König, Wolfram Sang
  Cc: Alim Akhtar, linux-arm-kernel, linux-samsung-soc, linux-i2c, kernel

On 08/05/2023 22:52, Uwe Kleine-König wrote:
> The .remove() callback for a platform driver returns an int which makes
> many driver authors wrongly assume it's possible to do error handling by
> returning an error code. However the value returned is (mostly) ignored
> and this typically results in resource leaks. To improve here there is a
> quest to make the remove callback return void. In the first step of this
> quest all drivers are converted to .remove_new() which already returns
> void.
> 
> Trivially convert this driver from always returning zero in the remove
> callback to the void returning variant.
> 


Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [PATCH 15/89] i2c: cros-ec-tunnel: Convert to platform remove callback returning void
  2023-05-08 20:51 ` [PATCH 15/89] i2c: cros-ec-tunnel: " Uwe Kleine-König
@ 2023-05-09 15:09   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 140+ messages in thread
From: Krzysztof Kozlowski @ 2023-05-09 15:09 UTC (permalink / raw)
  To: Uwe Kleine-König, Benson Leung, Wolfram Sang, Wolfram Sang
  Cc: Guenter Roeck, linux-i2c, chrome-platform, kernel

On 08/05/2023 22:51, Uwe Kleine-König wrote:
> The .remove() callback for a platform driver returns an int which makes
> many driver authors wrongly assume it's possible to do error handling by
> returning an error code. However the value returned is (mostly) ignored
> and this typically results in resource leaks. To improve here there is a
> quest to make the remove callback return void. In the first step of this
> quest all drivers are converted to .remove_new() which already returns
> void.
> 
> Trivially convert this driver from always returning zero in the remove
> callback to the void returning variant.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>


Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [PATCH 41/89] i2c: mt65xx: Convert to platform remove callback returning void
  2023-05-08 20:52 ` [PATCH 41/89] i2c: mt65xx: " Uwe Kleine-König
@ 2023-05-10 16:55   ` Matthias Brugger
  0 siblings, 0 replies; 140+ messages in thread
From: Matthias Brugger @ 2023-05-10 16:55 UTC (permalink / raw)
  To: Uwe Kleine-König, Qii Wang, Wolfram Sang
  Cc: AngeloGioacchino Del Regno, linux-i2c, kernel, linux-arm-kernel,
	linux-mediatek



On 08/05/2023 22:52, Uwe Kleine-König wrote:
> The .remove() callback for a platform driver returns an int which makes
> many driver authors wrongly assume it's possible to do error handling by
> returning an error code. However the value returned is (mostly) ignored
> and this typically results in resource leaks. To improve here there is a
> quest to make the remove callback return void. In the first step of this
> quest all drivers are converted to .remove_new() which already returns
> void.
> 
> Trivially convert this driver from always returning zero in the remove
> callback to the void returning variant.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>

> ---
>   drivers/i2c/busses/i2c-mt65xx.c | 6 ++----
>   1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/i2c/busses/i2c-mt65xx.c b/drivers/i2c/busses/i2c-mt65xx.c
> index a43c4d77739a..7ca3f2221ba6 100644
> --- a/drivers/i2c/busses/i2c-mt65xx.c
> +++ b/drivers/i2c/busses/i2c-mt65xx.c
> @@ -1505,15 +1505,13 @@ static int mtk_i2c_probe(struct platform_device *pdev)
>   	return ret;
>   }
>   
> -static int mtk_i2c_remove(struct platform_device *pdev)
> +static void mtk_i2c_remove(struct platform_device *pdev)
>   {
>   	struct mtk_i2c *i2c = platform_get_drvdata(pdev);
>   
>   	i2c_del_adapter(&i2c->adap);
>   
>   	clk_bulk_unprepare(I2C_MT65XX_CLK_MAX, i2c->clocks);
> -
> -	return 0;
>   }
>   
>   #ifdef CONFIG_PM_SLEEP
> @@ -1555,7 +1553,7 @@ static const struct dev_pm_ops mtk_i2c_pm = {
>   
>   static struct platform_driver mtk_i2c_driver = {
>   	.probe = mtk_i2c_probe,
> -	.remove = mtk_i2c_remove,
> +	.remove_new = mtk_i2c_remove,
>   	.driver = {
>   		.name = I2C_DRV_NAME,
>   		.pm = &mtk_i2c_pm,

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [PATCH 42/89] i2c: mt7621: Convert to platform remove callback returning void
  2023-05-08 20:52 ` [PATCH 42/89] i2c: mt7621: " Uwe Kleine-König
@ 2023-05-10 16:56   ` Matthias Brugger
  0 siblings, 0 replies; 140+ messages in thread
From: Matthias Brugger @ 2023-05-10 16:56 UTC (permalink / raw)
  To: Uwe Kleine-König, Stefan Roese, Wolfram Sang
  Cc: AngeloGioacchino Del Regno, linux-i2c, kernel, linux-arm-kernel,
	linux-mediatek



On 08/05/2023 22:52, Uwe Kleine-König wrote:
> The .remove() callback for a platform driver returns an int which makes
> many driver authors wrongly assume it's possible to do error handling by
> returning an error code. However the value returned is (mostly) ignored
> and this typically results in resource leaks. To improve here there is a
> quest to make the remove callback return void. In the first step of this
> quest all drivers are converted to .remove_new() which already returns
> void.
> 
> Trivially convert this driver from always returning zero in the remove
> callback to the void returning variant.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>

> ---
>   drivers/i2c/busses/i2c-mt7621.c | 6 ++----
>   1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/i2c/busses/i2c-mt7621.c b/drivers/i2c/busses/i2c-mt7621.c
> index 20eda5738ac4..f9c294e2bd3c 100644
> --- a/drivers/i2c/busses/i2c-mt7621.c
> +++ b/drivers/i2c/busses/i2c-mt7621.c
> @@ -332,19 +332,17 @@ static int mtk_i2c_probe(struct platform_device *pdev)
>   	return ret;
>   }
>   
> -static int mtk_i2c_remove(struct platform_device *pdev)
> +static void mtk_i2c_remove(struct platform_device *pdev)
>   {
>   	struct mtk_i2c *i2c = platform_get_drvdata(pdev);
>   
>   	clk_disable_unprepare(i2c->clk);
>   	i2c_del_adapter(&i2c->adap);
> -
> -	return 0;
>   }
>   
>   static struct platform_driver mtk_i2c_driver = {
>   	.probe		= mtk_i2c_probe,
> -	.remove		= mtk_i2c_remove,
> +	.remove_new	= mtk_i2c_remove,
>   	.driver		= {
>   		.name	= "i2c-mt7621",
>   		.of_match_table = i2c_mtk_dt_ids,

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [PATCH 71/89] i2c: sun6i-p2wi: Convert to platform remove callback returning void
  2023-05-08 20:52 ` [PATCH 71/89] i2c: sun6i-p2wi: " Uwe Kleine-König
@ 2023-05-10 19:03   ` Jernej Škrabec
  0 siblings, 0 replies; 140+ messages in thread
From: Jernej Škrabec @ 2023-05-10 19:03 UTC (permalink / raw)
  To: Chen-Yu Tsai, Samuel Holland, Wolfram Sang, Uwe Kleine-König
  Cc: linux-i2c, linux-arm-kernel, linux-sunxi, kernel

Dne ponedeljek, 08. maj 2023 ob 22:52:48 CEST je Uwe Kleine-König napisal(a):
> The .remove() callback for a platform driver returns an int which makes
> many driver authors wrongly assume it's possible to do error handling by
> returning an error code. However the value returned is (mostly) ignored
> and this typically results in resource leaks. To improve here there is a
> quest to make the remove callback return void. In the first step of this
> quest all drivers are converted to .remove_new() which already returns
> void.
> 
> Trivially convert this driver from always returning zero in the remove
> callback to the void returning variant.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>

Best regards,
Jernej



^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [PATCH 36/89] i2c: meson: Convert to platform remove callback returning void
  2023-05-08 20:52 ` [PATCH 36/89] i2c: meson: " Uwe Kleine-König
@ 2023-05-10 20:41   ` Martin Blumenstingl
  0 siblings, 0 replies; 140+ messages in thread
From: Martin Blumenstingl @ 2023-05-10 20:41 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Neil Armstrong, Kevin Hilman, Wolfram Sang, Julia Lawall,
	Wolfram Sang, Jerome Brunet, linux-i2c, linux-arm-kernel,
	linux-amlogic, kernel

On Mon, May 8, 2023 at 10:53 PM Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> wrote:
>
> The .remove() callback for a platform driver returns an int which makes
> many driver authors wrongly assume it's possible to do error handling by
> returning an error code. However the value returned is (mostly) ignored
> and this typically results in resource leaks. To improve here there is a
> quest to make the remove callback return void. In the first step of this
> quest all drivers are converted to .remove_new() which already returns
> void.
>
> Trivially convert this driver from always returning zero in the remove
> callback to the void returning variant.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [PATCH 18/89] i2c: designware-platdrv: Convert to platform remove callback returning void
  2023-05-08 20:51 ` [PATCH 18/89] i2c: designware-platdrv: " Uwe Kleine-König
@ 2023-05-11  8:28   ` Jarkko Nikula
  0 siblings, 0 replies; 140+ messages in thread
From: Jarkko Nikula @ 2023-05-11  8:28 UTC (permalink / raw)
  To: Uwe Kleine-König, Wolfram Sang
  Cc: Andy Shevchenko, Mika Westerberg, Jan Dabros, linux-i2c, kernel

On 5/8/23 23:51, Uwe Kleine-König wrote:
> The .remove() callback for a platform driver returns an int which makes
> many driver authors wrongly assume it's possible to do error handling by
> returning an error code. However the value returned is (mostly) ignored
> and this typically results in resource leaks. To improve here there is a
> quest to make the remove callback return void. In the first step of this
> quest all drivers are converted to .remove_new() which already returns
> void.
> 
> Trivially convert this driver from always returning zero in the remove
> callback to the void returning variant.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
>   drivers/i2c/busses/i2c-designware-platdrv.c | 6 ++----
>   1 file changed, 2 insertions(+), 4 deletions(-)
> 
Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [PATCH 16/89] i2c: davinci: Improve error reporting for problems during .remove()
  2023-05-08 20:51 ` [PATCH 16/89] i2c: davinci: Improve error reporting for problems during .remove() Uwe Kleine-König
@ 2023-05-11  9:02   ` Bartosz Golaszewski
  0 siblings, 0 replies; 140+ messages in thread
From: Bartosz Golaszewski @ 2023-05-11  9:02 UTC (permalink / raw)
  To: Uwe Kleine-König; +Cc: Wolfram Sang, linux-arm-kernel, linux-i2c, kernel

On Mon, May 8, 2023 at 10:53 PM Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> wrote:
>
> If pm_runtime_get() fails in .remove() the driver used to return the
> error to the driver core. The only effect of this (compared to returning
> zero) is a generic warning that the error value is ignored. (The device
> is unbound then anyhow.)
>
> Emit a better warning and return zero to suppress the generic (and
> little helpful) message. Also disable runtime PM in the error case.
>
> This prepares changing platform device remove callbacks to return void.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
>  drivers/i2c/busses/i2c-davinci.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-davinci.c b/drivers/i2c/busses/i2c-davinci.c
> index 9750310f2c96..7ba7e6cbcc97 100644
> --- a/drivers/i2c/busses/i2c-davinci.c
> +++ b/drivers/i2c/busses/i2c-davinci.c
> @@ -894,11 +894,11 @@ static int davinci_i2c_remove(struct platform_device *pdev)
>
>         i2c_del_adapter(&dev->adapter);
>
> -       ret = pm_runtime_resume_and_get(&pdev->dev);
> +       ret = pm_runtime_get_sync(&pdev->dev);
>         if (ret < 0)
> -               return ret;
> -
> -       davinci_i2c_write_reg(dev, DAVINCI_I2C_MDR_REG, 0);
> +               dev_err(&pdev->dev, "Failed to resume device\n");
> +       else
> +               davinci_i2c_write_reg(dev, DAVINCI_I2C_MDR_REG, 0);
>
>         pm_runtime_dont_use_autosuspend(dev->dev);
>         pm_runtime_put_sync(dev->dev);
> --
> 2.39.2
>

Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [PATCH 17/89] i2c: davinci: Convert to platform remove callback returning void
  2023-05-08 20:51 ` [PATCH 17/89] i2c: davinci: Convert to platform remove callback returning void Uwe Kleine-König
@ 2023-05-11  9:03   ` Bartosz Golaszewski
  0 siblings, 0 replies; 140+ messages in thread
From: Bartosz Golaszewski @ 2023-05-11  9:03 UTC (permalink / raw)
  To: Uwe Kleine-König; +Cc: Wolfram Sang, linux-arm-kernel, linux-i2c, kernel

On Mon, May 8, 2023 at 10:53 PM Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> wrote:
>
> The .remove() callback for a platform driver returns an int which makes
> many driver authors wrongly assume it's possible to do error handling by
> returning an error code. However the value returned is (mostly) ignored
> and this typically results in resource leaks. To improve here there is a
> quest to make the remove callback return void. In the first step of this
> quest all drivers are converted to .remove_new() which already returns
> void.
>
> Trivially convert this driver from always returning zero in the remove
> callback to the void returning variant.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
>  drivers/i2c/busses/i2c-davinci.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-davinci.c b/drivers/i2c/busses/i2c-davinci.c
> index 7ba7e6cbcc97..b77f9288c0de 100644
> --- a/drivers/i2c/busses/i2c-davinci.c
> +++ b/drivers/i2c/busses/i2c-davinci.c
> @@ -885,7 +885,7 @@ static int davinci_i2c_probe(struct platform_device *pdev)
>         return r;
>  }
>
> -static int davinci_i2c_remove(struct platform_device *pdev)
> +static void davinci_i2c_remove(struct platform_device *pdev)
>  {
>         struct davinci_i2c_dev *dev = platform_get_drvdata(pdev);
>         int ret;
> @@ -903,8 +903,6 @@ static int davinci_i2c_remove(struct platform_device *pdev)
>         pm_runtime_dont_use_autosuspend(dev->dev);
>         pm_runtime_put_sync(dev->dev);
>         pm_runtime_disable(dev->dev);
> -
> -       return 0;
>  }
>
>  #ifdef CONFIG_PM
> @@ -945,7 +943,7 @@ MODULE_ALIAS("platform:i2c_davinci");
>
>  static struct platform_driver davinci_i2c_driver = {
>         .probe          = davinci_i2c_probe,
> -       .remove         = davinci_i2c_remove,
> +       .remove_new     = davinci_i2c_remove,
>         .driver         = {
>                 .name   = "i2c_davinci",
>                 .pm     = davinci_i2c_pm_ops,
> --
> 2.39.2
>

Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [PATCH 60/89] i2c: rk3x: Convert to platform remove callback returning void
  2023-05-08 20:52 ` [PATCH 60/89] i2c: rk3x: " Uwe Kleine-König
@ 2023-05-13 16:44   ` Heiko Stuebner
  0 siblings, 0 replies; 140+ messages in thread
From: Heiko Stuebner @ 2023-05-13 16:44 UTC (permalink / raw)
  To: Wolfram Sang, Uwe Kleine-König
  Cc: linux-arm-kernel, linux-rockchip, linux-i2c, kernel

Am Montag, 8. Mai 2023, 22:52:37 CEST schrieb Uwe Kleine-König:
> The .remove() callback for a platform driver returns an int which makes
> many driver authors wrongly assume it's possible to do error handling by
> returning an error code. However the value returned is (mostly) ignored
> and this typically results in resource leaks. To improve here there is a
> quest to make the remove callback return void. In the first step of this
> quest all drivers are converted to .remove_new() which already returns
> void.
> 
> Trivially convert this driver from always returning zero in the remove
> callback to the void returning variant.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Acked-by: Heiko Stuebner <heiko@sntech.de>



^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [PATCH 14/89] i2c: cpm: Convert to platform remove callback returning void
  2023-05-08 20:51 ` [PATCH 14/89] i2c: cpm: " Uwe Kleine-König
@ 2023-05-16 10:59   ` Jochen Friedrich
  0 siblings, 0 replies; 140+ messages in thread
From: Jochen Friedrich @ 2023-05-16 10:59 UTC (permalink / raw)
  To: Uwe Kleine-König, Wolfram Sang; +Cc: linuxppc-dev, linux-i2c, kernel

Acked-by: Jochen Friedrich <jochen@scram.de>

Am 08.05.2023 um 22:51 schrieb Uwe Kleine-König:
> The .remove() callback for a platform driver returns an int which makes
> many driver authors wrongly assume it's possible to do error handling by
> returning an error code. However the value returned is (mostly) ignored
> and this typically results in resource leaks. To improve here there is a
> quest to make the remove callback return void. In the first step of this
> quest all drivers are converted to .remove_new() which already returns
> void.
>
> Trivially convert this driver from always returning zero in the remove
> callback to the void returning variant.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
>   drivers/i2c/busses/i2c-cpm.c | 6 ++----
>   1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-cpm.c b/drivers/i2c/busses/i2c-cpm.c
> index 24d584a1c9a7..732daf6a932b 100644
> --- a/drivers/i2c/busses/i2c-cpm.c
> +++ b/drivers/i2c/busses/i2c-cpm.c
> @@ -676,7 +676,7 @@ static int cpm_i2c_probe(struct platform_device *ofdev)
>   	return result;
>   }
>   
> -static int cpm_i2c_remove(struct platform_device *ofdev)
> +static void cpm_i2c_remove(struct platform_device *ofdev)
>   {
>   	struct cpm_i2c *cpm = platform_get_drvdata(ofdev);
>   
> @@ -685,8 +685,6 @@ static int cpm_i2c_remove(struct platform_device *ofdev)
>   	cpm_i2c_shutdown(cpm);
>   
>   	kfree(cpm);
> -
> -	return 0;
>   }
>   
>   static const struct of_device_id cpm_i2c_match[] = {
> @@ -703,7 +701,7 @@ MODULE_DEVICE_TABLE(of, cpm_i2c_match);
>   
>   static struct platform_driver cpm_i2c_driver = {
>   	.probe		= cpm_i2c_probe,
> -	.remove		= cpm_i2c_remove,
> +	.remove_new	= cpm_i2c_remove,
>   	.driver = {
>   		.name = "fsl-i2c-cpm",
>   		.of_match_table = cpm_i2c_match,

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [PATCH 00/89] i2c: Convert to platform remove callback returning void
  2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (88 preceding siblings ...)
  2023-05-08 20:53 ` [PATCH 89/89] i2c: mux: reg: " Uwe Kleine-König
@ 2023-06-01  7:33 ` Uwe Kleine-König
  2023-06-01  7:43   ` Biju Das
  2023-06-01 13:54   ` Wolfram Sang
  89 siblings, 2 replies; 140+ messages in thread
From: Uwe Kleine-König @ 2023-06-01  7:33 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: Thor Thayer, Elie Morisse, Shyam Sundar S K, Brendan Higgins,
	Codrin Ciubotariu, Nicolas Ferre, Alexandre Belloni,
	Claudiu Beznea, ye xingchen, Krzysztof Adamski, Ray Jui,
	Scott Branden, Greg Kroah-Hartman, Allison Randal,
	Thomas Gleixner, Florian Fainelli, Wolfram Sang, Kamal Dasu,
	Michal Simek, Hans de Goede, Jochen Friedrich, Benson Leung,
	Krzysztof Kozlowski, Bartosz Golaszewski, Jarkko Nikula,
	Baruch Siach, Jean-Marie Verdun, Nick Hawkins, Dong Aisheng,
	Shawn Guo, Sascha Hauer, Oleksij Rempel, Jean Delvare,
	Paul Cercueil, Chris Pringle, Vladimir Zapolskiy, Neil Armstrong,
	Kevin Hilman, Julia Lawall, Conor Dooley, Daire McNamara,
	Khalil Blaiech, Asmaa Mnebhi, Vadim Pasternak, Michael Shych,
	Chris Packham, Qii Wang, Matthias Brugger, Stefan Roese,
	Gregory CLEMENT, Matthias Schiffer, Stefan Wahren, Avi Fishman,
	Tomer Maimon, Tali Perry, Peter Korsgaard, Andrew Lunn,
	Robert Richter, Tony Lindgren, Aaro Koskinen, Janusz Krzysztofik,
	Vignesh R, Michael Ellerman, Hector Martin, Sven Peter,
	Rob Herring, Srinivas Kandagatla, Sebastian Reichel,
	Miquel Raynal, Loic Poulain, Robert Foss, Andy Gross,
	Bjorn Andersson, Chris Brandt, Heiko Stuebner, Andy Shevchenko,
	Philipp Zabel, Jim Cromie, Patrice Chotard, Pierre-Yves MORDRET,
	Alain Volmat, Maxime Coquelin, Alexandre Torgue, Chen-Yu Tsai,
	Jernej Skrabec, Samuel Holland, Ard Biesheuvel, Thierry Reding,
	Jonathan Hunter, Laxman Dewangan, Kunihiko Hayashi,
	Masami Hiramatsu, Linus Walleij, Andi Shyti, Wei Chen,
	George Cherian, Peter Rosin, Peter Korsgaard, linux-aspeed,
	Benjamin Herrenschmidt, Jan Dabros, Alim Akhtar, Guenter Roeck,
	linux-riscv, Fabio Estevam, linux-stm32, Alyssa Rosenzweig,
	Jerome Brunet, chrome-platform, linux-samsung-soc, Benjamin Fair,
	linux-rockchip, openbmc, Christophe Leroy, Nancy Yuen,
	Broadcom internal kernel review list, NXP Linux Team,
	Konrad Dybcio, linux-sunxi, Joel Stanley, Martin Blumenstingl,
	linux-arm-msm, Nicholas Piggin, linux-mediatek, linux-rpi-kernel,
	linux-tegra, linux-amlogic, linux-omap, Mika Westerberg,
	linux-arm-kernel, AngeloGioacchino Del Regno, Andrew Jeffery,
	Patrick Venture, linux-mips, linux-renesas-soc, Dmitry Osipenko,
	asahi, kernel, linuxppc-dev, linux-i2c

[-- Attachment #1: Type: text/plain, Size: 1319 bytes --]

[Dropped Phil Edworthy from recipents as his email address has problems]

Hello,

On Mon, May 08, 2023 at 10:51:37PM +0200, Uwe Kleine-König wrote:
> this series convers the drivers below drivers/i2c to the .remove_new()
> callback of struct platform_driver(). The motivation is to make the
> remove callback less prone for errors and wrong assumptions. See commit
> 5c5a7680e67b ("platform: Provide a remove callback that returns no
> value") for a more detailed rationale.
> 
> All but one driver already returned zero unconditionally in their
> .remove() callback, so converting them to .remove_new() is trivial.
> i2c-davinci has two patches in this series, first the error path is
> improved to not return an error code, then it's converted as the others
> drivers are.
> 
> The two davinci patches are also the only interdependency in this
> series. I was unsure if I should split the series in two, the busses and
> the mux changes; if convenient these can be applied independent of each
> other.

I wonder how this series will go in. My expectation was that Wolfram
picks up the whole series via his tree?!

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] 140+ messages in thread

* RE: [PATCH 00/89] i2c: Convert to platform remove callback returning void
  2023-06-01  7:33 ` [PATCH 00/89] i2c: " Uwe Kleine-König
@ 2023-06-01  7:43   ` Biju Das
  2023-06-01 13:54   ` Wolfram Sang
  1 sibling, 0 replies; 140+ messages in thread
From: Biju Das @ 2023-06-01  7:43 UTC (permalink / raw)
  To: Uwe Kleine-König, Wolfram Sang, Fabrizio Castro
  Cc: Thor Thayer, Elie Morisse, Shyam Sundar S K, Brendan Higgins,
	Codrin Ciubotariu, Nicolas Ferre, Alexandre Belloni,
	Claudiu Beznea, ye xingchen, Krzysztof Adamski, Ray Jui,
	Scott Branden, Greg Kroah-Hartman, Allison Randal,
	Thomas Gleixner, Florian Fainelli, Wolfram Sang, Kamal Dasu,
	Michal Simek, Hans de Goede, Jochen Friedrich, Benson Leung,
	Krzysztof Kozlowski, Bartosz Golaszewski, Jarkko Nikula,
	Baruch Siach, Jean-Marie Verdun, Nick Hawkins, Dong Aisheng,
	Shawn Guo, Sascha Hauer, Oleksij Rempel, Jean Delvare,
	Paul Cercueil, Chris Pringle, Vladimir Zapolskiy, Neil Armstrong,
	Kevin Hilman, Julia Lawall, Conor Dooley, Daire McNamara,
	Khalil Blaiech, Asmaa Mnebhi, Vadim Pasternak, Michael Shych,
	Chris Packham, Qii Wang, Matthias Brugger, Stefan Roese,
	Gregory CLEMENT, Matthias Schiffer, Stefan Wahren, Avi Fishman,
	Tomer Maimon, Tali Perry, Peter Korsgaard, Andrew Lunn,
	Robert Richter, Tony Lindgren, Aaro Koskinen, Janusz Krzysztofik,
	Vignesh R, Michael Ellerman, Hector Martin, Sven Peter,
	Rob Herring, Srinivas Kandagatla, Sebastian Reichel,
	Miquel Raynal, Loic Poulain, Robert Foss, Andy Gross,
	Bjorn Andersson, Chris Brandt, Heiko Stuebner, Andy Shevchenko,
	Philipp Zabel, Jim Cromie, Patrice Chotard, Pierre-Yves MORDRET,
	Alain Volmat, Maxime Coquelin, Alexandre Torgue, Chen-Yu Tsai,
	Jernej Skrabec, Samuel Holland, Ard Biesheuvel, Thierry Reding,
	Jonathan Hunter, Laxman Dewangan, Kunihiko Hayashi,
	Masami Hiramatsu, Linus Walleij, Andi Shyti, Wei Chen,
	George Cherian, Peter Rosin, Peter Korsgaard, linux-aspeed,
	Benjamin Herrenschmidt, Jan Dabros, Alim Akhtar, Guenter Roeck,
	linux-riscv, Fabio Estevam, linux-stm32, Alyssa Rosenzweig,
	Jerome Brunet, chrome-platform, linux-samsung-soc, Benjamin Fair,
	linux-rockchip, openbmc, Christophe Leroy, Nancy Yuen,
	Broadcom internal kernel review list, NXP Linux Team,
	Konrad Dybcio, linux-sunxi, Joel Stanley, Martin Blumenstingl,
	linux-arm-msm, Nicholas Piggin, linux-mediatek, linux-rpi-kernel,
	linux-tegra, linux-amlogic, linux-omap, Mika Westerberg,
	linux-arm-kernel, AngeloGioacchino Del Regno, Andrew Jeffery,
	Patrick Venture, linux-mips, linux-renesas-soc, Dmitry Osipenko,
	asahi, kernel, linuxppc-dev, linux-i2c

> Subject: Re: [PATCH 00/89] i2c: Convert to platform remove callback
> returning void
> 
> [Dropped Phil Edworthy from recipents as his email address has problems]

Phil no longer works with Renesas. Adding Fabrizio who is taking care of
RZ/V2M I2C driver.

Cheers,
Biju

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [PATCH 00/89] i2c: Convert to platform remove callback returning void
  2023-06-01  7:33 ` [PATCH 00/89] i2c: " Uwe Kleine-König
  2023-06-01  7:43   ` Biju Das
@ 2023-06-01 13:54   ` Wolfram Sang
  2023-06-05  7:54     ` Wolfram Sang
  1 sibling, 1 reply; 140+ messages in thread
From: Wolfram Sang @ 2023-06-01 13:54 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Thor Thayer, Elie Morisse, Shyam Sundar S K, Brendan Higgins,
	Codrin Ciubotariu, Nicolas Ferre, Alexandre Belloni,
	Claudiu Beznea, ye xingchen, Krzysztof Adamski, Ray Jui,
	Scott Branden, Greg Kroah-Hartman, Allison Randal,
	Thomas Gleixner, Florian Fainelli, Kamal Dasu, Michal Simek,
	Hans de Goede, Jochen Friedrich, Benson Leung,
	Krzysztof Kozlowski, Bartosz Golaszewski, Jarkko Nikula,
	Baruch Siach, Jean-Marie Verdun, Nick Hawkins, Dong Aisheng,
	Shawn Guo, Sascha Hauer, Oleksij Rempel, Jean Delvare,
	Paul Cercueil, Chris Pringle, Vladimir Zapolskiy, Neil Armstrong,
	Kevin Hilman, Julia Lawall, Conor Dooley, Daire McNamara,
	Khalil Blaiech, Asmaa Mnebhi, Vadim Pasternak, Michael Shych,
	Chris Packham, Qii Wang, Matthias Brugger, Stefan Roese,
	Gregory CLEMENT, Matthias Schiffer, Stefan Wahren, Avi Fishman,
	Tomer Maimon, Tali Perry, Peter Korsgaard, Andrew Lunn,
	Robert Richter, Tony Lindgren, Aaro Koskinen, Janusz Krzysztofik,
	Vignesh R, Michael Ellerman, Hector Martin, Sven Peter,
	Rob Herring, Srinivas Kandagatla, Sebastian Reichel,
	Miquel Raynal, Loic Poulain, Robert Foss, Andy Gross,
	Bjorn Andersson, Chris Brandt, Heiko Stuebner, Andy Shevchenko,
	Philipp Zabel, Jim Cromie, Patrice Chotard, Pierre-Yves MORDRET,
	Alain Volmat, Maxime Coquelin, Alexandre Torgue, Chen-Yu Tsai,
	Jernej Skrabec, Samuel Holland, Ard Biesheuvel, Thierry Reding,
	Jonathan Hunter, Laxman Dewangan, Kunihiko Hayashi,
	Masami Hiramatsu, Linus Walleij, Andi Shyti, Wei Chen,
	George Cherian, Peter Rosin, Peter Korsgaard, linux-aspeed,
	Benjamin Herrenschmidt, Jan Dabros, Alim Akhtar, Guenter Roeck,
	linux-riscv, Fabio Estevam, linux-stm32, Alyssa Rosenzweig,
	Jerome Brunet, chrome-platform, linux-samsung-soc, Benjamin Fair,
	linux-rockchip, openbmc, Christophe Leroy, Nancy Yuen,
	Broadcom internal kernel review list, NXP Linux Team,
	Konrad Dybcio, linux-sunxi, Joel Stanley, Martin Blumenstingl,
	linux-arm-msm, Nicholas Piggin, linux-mediatek, linux-rpi-kernel,
	linux-tegra, linux-amlogic, linux-omap, Mika Westerberg,
	linux-arm-kernel, AngeloGioacchino Del Regno, Andrew Jeffery,
	Patrick Venture, linux-mips, linux-renesas-soc, Dmitry Osipenko,
	asahi, kernel, linuxppc-dev, linux-i2c

[-- Attachment #1: Type: text/plain, Size: 162 bytes --]


> I wonder how this series will go in. My expectation was that Wolfram
> picks up the whole series via his tree?!

Will do. I am currently super-busy, though.



[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 140+ messages in thread

* Re: [PATCH 00/89] i2c: Convert to platform remove callback returning void
  2023-06-01 13:54   ` Wolfram Sang
@ 2023-06-05  7:54     ` Wolfram Sang
  0 siblings, 0 replies; 140+ messages in thread
From: Wolfram Sang @ 2023-06-05  7:54 UTC (permalink / raw)
  To: Uwe Kleine-König, Thor Thayer, Elie Morisse,
	Shyam Sundar S K, Brendan Higgins, Codrin Ciubotariu,
	Nicolas Ferre, Alexandre Belloni, Claudiu Beznea, ye xingchen,
	Krzysztof Adamski, Ray Jui, Scott Branden, Greg Kroah-Hartman,
	Allison Randal, Thomas Gleixner, Florian Fainelli, Kamal Dasu,
	Michal Simek, Hans de Goede, Jochen Friedrich, Benson Leung,
	Krzysztof Kozlowski, Bartosz Golaszewski, Jarkko Nikula,
	Baruch Siach, Jean-Marie Verdun, Nick Hawkins, Dong Aisheng,
	Shawn Guo, Sascha Hauer, Oleksij Rempel, Jean Delvare,
	Paul Cercueil, Chris Pringle, Vladimir Zapolskiy, Neil Armstrong,
	Kevin Hilman, Julia Lawall, Conor Dooley, Daire McNamara,
	Khalil Blaiech, Asmaa Mnebhi, Vadim Pasternak, Michael Shych,
	Chris Packham, Qii Wang, Matthias Brugger, Stefan Roese,
	Gregory CLEMENT, Matthias Schiffer, Stefan Wahren, Avi Fishman,
	Tomer Maimon, Tali Perry, Peter Korsgaard, Andrew Lunn,
	Robert Richter, Tony Lindgren, Aaro Koskinen, Janusz Krzysztofik,
	Vignesh R, Michael Ellerman, Hector Martin, Sven Peter,
	Rob Herring, Srinivas Kandagatla, Sebastian Reichel,
	Miquel Raynal, Loic Poulain, Robert Foss, Andy Gross,
	Bjorn Andersson, Chris Brandt, Heiko Stuebner, Andy Shevchenko,
	Philipp Zabel, Jim Cromie, Patrice Chotard, Pierre-Yves MORDRET,
	Alain Volmat, Maxime Coquelin, Alexandre Torgue, Chen-Yu Tsai,
	Jernej Skrabec, Samuel Holland, Ard Biesheuvel, Thierry Reding,
	Jonathan Hunter, Laxman Dewangan, Kunihiko Hayashi,
	Masami Hiramatsu, Linus Walleij, Andi Shyti, Wei Chen,
	George Cherian, Peter Rosin, Peter Korsgaard, linux-aspeed,
	Benjamin Herrenschmidt, Jan Dabros, Alim Akhtar, Guenter Roeck,
	linux-riscv, Fabio Estevam, linux-stm32, Alyssa Rosenzweig,
	Jerome Brunet, chrome-platform, linux-samsung-soc, Benjamin Fair,
	linux-rockchip, openbmc, Christophe Leroy, Nancy Yuen,
	Broadcom internal kernel review list, NXP Linux Team,
	Konrad Dybcio, linux-sunxi, Joel Stanley, Martin Blumenstingl,
	linux-arm-msm, Nicholas Piggin, linux-mediatek, linux-rpi-kernel,
	linux-tegra, linux-amlogic, linux-omap, Mika Westerberg,
	linux-arm-kernel, AngeloGioacchino Del Regno, Andrew Jeffery,
	Patrick Venture, linux-mips, linux-renesas-soc, Dmitry Osipenko,
	asahi, kernel, linuxppc-dev, linux-i2c

[-- Attachment #1: Type: text/plain, Size: 426 bytes --]

On Thu, Jun 01, 2023 at 03:54:50PM +0200, Wolfram Sang wrote:
> 
> > I wonder how this series will go in. My expectation was that Wolfram
> > picks up the whole series via his tree?!
> 
> Will do. I am currently super-busy, though.

Whole series applied to for-next. I squashed all the commits into one.
These are mostly simple changes which we won't revert anyhow, but fix
incrementally if we ever find an issue.


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 140+ messages in thread

end of thread, other threads:[~2023-06-05  7:55 UTC | newest]

Thread overview: 140+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-08 20:51 [PATCH 00/89] i2c: Convert to platform remove callback returning void Uwe Kleine-König
2023-05-08 20:51 ` [PATCH 01/89] i2c: altera: " Uwe Kleine-König
2023-05-08 20:51 ` [PATCH 02/89] i2c: amd-mp2-plat: " Uwe Kleine-König
2023-05-08 20:51 ` [PATCH 03/89] i2c: aspeed: " Uwe Kleine-König
2023-05-08 20:51 ` [PATCH 04/89] i2c: at91-core: " Uwe Kleine-König
2023-05-09  4:42   ` Claudiu.Beznea
2023-05-08 20:51 ` [PATCH 05/89] i2c: au1550: " Uwe Kleine-König
2023-05-08 20:51 ` [PATCH 06/89] i2c: axxia: " Uwe Kleine-König
2023-05-08 20:51 ` [PATCH 07/89] i2c: bcm-iproc: " Uwe Kleine-König
2023-05-08 20:59   ` Florian Fainelli
2023-05-08 20:51 ` [PATCH 08/89] i2c: bcm-kona: " Uwe Kleine-König
2023-05-08 20:59   ` Florian Fainelli
2023-05-08 20:51 ` [PATCH 09/89] i2c: bcm2835: " Uwe Kleine-König
2023-05-08 20:59   ` Florian Fainelli
2023-05-08 20:51 ` [PATCH 10/89] i2c: brcmstb: " Uwe Kleine-König
2023-05-08 20:59   ` Florian Fainelli
2023-05-08 20:51 ` [PATCH 11/89] i2c: cadence: " Uwe Kleine-König
2023-05-08 20:51 ` [PATCH 12/89] i2c: cbus-gpio: " Uwe Kleine-König
2023-05-08 20:51 ` [PATCH 13/89] i2c: cht-wc: " Uwe Kleine-König
2023-05-09  8:13   ` Hans de Goede
2023-05-08 20:51 ` [PATCH 14/89] i2c: cpm: " Uwe Kleine-König
2023-05-16 10:59   ` Jochen Friedrich
2023-05-08 20:51 ` [PATCH 15/89] i2c: cros-ec-tunnel: " Uwe Kleine-König
2023-05-09 15:09   ` Krzysztof Kozlowski
2023-05-08 20:51 ` [PATCH 16/89] i2c: davinci: Improve error reporting for problems during .remove() Uwe Kleine-König
2023-05-11  9:02   ` Bartosz Golaszewski
2023-05-08 20:51 ` [PATCH 17/89] i2c: davinci: Convert to platform remove callback returning void Uwe Kleine-König
2023-05-11  9:03   ` Bartosz Golaszewski
2023-05-08 20:51 ` [PATCH 18/89] i2c: designware-platdrv: " Uwe Kleine-König
2023-05-11  8:28   ` Jarkko Nikula
2023-05-08 20:51 ` [PATCH 19/89] i2c: digicolor: " Uwe Kleine-König
2023-05-09  3:15   ` Baruch Siach
2023-05-08 20:51 ` [PATCH 20/89] i2c: dln2: " Uwe Kleine-König
2023-05-08 20:51 ` [PATCH 21/89] i2c: emev2: " Uwe Kleine-König
2023-05-09  7:01   ` Geert Uytterhoeven
2023-05-08 20:51 ` [PATCH 22/89] i2c: exynos5: " Uwe Kleine-König
2023-05-09 15:08   ` Krzysztof Kozlowski
2023-05-08 20:52 ` [PATCH 23/89] i2c: gpio: " Uwe Kleine-König
2023-05-08 20:52 ` [PATCH 24/89] i2c: gxp: " Uwe Kleine-König
2023-05-08 20:52 ` [PATCH 25/89] i2c: highlander: " Uwe Kleine-König
2023-05-08 20:52 ` [PATCH 26/89] i2c: hix5hd2: " Uwe Kleine-König
2023-05-08 20:52 ` [PATCH 27/89] i2c: ibm_iic: " Uwe Kleine-König
2023-05-08 20:52 ` [PATCH 28/89] i2c: img-scb: " Uwe Kleine-König
2023-05-08 20:52 ` [PATCH 29/89] i2c: imx-lpi2c: " Uwe Kleine-König
2023-05-08 20:52 ` [PATCH 30/89] i2c: imx: " Uwe Kleine-König
2023-05-08 20:52 ` [PATCH 31/89] i2c: iop3xx: " Uwe Kleine-König
2023-05-08 20:52 ` [PATCH 32/89] i2c: isch: " Uwe Kleine-König
2023-05-09 11:04   ` Jean Delvare
2023-05-08 20:52 ` [PATCH 33/89] i2c: jz4780: " Uwe Kleine-König
2023-05-08 20:52 ` [PATCH 34/89] i2c: kempld: " Uwe Kleine-König
2023-05-09  7:52   ` Chris Pringle
2023-05-08 20:52 ` [PATCH 35/89] i2c: lpc2k: " Uwe Kleine-König
2023-05-08 20:52 ` [PATCH 36/89] i2c: meson: " Uwe Kleine-König
2023-05-10 20:41   ` Martin Blumenstingl
2023-05-08 20:52 ` [PATCH 37/89] i2c: microchip-corei2c: " Uwe Kleine-König
2023-05-08 21:00   ` Conor Dooley
2023-05-08 20:52 ` [PATCH 38/89] i2c: mlxbf: " Uwe Kleine-König
2023-05-08 21:01   ` Asmaa Mnebhi
2023-05-08 20:52 ` [PATCH 39/89] i2c: mlxcpld: " Uwe Kleine-König
2023-05-09  5:55   ` Vadim Pasternak
2023-05-08 20:52 ` [PATCH 40/89] i2c: mpc: " Uwe Kleine-König
2023-05-08 21:11   ` Chris Packham
2023-05-08 20:52 ` [PATCH 41/89] i2c: mt65xx: " Uwe Kleine-König
2023-05-10 16:55   ` Matthias Brugger
2023-05-08 20:52 ` [PATCH 42/89] i2c: mt7621: " Uwe Kleine-König
2023-05-10 16:56   ` Matthias Brugger
2023-05-08 20:52 ` [PATCH 43/89] i2c: mv64xxx: " Uwe Kleine-König
2023-05-08 20:52 ` [PATCH 44/89] i2c: mxs: " Uwe Kleine-König
2023-05-08 20:52 ` [PATCH 45/89] i2c: npcm7xx: " Uwe Kleine-König
2023-05-09  6:32   ` Tali Perry
2023-05-08 20:52 ` [PATCH 46/89] i2c: ocores: " Uwe Kleine-König
2023-05-08 20:52 ` [PATCH 47/89] i2c: octeon-platdrv: " Uwe Kleine-König
2023-05-08 20:52 ` [PATCH 48/89] i2c: omap: " Uwe Kleine-König
2023-05-09  6:02   ` Vignesh Raghavendra
2023-05-08 20:52 ` [PATCH 49/89] i2c: opal: " Uwe Kleine-König
2023-05-08 20:52 ` [PATCH 50/89] i2c: pasemi-platform: " Uwe Kleine-König
2023-05-08 20:52 ` [PATCH 51/89] i2c: pca-platform: " Uwe Kleine-König
2023-05-08 20:52 ` [PATCH 52/89] i2c: pnx: " Uwe Kleine-König
2023-05-08 20:52 ` [PATCH 53/89] i2c: powermac: " Uwe Kleine-König
2023-05-08 20:52 ` [PATCH 54/89] i2c: pxa: " Uwe Kleine-König
2023-05-08 20:52 ` [PATCH 55/89] i2c: qcom-cci: " Uwe Kleine-König
2023-05-08 20:52 ` [PATCH 56/89] i2c: qcom-geni: " Uwe Kleine-König
2023-05-09  8:46   ` Konrad Dybcio
2023-05-08 20:52 ` [PATCH 57/89] i2c: qup: " Uwe Kleine-König
2023-05-09  8:47   ` Konrad Dybcio
2023-05-08 20:52 ` [PATCH 58/89] i2c: rcar: " Uwe Kleine-König
2023-05-09  7:01   ` Geert Uytterhoeven
2023-05-08 20:52 ` [PATCH 59/89] i2c: riic: " Uwe Kleine-König
2023-05-09  7:02   ` Geert Uytterhoeven
2023-05-08 20:52 ` [PATCH 60/89] i2c: rk3x: " Uwe Kleine-König
2023-05-13 16:44   ` Heiko Stuebner
2023-05-08 20:52 ` [PATCH 61/89] i2c: rzv2m: " Uwe Kleine-König
2023-05-08 20:52 ` [PATCH 62/89] i2c: s3c2410: " Uwe Kleine-König
2023-05-09 15:09   ` Krzysztof Kozlowski
2023-05-08 20:52 ` [PATCH 63/89] i2c: scmi: " Uwe Kleine-König
2023-05-08 20:52 ` [PATCH 64/89] i2c: scx200_acb: " Uwe Kleine-König
2023-05-08 20:52 ` [PATCH 65/89] i2c: sh7760: " Uwe Kleine-König
2023-05-08 20:52 ` [PATCH 66/89] i2c: sh_mobile: " Uwe Kleine-König
2023-05-09  7:02   ` Geert Uytterhoeven
2023-05-08 20:52 ` [PATCH 67/89] i2c: simtec: " Uwe Kleine-König
2023-05-08 20:52 ` [PATCH 68/89] i2c: st: " Uwe Kleine-König
2023-05-09  6:21   ` Patrice CHOTARD
2023-05-08 20:52 ` [PATCH 69/89] i2c: stm32f4: " Uwe Kleine-König
2023-05-09  7:24   ` Alain Volmat
2023-05-08 20:52 ` [PATCH 70/89] i2c: stm32f7: " Uwe Kleine-König
2023-05-09  7:25   ` Alain Volmat
2023-05-08 20:52 ` [PATCH 71/89] i2c: sun6i-p2wi: " Uwe Kleine-König
2023-05-10 19:03   ` Jernej Škrabec
2023-05-08 20:52 ` [PATCH 72/89] i2c: synquacer: " Uwe Kleine-König
2023-05-08 22:00   ` Ard Biesheuvel
2023-05-08 20:52 ` [PATCH 73/89] i2c: tegra-bpmp: " Uwe Kleine-König
2023-05-08 20:52 ` [PATCH 74/89] i2c: tegra: " Uwe Kleine-König
2023-05-08 20:52 ` [PATCH 75/89] i2c: uniphier-f: " Uwe Kleine-König
2023-05-08 20:52 ` [PATCH 76/89] i2c: uniphier: " Uwe Kleine-König
2023-05-08 20:52 ` [PATCH 77/89] i2c: versatile: " Uwe Kleine-König
2023-05-09  7:07   ` Linus Walleij
2023-05-08 20:52 ` [PATCH 78/89] i2c: viperboard: " Uwe Kleine-König
2023-05-08 20:52 ` [PATCH 79/89] i2c: wmt: " Uwe Kleine-König
2023-05-08 20:52 ` [PATCH 80/89] i2c: xgene-slimpro: " Uwe Kleine-König
2023-05-08 20:52 ` [PATCH 81/89] i2c: xiic: " Uwe Kleine-König
2023-05-08 20:52 ` [PATCH 82/89] i2c: xlp9xx: " Uwe Kleine-König
2023-05-08 20:53 ` [PATCH 83/89] i2c: mux: arb-gpio-challenge: " Uwe Kleine-König
2023-05-09  6:09   ` Peter Rosin
2023-05-08 20:53 ` [PATCH 84/89] i2c: mux: demux-pinctrl: " Uwe Kleine-König
2023-05-09  6:10   ` Peter Rosin
2023-05-08 20:53 ` [PATCH 85/89] i2c: mux: gpio: " Uwe Kleine-König
2023-05-09  6:10   ` Peter Rosin
2023-05-08 20:53 ` [PATCH 86/89] i2c: mux: gpmux: " Uwe Kleine-König
2023-05-09  6:10   ` Peter Rosin
2023-05-08 20:53 ` [PATCH 87/89] i2c: mux: mlxcpld: " Uwe Kleine-König
2023-05-09  5:55   ` Vadim Pasternak
2023-05-09  6:11   ` Peter Rosin
2023-05-08 20:53 ` [PATCH 88/89] i2c: mux: pinctrl: " Uwe Kleine-König
2023-05-09  6:11   ` Peter Rosin
2023-05-08 20:53 ` [PATCH 89/89] i2c: mux: reg: " Uwe Kleine-König
2023-05-09  6:11   ` Peter Rosin
2023-06-01  7:33 ` [PATCH 00/89] i2c: " Uwe Kleine-König
2023-06-01  7:43   ` Biju Das
2023-06-01 13:54   ` Wolfram Sang
2023-06-05  7:54     ` Wolfram Sang

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).