All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/40] soc: Convert to platform remove callback returning void
@ 2023-09-25  9:54 ` Uwe Kleine-König
  0 siblings, 0 replies; 133+ messages in thread
From: Uwe Kleine-König @ 2023-09-25  9:54 UTC (permalink / raw)
  To: Joel Stanley, Li Yang, Herve Codina, Qiang Zhao, Hitomi Hasegawa,
	Huisong Li, Krzysztof Halasa, Karol Gugala, Mateusz Holenko,
	Gabriel Somlo, Yinbo Zhu, Matthias Brugger, Conor Dooley,
	Daire McNamara, Krzysztof Kozlowski, Andy Gross, Bjorn Andersson,
	Konrad Dybcio, Heiko Stuebner, Thierry Reding, Jonathan Hunter,
	Sumit Gupta, Shang XiaoJing, Muhammad Usama Anjum, Rob Herring,
	Nishanth Menon, Santosh Shilimkar, Michal Simek
  Cc: Andrew Jeffery, linux-arm-kernel, linux-aspeed, linux-kernel,
	Arnd Bergmann, Zev Weiss, linuxppc-dev, loongarch,
	AngeloGioacchino Del Regno, linux-mediatek, linux-riscv,
	zhang songyi, Lubomir Rintel, linux-arm-msm, linux-rockchip,
	Alim Akhtar, linux-samsung-soc, Nick Alcock, Yang Yingliang,
	linux-tegra, linux-pm, Ruan Jinjie, kernel

Hello,

this series converts all platform drivers below drivers/soc to use
.remove_new(). The motivation is to get rid of an integer return code
that is (mostly) ignored by the platform driver core and error prone on
the driver side.

See commit 5c5a7680e67b ("platform: Provide a remove callback that
returns no value") for an extended explanation and the eventual goal.

As there is no single maintainer team for drivers/soc, I suggest the
individual maintainers to pick up "their" patches. There are no
interdependencies between the patches, so that should work fine. As
there are still quite a few drivers to convert in other areas than
drivers/soc, I'm happy about every patch that makes it in and there is
no need for further coordination.  So even if there is a merge conflict
with one patch until you apply or a subject prefix is suboptimal, please
don't let you stop by negative feedback for other patches (unless it
applies to "your" patches, too, of course).

Best regards and thanks for considering,
Uwe

Uwe Kleine-König (40):
  soc/aspeed: aspeed-lpc-ctrl: Convert to platform remove callback
    returning void
  soc/aspeed: aspeed-lpc-snoop: Convert to platform remove callback
    returning void
  soc/aspeed: aspeed-p2a-ctrl: Convert to platform remove callback
    returning void
  soc/aspeed: aspeed-uart-routing: Convert to platform remove callback
    returning void
  soc/fsl: dpaa2-console: Convert to platform remove callback returning
    void
  soc/fsl: cpm: qmc: Convert to platform remove callback returning void
  soc/fsl: cpm: tsa: Convert to platform remove callback returning void
  soc/fujitsu: a64fx-diag: Convert to platform remove callback returning
    void
  soc/hisilicon: kunpeng_hccs: Convert to platform remove callback
    returning void
  soc/ixp4xx: ixp4xx-npe: Convert to platform remove callback returning
    void
  soc/ixp4xx: ixp4xx-qmgr: Convert to platform remove callback returning
    void
  soc/litex: litex_soc_ctrl: Convert to platform remove callback
    returning void
  soc/loongson: loongson2_guts: Convert to platform remove callback
    returning void
  soc/mediatek: mtk-devapc: Convert to platform remove callback
    returning void
  soc/mediatek: mtk-mmsys: Convert to platform remove callback returning
    void
  soc/microchip: mpfs-sys-controller: Convert to platform remove
    callback returning void
  soc/pxa: ssp: Convert to platform remove callback returning void
  soc/qcom: icc-bwmon: Convert to platform remove callback returning
    void
  soc/qcom: llcc-qcom: Convert to platform remove callback returning
    void
  soc/qcom: ocmem: Convert to platform remove callback returning void
  soc/qcom: pmic_glink: Convert to platform remove callback returning
    void
  soc/qcom: qcom_aoss: Convert to platform remove callback returning
    void
  soc/qcom: qcom_gsbi: Convert to platform remove callback returning
    void
  soc/qcom: qcom_stats: Convert to platform remove callback returning
    void
  soc/qcom: rmtfs_mem: Convert to platform remove callback returning
    void
  soc/qcom: smem: Convert to platform remove callback returning void
  soc/qcom: smp2p: Convert to platform remove callback returning void
  soc/qcom: smsm: Convert to platform remove callback returning void
  soc/qcom: socinfo: Convert to platform remove callback returning void
  soc/rockchip: io-domain: Convert to platform remove callback returning
    void
  soc/samsung: exynos-chipid: Convert to platform remove callback
    returning void
  soc/tegra: cbb: tegra194-cbb: Convert to platform remove callback
    returning void
  soc/ti: k3-ringacc: Convert to platform remove callback returning void
  soc/ti: knav_dma: Convert to platform remove callback returning void
  soc/ti: knav_qmss_queue: Convert to platform remove callback returning
    void
  soc/ti: pm33xx: Convert to platform remove callback returning void
  soc/ti: pruss: Convert to platform remove callback returning void
  soc/ti: smartreflex: Convert to platform remove callback returning
    void
  soc/ti: wkup_m3_ipc: Convert to platform remove callback returning
    void
  soc/xilinx: zynqmp_power: Convert to platform remove callback
    returning void

 drivers/soc/aspeed/aspeed-lpc-ctrl.c        | 6 ++----
 drivers/soc/aspeed/aspeed-lpc-snoop.c       | 6 ++----
 drivers/soc/aspeed/aspeed-p2a-ctrl.c        | 6 ++----
 drivers/soc/aspeed/aspeed-uart-routing.c    | 6 ++----
 drivers/soc/fsl/dpaa2-console.c             | 6 ++----
 drivers/soc/fsl/qe/qmc.c                    | 6 ++----
 drivers/soc/fsl/qe/tsa.c                    | 5 ++---
 drivers/soc/fujitsu/a64fx-diag.c            | 6 ++----
 drivers/soc/hisilicon/kunpeng_hccs.c        | 6 ++----
 drivers/soc/ixp4xx/ixp4xx-npe.c             | 6 ++----
 drivers/soc/ixp4xx/ixp4xx-qmgr.c            | 5 ++---
 drivers/soc/litex/litex_soc_ctrl.c          | 5 ++---
 drivers/soc/loongson/loongson2_guts.c       | 6 ++----
 drivers/soc/mediatek/mtk-devapc.c           | 6 ++----
 drivers/soc/mediatek/mtk-mmsys.c            | 6 ++----
 drivers/soc/microchip/mpfs-sys-controller.c | 6 ++----
 drivers/soc/pxa/ssp.c                       | 6 ++----
 drivers/soc/qcom/icc-bwmon.c                | 6 ++----
 drivers/soc/qcom/llcc-qcom.c                | 5 ++---
 drivers/soc/qcom/ocmem.c                    | 6 ++----
 drivers/soc/qcom/pmic_glink.c               | 6 ++----
 drivers/soc/qcom/qcom_aoss.c                | 6 ++----
 drivers/soc/qcom/qcom_gsbi.c                | 6 ++----
 drivers/soc/qcom/qcom_stats.c               | 6 ++----
 drivers/soc/qcom/rmtfs_mem.c                | 6 ++----
 drivers/soc/qcom/smem.c                     | 6 ++----
 drivers/soc/qcom/smp2p.c                    | 6 ++----
 drivers/soc/qcom/smsm.c                     | 6 ++----
 drivers/soc/qcom/socinfo.c                  | 6 ++----
 drivers/soc/rockchip/io-domain.c            | 6 ++----
 drivers/soc/samsung/exynos-chipid.c         | 6 ++----
 drivers/soc/tegra/cbb/tegra194-cbb.c        | 6 ++----
 drivers/soc/ti/k3-ringacc.c                 | 5 ++---
 drivers/soc/ti/knav_dma.c                   | 6 ++----
 drivers/soc/ti/knav_qmss_queue.c            | 5 ++---
 drivers/soc/ti/pm33xx.c                     | 5 ++---
 drivers/soc/ti/pruss.c                      | 6 ++----
 drivers/soc/ti/smartreflex.c                | 5 ++---
 drivers/soc/ti/wkup_m3_ipc.c                | 6 ++----
 drivers/soc/xilinx/zynqmp_power.c           | 6 ++----
 40 files changed, 80 insertions(+), 152 deletions(-)

base-commit: 8fff9184d1b5810dca5dd1a02726d4f844af88fc
-- 
2.40.1


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

* [PATCH 00/40] soc: Convert to platform remove callback returning void
@ 2023-09-25  9:54 ` Uwe Kleine-König
  0 siblings, 0 replies; 133+ messages in thread
From: Uwe Kleine-König @ 2023-09-25  9:54 UTC (permalink / raw)
  To: Joel Stanley, Li Yang, Herve Codina, Qiang Zhao, Hitomi Hasegawa,
	Huisong Li, Krzysztof Halasa, Karol Gugala, Mateusz Holenko,
	Gabriel Somlo, Yinbo Zhu, Matthias Brugger, Conor Dooley,
	Daire McNamara, Krzysztof Kozlowski, Andy Gross, Bjorn Andersson,
	Konrad Dybcio, Heiko Stuebner, Thierry Reding, Jonathan Hunter,
	Sumit Gupta, Shang XiaoJing, Muhammad Usama Anjum, Rob Herring,
	Nishanth Menon, Santosh Shilimkar, Michal Simek
  Cc: Andrew Jeffery, linux-arm-kernel, linux-aspeed, linux-kernel,
	Arnd Bergmann, Zev Weiss, linuxppc-dev, loongarch,
	AngeloGioacchino Del Regno, linux-mediatek, linux-riscv,
	zhang songyi, Lubomir Rintel, linux-arm-msm, linux-rockchip,
	Alim Akhtar, linux-samsung-soc, Nick Alcock, Yang Yingliang,
	linux-tegra, linux-pm, Ruan Jinjie, kernel

Hello,

this series converts all platform drivers below drivers/soc to use
.remove_new(). The motivation is to get rid of an integer return code
that is (mostly) ignored by the platform driver core and error prone on
the driver side.

See commit 5c5a7680e67b ("platform: Provide a remove callback that
returns no value") for an extended explanation and the eventual goal.

As there is no single maintainer team for drivers/soc, I suggest the
individual maintainers to pick up "their" patches. There are no
interdependencies between the patches, so that should work fine. As
there are still quite a few drivers to convert in other areas than
drivers/soc, I'm happy about every patch that makes it in and there is
no need for further coordination.  So even if there is a merge conflict
with one patch until you apply or a subject prefix is suboptimal, please
don't let you stop by negative feedback for other patches (unless it
applies to "your" patches, too, of course).

Best regards and thanks for considering,
Uwe

Uwe Kleine-König (40):
  soc/aspeed: aspeed-lpc-ctrl: Convert to platform remove callback
    returning void
  soc/aspeed: aspeed-lpc-snoop: Convert to platform remove callback
    returning void
  soc/aspeed: aspeed-p2a-ctrl: Convert to platform remove callback
    returning void
  soc/aspeed: aspeed-uart-routing: Convert to platform remove callback
    returning void
  soc/fsl: dpaa2-console: Convert to platform remove callback returning
    void
  soc/fsl: cpm: qmc: Convert to platform remove callback returning void
  soc/fsl: cpm: tsa: Convert to platform remove callback returning void
  soc/fujitsu: a64fx-diag: Convert to platform remove callback returning
    void
  soc/hisilicon: kunpeng_hccs: Convert to platform remove callback
    returning void
  soc/ixp4xx: ixp4xx-npe: Convert to platform remove callback returning
    void
  soc/ixp4xx: ixp4xx-qmgr: Convert to platform remove callback returning
    void
  soc/litex: litex_soc_ctrl: Convert to platform remove callback
    returning void
  soc/loongson: loongson2_guts: Convert to platform remove callback
    returning void
  soc/mediatek: mtk-devapc: Convert to platform remove callback
    returning void
  soc/mediatek: mtk-mmsys: Convert to platform remove callback returning
    void
  soc/microchip: mpfs-sys-controller: Convert to platform remove
    callback returning void
  soc/pxa: ssp: Convert to platform remove callback returning void
  soc/qcom: icc-bwmon: Convert to platform remove callback returning
    void
  soc/qcom: llcc-qcom: Convert to platform remove callback returning
    void
  soc/qcom: ocmem: Convert to platform remove callback returning void
  soc/qcom: pmic_glink: Convert to platform remove callback returning
    void
  soc/qcom: qcom_aoss: Convert to platform remove callback returning
    void
  soc/qcom: qcom_gsbi: Convert to platform remove callback returning
    void
  soc/qcom: qcom_stats: Convert to platform remove callback returning
    void
  soc/qcom: rmtfs_mem: Convert to platform remove callback returning
    void
  soc/qcom: smem: Convert to platform remove callback returning void
  soc/qcom: smp2p: Convert to platform remove callback returning void
  soc/qcom: smsm: Convert to platform remove callback returning void
  soc/qcom: socinfo: Convert to platform remove callback returning void
  soc/rockchip: io-domain: Convert to platform remove callback returning
    void
  soc/samsung: exynos-chipid: Convert to platform remove callback
    returning void
  soc/tegra: cbb: tegra194-cbb: Convert to platform remove callback
    returning void
  soc/ti: k3-ringacc: Convert to platform remove callback returning void
  soc/ti: knav_dma: Convert to platform remove callback returning void
  soc/ti: knav_qmss_queue: Convert to platform remove callback returning
    void
  soc/ti: pm33xx: Convert to platform remove callback returning void
  soc/ti: pruss: Convert to platform remove callback returning void
  soc/ti: smartreflex: Convert to platform remove callback returning
    void
  soc/ti: wkup_m3_ipc: Convert to platform remove callback returning
    void
  soc/xilinx: zynqmp_power: Convert to platform remove callback
    returning void

 drivers/soc/aspeed/aspeed-lpc-ctrl.c        | 6 ++----
 drivers/soc/aspeed/aspeed-lpc-snoop.c       | 6 ++----
 drivers/soc/aspeed/aspeed-p2a-ctrl.c        | 6 ++----
 drivers/soc/aspeed/aspeed-uart-routing.c    | 6 ++----
 drivers/soc/fsl/dpaa2-console.c             | 6 ++----
 drivers/soc/fsl/qe/qmc.c                    | 6 ++----
 drivers/soc/fsl/qe/tsa.c                    | 5 ++---
 drivers/soc/fujitsu/a64fx-diag.c            | 6 ++----
 drivers/soc/hisilicon/kunpeng_hccs.c        | 6 ++----
 drivers/soc/ixp4xx/ixp4xx-npe.c             | 6 ++----
 drivers/soc/ixp4xx/ixp4xx-qmgr.c            | 5 ++---
 drivers/soc/litex/litex_soc_ctrl.c          | 5 ++---
 drivers/soc/loongson/loongson2_guts.c       | 6 ++----
 drivers/soc/mediatek/mtk-devapc.c           | 6 ++----
 drivers/soc/mediatek/mtk-mmsys.c            | 6 ++----
 drivers/soc/microchip/mpfs-sys-controller.c | 6 ++----
 drivers/soc/pxa/ssp.c                       | 6 ++----
 drivers/soc/qcom/icc-bwmon.c                | 6 ++----
 drivers/soc/qcom/llcc-qcom.c                | 5 ++---
 drivers/soc/qcom/ocmem.c                    | 6 ++----
 drivers/soc/qcom/pmic_glink.c               | 6 ++----
 drivers/soc/qcom/qcom_aoss.c                | 6 ++----
 drivers/soc/qcom/qcom_gsbi.c                | 6 ++----
 drivers/soc/qcom/qcom_stats.c               | 6 ++----
 drivers/soc/qcom/rmtfs_mem.c                | 6 ++----
 drivers/soc/qcom/smem.c                     | 6 ++----
 drivers/soc/qcom/smp2p.c                    | 6 ++----
 drivers/soc/qcom/smsm.c                     | 6 ++----
 drivers/soc/qcom/socinfo.c                  | 6 ++----
 drivers/soc/rockchip/io-domain.c            | 6 ++----
 drivers/soc/samsung/exynos-chipid.c         | 6 ++----
 drivers/soc/tegra/cbb/tegra194-cbb.c        | 6 ++----
 drivers/soc/ti/k3-ringacc.c                 | 5 ++---
 drivers/soc/ti/knav_dma.c                   | 6 ++----
 drivers/soc/ti/knav_qmss_queue.c            | 5 ++---
 drivers/soc/ti/pm33xx.c                     | 5 ++---
 drivers/soc/ti/pruss.c                      | 6 ++----
 drivers/soc/ti/smartreflex.c                | 5 ++---
 drivers/soc/ti/wkup_m3_ipc.c                | 6 ++----
 drivers/soc/xilinx/zynqmp_power.c           | 6 ++----
 40 files changed, 80 insertions(+), 152 deletions(-)

base-commit: 8fff9184d1b5810dca5dd1a02726d4f844af88fc
-- 
2.40.1


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* [PATCH 00/40] soc: Convert to platform remove callback returning void
@ 2023-09-25  9:54 ` Uwe Kleine-König
  0 siblings, 0 replies; 133+ messages in thread
From: Uwe Kleine-König @ 2023-09-25  9:54 UTC (permalink / raw)
  To: Joel Stanley, Li Yang, Herve Codina, Qiang Zhao, Hitomi Hasegawa,
	Huisong Li, Krzysztof Halasa, Karol Gugala, Mateusz Holenko,
	Gabriel Somlo, Yinbo Zhu, Matthias Brugger, Conor Dooley,
	Daire McNamara, Krzysztof Kozlowski, Andy Gross, Bjorn Andersson,
	Konrad Dybcio, Heiko Stuebner, Thierry Reding, Jonathan Hunter,
	Sumit Gupta, Shang XiaoJing, Muhammad Usama Anjum, Rob Herring,
	Nishanth Menon, Santosh Shilimkar, Michal Simek
  Cc: Andrew Jeffery, linux-arm-kernel, linux-aspeed, linux-kernel,
	Arnd Bergmann, Zev Weiss, linuxppc-dev, loongarch,
	AngeloGioacchino Del Regno, linux-mediatek, linux-riscv,
	zhang songyi, Lubomir Rintel, linux-arm-msm, linux-rockchip,
	Alim Akhtar, linux-samsung-soc, Nick Alcock, Yang Yingliang,
	linux-tegra, linux-pm, Ruan Jinjie, kernel

Hello,

this series converts all platform drivers below drivers/soc to use
.remove_new(). The motivation is to get rid of an integer return code
that is (mostly) ignored by the platform driver core and error prone on
the driver side.

See commit 5c5a7680e67b ("platform: Provide a remove callback that
returns no value") for an extended explanation and the eventual goal.

As there is no single maintainer team for drivers/soc, I suggest the
individual maintainers to pick up "their" patches. There are no
interdependencies between the patches, so that should work fine. As
there are still quite a few drivers to convert in other areas than
drivers/soc, I'm happy about every patch that makes it in and there is
no need for further coordination.  So even if there is a merge conflict
with one patch until you apply or a subject prefix is suboptimal, please
don't let you stop by negative feedback for other patches (unless it
applies to "your" patches, too, of course).

Best regards and thanks for considering,
Uwe

Uwe Kleine-König (40):
  soc/aspeed: aspeed-lpc-ctrl: Convert to platform remove callback
    returning void
  soc/aspeed: aspeed-lpc-snoop: Convert to platform remove callback
    returning void
  soc/aspeed: aspeed-p2a-ctrl: Convert to platform remove callback
    returning void
  soc/aspeed: aspeed-uart-routing: Convert to platform remove callback
    returning void
  soc/fsl: dpaa2-console: Convert to platform remove callback returning
    void
  soc/fsl: cpm: qmc: Convert to platform remove callback returning void
  soc/fsl: cpm: tsa: Convert to platform remove callback returning void
  soc/fujitsu: a64fx-diag: Convert to platform remove callback returning
    void
  soc/hisilicon: kunpeng_hccs: Convert to platform remove callback
    returning void
  soc/ixp4xx: ixp4xx-npe: Convert to platform remove callback returning
    void
  soc/ixp4xx: ixp4xx-qmgr: Convert to platform remove callback returning
    void
  soc/litex: litex_soc_ctrl: Convert to platform remove callback
    returning void
  soc/loongson: loongson2_guts: Convert to platform remove callback
    returning void
  soc/mediatek: mtk-devapc: Convert to platform remove callback
    returning void
  soc/mediatek: mtk-mmsys: Convert to platform remove callback returning
    void
  soc/microchip: mpfs-sys-controller: Convert to platform remove
    callback returning void
  soc/pxa: ssp: Convert to platform remove callback returning void
  soc/qcom: icc-bwmon: Convert to platform remove callback returning
    void
  soc/qcom: llcc-qcom: Convert to platform remove callback returning
    void
  soc/qcom: ocmem: Convert to platform remove callback returning void
  soc/qcom: pmic_glink: Convert to platform remove callback returning
    void
  soc/qcom: qcom_aoss: Convert to platform remove callback returning
    void
  soc/qcom: qcom_gsbi: Convert to platform remove callback returning
    void
  soc/qcom: qcom_stats: Convert to platform remove callback returning
    void
  soc/qcom: rmtfs_mem: Convert to platform remove callback returning
    void
  soc/qcom: smem: Convert to platform remove callback returning void
  soc/qcom: smp2p: Convert to platform remove callback returning void
  soc/qcom: smsm: Convert to platform remove callback returning void
  soc/qcom: socinfo: Convert to platform remove callback returning void
  soc/rockchip: io-domain: Convert to platform remove callback returning
    void
  soc/samsung: exynos-chipid: Convert to platform remove callback
    returning void
  soc/tegra: cbb: tegra194-cbb: Convert to platform remove callback
    returning void
  soc/ti: k3-ringacc: Convert to platform remove callback returning void
  soc/ti: knav_dma: Convert to platform remove callback returning void
  soc/ti: knav_qmss_queue: Convert to platform remove callback returning
    void
  soc/ti: pm33xx: Convert to platform remove callback returning void
  soc/ti: pruss: Convert to platform remove callback returning void
  soc/ti: smartreflex: Convert to platform remove callback returning
    void
  soc/ti: wkup_m3_ipc: Convert to platform remove callback returning
    void
  soc/xilinx: zynqmp_power: Convert to platform remove callback
    returning void

 drivers/soc/aspeed/aspeed-lpc-ctrl.c        | 6 ++----
 drivers/soc/aspeed/aspeed-lpc-snoop.c       | 6 ++----
 drivers/soc/aspeed/aspeed-p2a-ctrl.c        | 6 ++----
 drivers/soc/aspeed/aspeed-uart-routing.c    | 6 ++----
 drivers/soc/fsl/dpaa2-console.c             | 6 ++----
 drivers/soc/fsl/qe/qmc.c                    | 6 ++----
 drivers/soc/fsl/qe/tsa.c                    | 5 ++---
 drivers/soc/fujitsu/a64fx-diag.c            | 6 ++----
 drivers/soc/hisilicon/kunpeng_hccs.c        | 6 ++----
 drivers/soc/ixp4xx/ixp4xx-npe.c             | 6 ++----
 drivers/soc/ixp4xx/ixp4xx-qmgr.c            | 5 ++---
 drivers/soc/litex/litex_soc_ctrl.c          | 5 ++---
 drivers/soc/loongson/loongson2_guts.c       | 6 ++----
 drivers/soc/mediatek/mtk-devapc.c           | 6 ++----
 drivers/soc/mediatek/mtk-mmsys.c            | 6 ++----
 drivers/soc/microchip/mpfs-sys-controller.c | 6 ++----
 drivers/soc/pxa/ssp.c                       | 6 ++----
 drivers/soc/qcom/icc-bwmon.c                | 6 ++----
 drivers/soc/qcom/llcc-qcom.c                | 5 ++---
 drivers/soc/qcom/ocmem.c                    | 6 ++----
 drivers/soc/qcom/pmic_glink.c               | 6 ++----
 drivers/soc/qcom/qcom_aoss.c                | 6 ++----
 drivers/soc/qcom/qcom_gsbi.c                | 6 ++----
 drivers/soc/qcom/qcom_stats.c               | 6 ++----
 drivers/soc/qcom/rmtfs_mem.c                | 6 ++----
 drivers/soc/qcom/smem.c                     | 6 ++----
 drivers/soc/qcom/smp2p.c                    | 6 ++----
 drivers/soc/qcom/smsm.c                     | 6 ++----
 drivers/soc/qcom/socinfo.c                  | 6 ++----
 drivers/soc/rockchip/io-domain.c            | 6 ++----
 drivers/soc/samsung/exynos-chipid.c         | 6 ++----
 drivers/soc/tegra/cbb/tegra194-cbb.c        | 6 ++----
 drivers/soc/ti/k3-ringacc.c                 | 5 ++---
 drivers/soc/ti/knav_dma.c                   | 6 ++----
 drivers/soc/ti/knav_qmss_queue.c            | 5 ++---
 drivers/soc/ti/pm33xx.c                     | 5 ++---
 drivers/soc/ti/pruss.c                      | 6 ++----
 drivers/soc/ti/smartreflex.c                | 5 ++---
 drivers/soc/ti/wkup_m3_ipc.c                | 6 ++----
 drivers/soc/xilinx/zynqmp_power.c           | 6 ++----
 40 files changed, 80 insertions(+), 152 deletions(-)

base-commit: 8fff9184d1b5810dca5dd1a02726d4f844af88fc
-- 
2.40.1


_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

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

* [PATCH 00/40] soc: Convert to platform remove callback returning void
@ 2023-09-25  9:54 ` Uwe Kleine-König
  0 siblings, 0 replies; 133+ messages in thread
From: Uwe Kleine-König @ 2023-09-25  9:54 UTC (permalink / raw)
  To: Joel Stanley, Li Yang, Herve Codina, Qiang Zhao, Hitomi Hasegawa,
	Huisong Li, Krzysztof Halasa, Karol Gugala, Mateusz Holenko,
	Gabriel Somlo, Yinbo Zhu, Matthias Brugger, Conor Dooley,
	Daire McNamara, Krzysztof Kozlowski, Andy Gross, Bjorn Andersson,
	Konrad Dybcio, Heiko Stuebner, Thierry Reding, Jonathan Hunter,
	Sumit Gupta, Shang XiaoJing, Muhammad Usama Anjum, Rob Herring,
	Nishanth Menon, Santosh Shilimkar, Michal Simek
  Cc: Zev Weiss, Alim Akhtar, linux-riscv, linux-samsung-soc,
	linux-aspeed, Ruan Jinjie, linux-rockchip, Yang Yingliang,
	Nick Alcock, Arnd Bergmann, linux-pm, linux-arm-msm,
	Lubomir Rintel, linux-mediatek, loongarch, linux-tegra,
	linux-arm-kernel, AngeloGioacchino Del Regno, Andrew Jeffery,
	linux-kernel, kernel, zhang songyi, linuxppc-dev

Hello,

this series converts all platform drivers below drivers/soc to use
.remove_new(). The motivation is to get rid of an integer return code
that is (mostly) ignored by the platform driver core and error prone on
the driver side.

See commit 5c5a7680e67b ("platform: Provide a remove callback that
returns no value") for an extended explanation and the eventual goal.

As there is no single maintainer team for drivers/soc, I suggest the
individual maintainers to pick up "their" patches. There are no
interdependencies between the patches, so that should work fine. As
there are still quite a few drivers to convert in other areas than
drivers/soc, I'm happy about every patch that makes it in and there is
no need for further coordination.  So even if there is a merge conflict
with one patch until you apply or a subject prefix is suboptimal, please
don't let you stop by negative feedback for other patches (unless it
applies to "your" patches, too, of course).

Best regards and thanks for considering,
Uwe

Uwe Kleine-König (40):
  soc/aspeed: aspeed-lpc-ctrl: Convert to platform remove callback
    returning void
  soc/aspeed: aspeed-lpc-snoop: Convert to platform remove callback
    returning void
  soc/aspeed: aspeed-p2a-ctrl: Convert to platform remove callback
    returning void
  soc/aspeed: aspeed-uart-routing: Convert to platform remove callback
    returning void
  soc/fsl: dpaa2-console: Convert to platform remove callback returning
    void
  soc/fsl: cpm: qmc: Convert to platform remove callback returning void
  soc/fsl: cpm: tsa: Convert to platform remove callback returning void
  soc/fujitsu: a64fx-diag: Convert to platform remove callback returning
    void
  soc/hisilicon: kunpeng_hccs: Convert to platform remove callback
    returning void
  soc/ixp4xx: ixp4xx-npe: Convert to platform remove callback returning
    void
  soc/ixp4xx: ixp4xx-qmgr: Convert to platform remove callback returning
    void
  soc/litex: litex_soc_ctrl: Convert to platform remove callback
    returning void
  soc/loongson: loongson2_guts: Convert to platform remove callback
    returning void
  soc/mediatek: mtk-devapc: Convert to platform remove callback
    returning void
  soc/mediatek: mtk-mmsys: Convert to platform remove callback returning
    void
  soc/microchip: mpfs-sys-controller: Convert to platform remove
    callback returning void
  soc/pxa: ssp: Convert to platform remove callback returning void
  soc/qcom: icc-bwmon: Convert to platform remove callback returning
    void
  soc/qcom: llcc-qcom: Convert to platform remove callback returning
    void
  soc/qcom: ocmem: Convert to platform remove callback returning void
  soc/qcom: pmic_glink: Convert to platform remove callback returning
    void
  soc/qcom: qcom_aoss: Convert to platform remove callback returning
    void
  soc/qcom: qcom_gsbi: Convert to platform remove callback returning
    void
  soc/qcom: qcom_stats: Convert to platform remove callback returning
    void
  soc/qcom: rmtfs_mem: Convert to platform remove callback returning
    void
  soc/qcom: smem: Convert to platform remove callback returning void
  soc/qcom: smp2p: Convert to platform remove callback returning void
  soc/qcom: smsm: Convert to platform remove callback returning void
  soc/qcom: socinfo: Convert to platform remove callback returning void
  soc/rockchip: io-domain: Convert to platform remove callback returning
    void
  soc/samsung: exynos-chipid: Convert to platform remove callback
    returning void
  soc/tegra: cbb: tegra194-cbb: Convert to platform remove callback
    returning void
  soc/ti: k3-ringacc: Convert to platform remove callback returning void
  soc/ti: knav_dma: Convert to platform remove callback returning void
  soc/ti: knav_qmss_queue: Convert to platform remove callback returning
    void
  soc/ti: pm33xx: Convert to platform remove callback returning void
  soc/ti: pruss: Convert to platform remove callback returning void
  soc/ti: smartreflex: Convert to platform remove callback returning
    void
  soc/ti: wkup_m3_ipc: Convert to platform remove callback returning
    void
  soc/xilinx: zynqmp_power: Convert to platform remove callback
    returning void

 drivers/soc/aspeed/aspeed-lpc-ctrl.c        | 6 ++----
 drivers/soc/aspeed/aspeed-lpc-snoop.c       | 6 ++----
 drivers/soc/aspeed/aspeed-p2a-ctrl.c        | 6 ++----
 drivers/soc/aspeed/aspeed-uart-routing.c    | 6 ++----
 drivers/soc/fsl/dpaa2-console.c             | 6 ++----
 drivers/soc/fsl/qe/qmc.c                    | 6 ++----
 drivers/soc/fsl/qe/tsa.c                    | 5 ++---
 drivers/soc/fujitsu/a64fx-diag.c            | 6 ++----
 drivers/soc/hisilicon/kunpeng_hccs.c        | 6 ++----
 drivers/soc/ixp4xx/ixp4xx-npe.c             | 6 ++----
 drivers/soc/ixp4xx/ixp4xx-qmgr.c            | 5 ++---
 drivers/soc/litex/litex_soc_ctrl.c          | 5 ++---
 drivers/soc/loongson/loongson2_guts.c       | 6 ++----
 drivers/soc/mediatek/mtk-devapc.c           | 6 ++----
 drivers/soc/mediatek/mtk-mmsys.c            | 6 ++----
 drivers/soc/microchip/mpfs-sys-controller.c | 6 ++----
 drivers/soc/pxa/ssp.c                       | 6 ++----
 drivers/soc/qcom/icc-bwmon.c                | 6 ++----
 drivers/soc/qcom/llcc-qcom.c                | 5 ++---
 drivers/soc/qcom/ocmem.c                    | 6 ++----
 drivers/soc/qcom/pmic_glink.c               | 6 ++----
 drivers/soc/qcom/qcom_aoss.c                | 6 ++----
 drivers/soc/qcom/qcom_gsbi.c                | 6 ++----
 drivers/soc/qcom/qcom_stats.c               | 6 ++----
 drivers/soc/qcom/rmtfs_mem.c                | 6 ++----
 drivers/soc/qcom/smem.c                     | 6 ++----
 drivers/soc/qcom/smp2p.c                    | 6 ++----
 drivers/soc/qcom/smsm.c                     | 6 ++----
 drivers/soc/qcom/socinfo.c                  | 6 ++----
 drivers/soc/rockchip/io-domain.c            | 6 ++----
 drivers/soc/samsung/exynos-chipid.c         | 6 ++----
 drivers/soc/tegra/cbb/tegra194-cbb.c        | 6 ++----
 drivers/soc/ti/k3-ringacc.c                 | 5 ++---
 drivers/soc/ti/knav_dma.c                   | 6 ++----
 drivers/soc/ti/knav_qmss_queue.c            | 5 ++---
 drivers/soc/ti/pm33xx.c                     | 5 ++---
 drivers/soc/ti/pruss.c                      | 6 ++----
 drivers/soc/ti/smartreflex.c                | 5 ++---
 drivers/soc/ti/wkup_m3_ipc.c                | 6 ++----
 drivers/soc/xilinx/zynqmp_power.c           | 6 ++----
 40 files changed, 80 insertions(+), 152 deletions(-)

base-commit: 8fff9184d1b5810dca5dd1a02726d4f844af88fc
-- 
2.40.1


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

* [PATCH 01/40] soc/aspeed: aspeed-lpc-ctrl: Convert to platform remove callback returning void
  2023-09-25  9:54 ` Uwe Kleine-König
@ 2023-09-25  9:54   ` Uwe Kleine-König
  -1 siblings, 0 replies; 133+ messages in thread
From: Uwe Kleine-König @ 2023-09-25  9:54 UTC (permalink / raw)
  To: Joel Stanley
  Cc: Andrew Jeffery, linux-arm-kernel, linux-aspeed, linux-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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

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/soc/aspeed/aspeed-lpc-ctrl.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/soc/aspeed/aspeed-lpc-ctrl.c b/drivers/soc/aspeed/aspeed-lpc-ctrl.c
index 258894ed234b..e87038009d1b 100644
--- a/drivers/soc/aspeed/aspeed-lpc-ctrl.c
+++ b/drivers/soc/aspeed/aspeed-lpc-ctrl.c
@@ -332,14 +332,12 @@ static int aspeed_lpc_ctrl_probe(struct platform_device *pdev)
 	return rc;
 }
 
-static int aspeed_lpc_ctrl_remove(struct platform_device *pdev)
+static void aspeed_lpc_ctrl_remove(struct platform_device *pdev)
 {
 	struct aspeed_lpc_ctrl *lpc_ctrl = dev_get_drvdata(&pdev->dev);
 
 	misc_deregister(&lpc_ctrl->miscdev);
 	clk_disable_unprepare(lpc_ctrl->clk);
-
-	return 0;
 }
 
 static const struct of_device_id aspeed_lpc_ctrl_match[] = {
@@ -355,7 +353,7 @@ static struct platform_driver aspeed_lpc_ctrl_driver = {
 		.of_match_table = aspeed_lpc_ctrl_match,
 	},
 	.probe = aspeed_lpc_ctrl_probe,
-	.remove = aspeed_lpc_ctrl_remove,
+	.remove_new = aspeed_lpc_ctrl_remove,
 };
 
 module_platform_driver(aspeed_lpc_ctrl_driver);
-- 
2.40.1


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

* [PATCH 01/40] soc/aspeed: aspeed-lpc-ctrl: Convert to platform remove callback returning void
@ 2023-09-25  9:54   ` Uwe Kleine-König
  0 siblings, 0 replies; 133+ messages in thread
From: Uwe Kleine-König @ 2023-09-25  9:54 UTC (permalink / raw)
  To: Joel Stanley
  Cc: Andrew Jeffery, linux-arm-kernel, linux-aspeed, linux-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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

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/soc/aspeed/aspeed-lpc-ctrl.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/soc/aspeed/aspeed-lpc-ctrl.c b/drivers/soc/aspeed/aspeed-lpc-ctrl.c
index 258894ed234b..e87038009d1b 100644
--- a/drivers/soc/aspeed/aspeed-lpc-ctrl.c
+++ b/drivers/soc/aspeed/aspeed-lpc-ctrl.c
@@ -332,14 +332,12 @@ static int aspeed_lpc_ctrl_probe(struct platform_device *pdev)
 	return rc;
 }
 
-static int aspeed_lpc_ctrl_remove(struct platform_device *pdev)
+static void aspeed_lpc_ctrl_remove(struct platform_device *pdev)
 {
 	struct aspeed_lpc_ctrl *lpc_ctrl = dev_get_drvdata(&pdev->dev);
 
 	misc_deregister(&lpc_ctrl->miscdev);
 	clk_disable_unprepare(lpc_ctrl->clk);
-
-	return 0;
 }
 
 static const struct of_device_id aspeed_lpc_ctrl_match[] = {
@@ -355,7 +353,7 @@ static struct platform_driver aspeed_lpc_ctrl_driver = {
 		.of_match_table = aspeed_lpc_ctrl_match,
 	},
 	.probe = aspeed_lpc_ctrl_probe,
-	.remove = aspeed_lpc_ctrl_remove,
+	.remove_new = aspeed_lpc_ctrl_remove,
 };
 
 module_platform_driver(aspeed_lpc_ctrl_driver);
-- 
2.40.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 02/40] soc/aspeed: aspeed-lpc-snoop: Convert to platform remove callback returning void
  2023-09-25  9:54 ` Uwe Kleine-König
@ 2023-09-25  9:54   ` Uwe Kleine-König
  -1 siblings, 0 replies; 133+ messages in thread
From: Uwe Kleine-König @ 2023-09-25  9:54 UTC (permalink / raw)
  To: Joel Stanley
  Cc: Andrew Jeffery, Rob Herring, Arnd Bergmann, linux-arm-kernel,
	linux-aspeed, linux-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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

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/soc/aspeed/aspeed-lpc-snoop.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/soc/aspeed/aspeed-lpc-snoop.c b/drivers/soc/aspeed/aspeed-lpc-snoop.c
index 773dbcbc03a6..888b5840c015 100644
--- a/drivers/soc/aspeed/aspeed-lpc-snoop.c
+++ b/drivers/soc/aspeed/aspeed-lpc-snoop.c
@@ -331,7 +331,7 @@ static int aspeed_lpc_snoop_probe(struct platform_device *pdev)
 	return rc;
 }
 
-static int aspeed_lpc_snoop_remove(struct platform_device *pdev)
+static void aspeed_lpc_snoop_remove(struct platform_device *pdev)
 {
 	struct aspeed_lpc_snoop *lpc_snoop = dev_get_drvdata(&pdev->dev);
 
@@ -340,8 +340,6 @@ static int aspeed_lpc_snoop_remove(struct platform_device *pdev)
 	aspeed_lpc_disable_snoop(lpc_snoop, 1);
 
 	clk_disable_unprepare(lpc_snoop->clk);
-
-	return 0;
 }
 
 static const struct aspeed_lpc_snoop_model_data ast2400_model_data = {
@@ -368,7 +366,7 @@ static struct platform_driver aspeed_lpc_snoop_driver = {
 		.of_match_table = aspeed_lpc_snoop_match,
 	},
 	.probe = aspeed_lpc_snoop_probe,
-	.remove = aspeed_lpc_snoop_remove,
+	.remove_new = aspeed_lpc_snoop_remove,
 };
 
 module_platform_driver(aspeed_lpc_snoop_driver);
-- 
2.40.1


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

* [PATCH 02/40] soc/aspeed: aspeed-lpc-snoop: Convert to platform remove callback returning void
@ 2023-09-25  9:54   ` Uwe Kleine-König
  0 siblings, 0 replies; 133+ messages in thread
From: Uwe Kleine-König @ 2023-09-25  9:54 UTC (permalink / raw)
  To: Joel Stanley
  Cc: Andrew Jeffery, Rob Herring, Arnd Bergmann, linux-arm-kernel,
	linux-aspeed, linux-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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

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/soc/aspeed/aspeed-lpc-snoop.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/soc/aspeed/aspeed-lpc-snoop.c b/drivers/soc/aspeed/aspeed-lpc-snoop.c
index 773dbcbc03a6..888b5840c015 100644
--- a/drivers/soc/aspeed/aspeed-lpc-snoop.c
+++ b/drivers/soc/aspeed/aspeed-lpc-snoop.c
@@ -331,7 +331,7 @@ static int aspeed_lpc_snoop_probe(struct platform_device *pdev)
 	return rc;
 }
 
-static int aspeed_lpc_snoop_remove(struct platform_device *pdev)
+static void aspeed_lpc_snoop_remove(struct platform_device *pdev)
 {
 	struct aspeed_lpc_snoop *lpc_snoop = dev_get_drvdata(&pdev->dev);
 
@@ -340,8 +340,6 @@ static int aspeed_lpc_snoop_remove(struct platform_device *pdev)
 	aspeed_lpc_disable_snoop(lpc_snoop, 1);
 
 	clk_disable_unprepare(lpc_snoop->clk);
-
-	return 0;
 }
 
 static const struct aspeed_lpc_snoop_model_data ast2400_model_data = {
@@ -368,7 +366,7 @@ static struct platform_driver aspeed_lpc_snoop_driver = {
 		.of_match_table = aspeed_lpc_snoop_match,
 	},
 	.probe = aspeed_lpc_snoop_probe,
-	.remove = aspeed_lpc_snoop_remove,
+	.remove_new = aspeed_lpc_snoop_remove,
 };
 
 module_platform_driver(aspeed_lpc_snoop_driver);
-- 
2.40.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 03/40] soc/aspeed: aspeed-p2a-ctrl: Convert to platform remove callback returning void
  2023-09-25  9:54 ` Uwe Kleine-König
@ 2023-09-25  9:54   ` Uwe Kleine-König
  -1 siblings, 0 replies; 133+ messages in thread
From: Uwe Kleine-König @ 2023-09-25  9:54 UTC (permalink / raw)
  To: Joel Stanley
  Cc: Andrew Jeffery, Rob Herring, Arnd Bergmann, linux-arm-kernel,
	linux-aspeed, linux-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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

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/soc/aspeed/aspeed-p2a-ctrl.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/soc/aspeed/aspeed-p2a-ctrl.c b/drivers/soc/aspeed/aspeed-p2a-ctrl.c
index 548f44da28a9..8610ddacc7bc 100644
--- a/drivers/soc/aspeed/aspeed-p2a-ctrl.c
+++ b/drivers/soc/aspeed/aspeed-p2a-ctrl.c
@@ -383,13 +383,11 @@ static int aspeed_p2a_ctrl_probe(struct platform_device *pdev)
 	return rc;
 }
 
-static int aspeed_p2a_ctrl_remove(struct platform_device *pdev)
+static void aspeed_p2a_ctrl_remove(struct platform_device *pdev)
 {
 	struct aspeed_p2a_ctrl *p2a_ctrl = dev_get_drvdata(&pdev->dev);
 
 	misc_deregister(&p2a_ctrl->miscdev);
-
-	return 0;
 }
 
 #define SCU2C_DRAM	BIT(25)
@@ -433,7 +431,7 @@ static struct platform_driver aspeed_p2a_ctrl_driver = {
 		.of_match_table = aspeed_p2a_ctrl_match,
 	},
 	.probe = aspeed_p2a_ctrl_probe,
-	.remove = aspeed_p2a_ctrl_remove,
+	.remove_new = aspeed_p2a_ctrl_remove,
 };
 
 module_platform_driver(aspeed_p2a_ctrl_driver);
-- 
2.40.1


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

* [PATCH 03/40] soc/aspeed: aspeed-p2a-ctrl: Convert to platform remove callback returning void
@ 2023-09-25  9:54   ` Uwe Kleine-König
  0 siblings, 0 replies; 133+ messages in thread
From: Uwe Kleine-König @ 2023-09-25  9:54 UTC (permalink / raw)
  To: Joel Stanley
  Cc: Andrew Jeffery, Rob Herring, Arnd Bergmann, linux-arm-kernel,
	linux-aspeed, linux-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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

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/soc/aspeed/aspeed-p2a-ctrl.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/soc/aspeed/aspeed-p2a-ctrl.c b/drivers/soc/aspeed/aspeed-p2a-ctrl.c
index 548f44da28a9..8610ddacc7bc 100644
--- a/drivers/soc/aspeed/aspeed-p2a-ctrl.c
+++ b/drivers/soc/aspeed/aspeed-p2a-ctrl.c
@@ -383,13 +383,11 @@ static int aspeed_p2a_ctrl_probe(struct platform_device *pdev)
 	return rc;
 }
 
-static int aspeed_p2a_ctrl_remove(struct platform_device *pdev)
+static void aspeed_p2a_ctrl_remove(struct platform_device *pdev)
 {
 	struct aspeed_p2a_ctrl *p2a_ctrl = dev_get_drvdata(&pdev->dev);
 
 	misc_deregister(&p2a_ctrl->miscdev);
-
-	return 0;
 }
 
 #define SCU2C_DRAM	BIT(25)
@@ -433,7 +431,7 @@ static struct platform_driver aspeed_p2a_ctrl_driver = {
 		.of_match_table = aspeed_p2a_ctrl_match,
 	},
 	.probe = aspeed_p2a_ctrl_probe,
-	.remove = aspeed_p2a_ctrl_remove,
+	.remove_new = aspeed_p2a_ctrl_remove,
 };
 
 module_platform_driver(aspeed_p2a_ctrl_driver);
-- 
2.40.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 04/40] soc/aspeed: aspeed-uart-routing: Convert to platform remove callback returning void
  2023-09-25  9:54 ` Uwe Kleine-König
@ 2023-09-25  9:54   ` Uwe Kleine-König
  -1 siblings, 0 replies; 133+ messages in thread
From: Uwe Kleine-König @ 2023-09-25  9:54 UTC (permalink / raw)
  To: Joel Stanley
  Cc: Andrew Jeffery, Arnd Bergmann, Rob Herring, Zev Weiss,
	linux-arm-kernel, linux-aspeed, linux-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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

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/soc/aspeed/aspeed-uart-routing.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/soc/aspeed/aspeed-uart-routing.c b/drivers/soc/aspeed/aspeed-uart-routing.c
index 3a4c1f28cb34..a2195f062e01 100644
--- a/drivers/soc/aspeed/aspeed-uart-routing.c
+++ b/drivers/soc/aspeed/aspeed-uart-routing.c
@@ -565,14 +565,12 @@ static int aspeed_uart_routing_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int aspeed_uart_routing_remove(struct platform_device *pdev)
+static void aspeed_uart_routing_remove(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
 	struct aspeed_uart_routing *uart_routing = platform_get_drvdata(pdev);
 
 	sysfs_remove_group(&dev->kobj, uart_routing->attr_grp);
-
-	return 0;
 }
 
 static const struct of_device_id aspeed_uart_routing_table[] = {
@@ -591,7 +589,7 @@ static struct platform_driver aspeed_uart_routing_driver = {
 		.of_match_table = aspeed_uart_routing_table,
 	},
 	.probe = aspeed_uart_routing_probe,
-	.remove = aspeed_uart_routing_remove,
+	.remove_new = aspeed_uart_routing_remove,
 };
 
 module_platform_driver(aspeed_uart_routing_driver);
-- 
2.40.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 04/40] soc/aspeed: aspeed-uart-routing: Convert to platform remove callback returning void
@ 2023-09-25  9:54   ` Uwe Kleine-König
  0 siblings, 0 replies; 133+ messages in thread
From: Uwe Kleine-König @ 2023-09-25  9:54 UTC (permalink / raw)
  To: Joel Stanley
  Cc: Andrew Jeffery, Arnd Bergmann, Rob Herring, Zev Weiss,
	linux-arm-kernel, linux-aspeed, linux-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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

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/soc/aspeed/aspeed-uart-routing.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/soc/aspeed/aspeed-uart-routing.c b/drivers/soc/aspeed/aspeed-uart-routing.c
index 3a4c1f28cb34..a2195f062e01 100644
--- a/drivers/soc/aspeed/aspeed-uart-routing.c
+++ b/drivers/soc/aspeed/aspeed-uart-routing.c
@@ -565,14 +565,12 @@ static int aspeed_uart_routing_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int aspeed_uart_routing_remove(struct platform_device *pdev)
+static void aspeed_uart_routing_remove(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
 	struct aspeed_uart_routing *uart_routing = platform_get_drvdata(pdev);
 
 	sysfs_remove_group(&dev->kobj, uart_routing->attr_grp);
-
-	return 0;
 }
 
 static const struct of_device_id aspeed_uart_routing_table[] = {
@@ -591,7 +589,7 @@ static struct platform_driver aspeed_uart_routing_driver = {
 		.of_match_table = aspeed_uart_routing_table,
 	},
 	.probe = aspeed_uart_routing_probe,
-	.remove = aspeed_uart_routing_remove,
+	.remove_new = aspeed_uart_routing_remove,
 };
 
 module_platform_driver(aspeed_uart_routing_driver);
-- 
2.40.1


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

* [PATCH 05/40] soc/fsl: dpaa2-console: Convert to platform remove callback returning void
  2023-09-25  9:54 ` Uwe Kleine-König
  (?)
@ 2023-09-25  9:54   ` Uwe Kleine-König
  -1 siblings, 0 replies; 133+ messages in thread
From: Uwe Kleine-König @ 2023-09-25  9:54 UTC (permalink / raw)
  To: Li Yang; +Cc: linuxppc-dev, linux-arm-kernel, linux-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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

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/soc/fsl/dpaa2-console.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/soc/fsl/dpaa2-console.c b/drivers/soc/fsl/dpaa2-console.c
index 1dca693b6b38..6dbc77db7718 100644
--- a/drivers/soc/fsl/dpaa2-console.c
+++ b/drivers/soc/fsl/dpaa2-console.c
@@ -300,12 +300,10 @@ static int dpaa2_console_probe(struct platform_device *pdev)
 	return error;
 }
 
-static int dpaa2_console_remove(struct platform_device *pdev)
+static void dpaa2_console_remove(struct platform_device *pdev)
 {
 	misc_deregister(&dpaa2_mc_console_dev);
 	misc_deregister(&dpaa2_aiop_console_dev);
-
-	return 0;
 }
 
 static const struct of_device_id dpaa2_console_match_table[] = {
@@ -322,7 +320,7 @@ static struct platform_driver dpaa2_console_driver = {
 		   .of_match_table = dpaa2_console_match_table,
 		   },
 	.probe = dpaa2_console_probe,
-	.remove = dpaa2_console_remove,
+	.remove_new = dpaa2_console_remove,
 };
 module_platform_driver(dpaa2_console_driver);
 
-- 
2.40.1


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

* [PATCH 05/40] soc/fsl: dpaa2-console: Convert to platform remove callback returning void
@ 2023-09-25  9:54   ` Uwe Kleine-König
  0 siblings, 0 replies; 133+ messages in thread
From: Uwe Kleine-König @ 2023-09-25  9:54 UTC (permalink / raw)
  To: Li Yang; +Cc: kernel, linuxppc-dev, linux-kernel, linux-arm-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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

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/soc/fsl/dpaa2-console.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/soc/fsl/dpaa2-console.c b/drivers/soc/fsl/dpaa2-console.c
index 1dca693b6b38..6dbc77db7718 100644
--- a/drivers/soc/fsl/dpaa2-console.c
+++ b/drivers/soc/fsl/dpaa2-console.c
@@ -300,12 +300,10 @@ static int dpaa2_console_probe(struct platform_device *pdev)
 	return error;
 }
 
-static int dpaa2_console_remove(struct platform_device *pdev)
+static void dpaa2_console_remove(struct platform_device *pdev)
 {
 	misc_deregister(&dpaa2_mc_console_dev);
 	misc_deregister(&dpaa2_aiop_console_dev);
-
-	return 0;
 }
 
 static const struct of_device_id dpaa2_console_match_table[] = {
@@ -322,7 +320,7 @@ static struct platform_driver dpaa2_console_driver = {
 		   .of_match_table = dpaa2_console_match_table,
 		   },
 	.probe = dpaa2_console_probe,
-	.remove = dpaa2_console_remove,
+	.remove_new = dpaa2_console_remove,
 };
 module_platform_driver(dpaa2_console_driver);
 
-- 
2.40.1


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

* [PATCH 05/40] soc/fsl: dpaa2-console: Convert to platform remove callback returning void
@ 2023-09-25  9:54   ` Uwe Kleine-König
  0 siblings, 0 replies; 133+ messages in thread
From: Uwe Kleine-König @ 2023-09-25  9:54 UTC (permalink / raw)
  To: Li Yang; +Cc: linuxppc-dev, linux-arm-kernel, linux-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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

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/soc/fsl/dpaa2-console.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/soc/fsl/dpaa2-console.c b/drivers/soc/fsl/dpaa2-console.c
index 1dca693b6b38..6dbc77db7718 100644
--- a/drivers/soc/fsl/dpaa2-console.c
+++ b/drivers/soc/fsl/dpaa2-console.c
@@ -300,12 +300,10 @@ static int dpaa2_console_probe(struct platform_device *pdev)
 	return error;
 }
 
-static int dpaa2_console_remove(struct platform_device *pdev)
+static void dpaa2_console_remove(struct platform_device *pdev)
 {
 	misc_deregister(&dpaa2_mc_console_dev);
 	misc_deregister(&dpaa2_aiop_console_dev);
-
-	return 0;
 }
 
 static const struct of_device_id dpaa2_console_match_table[] = {
@@ -322,7 +320,7 @@ static struct platform_driver dpaa2_console_driver = {
 		   .of_match_table = dpaa2_console_match_table,
 		   },
 	.probe = dpaa2_console_probe,
-	.remove = dpaa2_console_remove,
+	.remove_new = dpaa2_console_remove,
 };
 module_platform_driver(dpaa2_console_driver);
 
-- 
2.40.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 06/40] soc/fsl: cpm: qmc: Convert to platform remove callback returning void
  2023-09-25  9:54 ` Uwe Kleine-König
  (?)
@ 2023-09-25  9:54   ` Uwe Kleine-König
  -1 siblings, 0 replies; 133+ messages in thread
From: Uwe Kleine-König @ 2023-09-25  9:54 UTC (permalink / raw)
  To: Herve Codina, Qiang Zhao, Li Yang
  Cc: linuxppc-dev, linux-arm-kernel, linux-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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

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/soc/fsl/qe/qmc.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/soc/fsl/qe/qmc.c b/drivers/soc/fsl/qe/qmc.c
index b3c292c9a14e..92ec76c03965 100644
--- a/drivers/soc/fsl/qe/qmc.c
+++ b/drivers/soc/fsl/qe/qmc.c
@@ -1415,7 +1415,7 @@ static int qmc_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int qmc_remove(struct platform_device *pdev)
+static void qmc_remove(struct platform_device *pdev)
 {
 	struct qmc *qmc = platform_get_drvdata(pdev);
 
@@ -1427,8 +1427,6 @@ static int qmc_remove(struct platform_device *pdev)
 
 	/* Disconnect the serial from TSA */
 	tsa_serial_disconnect(qmc->tsa_serial);
-
-	return 0;
 }
 
 static const struct of_device_id qmc_id_table[] = {
@@ -1443,7 +1441,7 @@ static struct platform_driver qmc_driver = {
 		.of_match_table = of_match_ptr(qmc_id_table),
 	},
 	.probe = qmc_probe,
-	.remove = qmc_remove,
+	.remove_new = qmc_remove,
 };
 module_platform_driver(qmc_driver);
 
-- 
2.40.1


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

* [PATCH 06/40] soc/fsl: cpm: qmc: Convert to platform remove callback returning void
@ 2023-09-25  9:54   ` Uwe Kleine-König
  0 siblings, 0 replies; 133+ messages in thread
From: Uwe Kleine-König @ 2023-09-25  9:54 UTC (permalink / raw)
  To: Herve Codina, Qiang Zhao, Li Yang
  Cc: kernel, linuxppc-dev, linux-kernel, linux-arm-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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

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/soc/fsl/qe/qmc.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/soc/fsl/qe/qmc.c b/drivers/soc/fsl/qe/qmc.c
index b3c292c9a14e..92ec76c03965 100644
--- a/drivers/soc/fsl/qe/qmc.c
+++ b/drivers/soc/fsl/qe/qmc.c
@@ -1415,7 +1415,7 @@ static int qmc_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int qmc_remove(struct platform_device *pdev)
+static void qmc_remove(struct platform_device *pdev)
 {
 	struct qmc *qmc = platform_get_drvdata(pdev);
 
@@ -1427,8 +1427,6 @@ static int qmc_remove(struct platform_device *pdev)
 
 	/* Disconnect the serial from TSA */
 	tsa_serial_disconnect(qmc->tsa_serial);
-
-	return 0;
 }
 
 static const struct of_device_id qmc_id_table[] = {
@@ -1443,7 +1441,7 @@ static struct platform_driver qmc_driver = {
 		.of_match_table = of_match_ptr(qmc_id_table),
 	},
 	.probe = qmc_probe,
-	.remove = qmc_remove,
+	.remove_new = qmc_remove,
 };
 module_platform_driver(qmc_driver);
 
-- 
2.40.1


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

* [PATCH 06/40] soc/fsl: cpm: qmc: Convert to platform remove callback returning void
@ 2023-09-25  9:54   ` Uwe Kleine-König
  0 siblings, 0 replies; 133+ messages in thread
From: Uwe Kleine-König @ 2023-09-25  9:54 UTC (permalink / raw)
  To: Herve Codina, Qiang Zhao, Li Yang
  Cc: linuxppc-dev, linux-arm-kernel, linux-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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

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/soc/fsl/qe/qmc.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/soc/fsl/qe/qmc.c b/drivers/soc/fsl/qe/qmc.c
index b3c292c9a14e..92ec76c03965 100644
--- a/drivers/soc/fsl/qe/qmc.c
+++ b/drivers/soc/fsl/qe/qmc.c
@@ -1415,7 +1415,7 @@ static int qmc_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int qmc_remove(struct platform_device *pdev)
+static void qmc_remove(struct platform_device *pdev)
 {
 	struct qmc *qmc = platform_get_drvdata(pdev);
 
@@ -1427,8 +1427,6 @@ static int qmc_remove(struct platform_device *pdev)
 
 	/* Disconnect the serial from TSA */
 	tsa_serial_disconnect(qmc->tsa_serial);
-
-	return 0;
 }
 
 static const struct of_device_id qmc_id_table[] = {
@@ -1443,7 +1441,7 @@ static struct platform_driver qmc_driver = {
 		.of_match_table = of_match_ptr(qmc_id_table),
 	},
 	.probe = qmc_probe,
-	.remove = qmc_remove,
+	.remove_new = qmc_remove,
 };
 module_platform_driver(qmc_driver);
 
-- 
2.40.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 07/40] soc/fsl: cpm: tsa: Convert to platform remove callback returning void
  2023-09-25  9:54 ` Uwe Kleine-König
  (?)
@ 2023-09-25  9:54   ` Uwe Kleine-König
  -1 siblings, 0 replies; 133+ messages in thread
From: Uwe Kleine-König @ 2023-09-25  9:54 UTC (permalink / raw)
  To: Herve Codina, Qiang Zhao, Li Yang
  Cc: linuxppc-dev, linux-arm-kernel, linux-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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

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/soc/fsl/qe/tsa.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/soc/fsl/qe/tsa.c b/drivers/soc/fsl/qe/tsa.c
index 3646153117b3..3f9981335590 100644
--- a/drivers/soc/fsl/qe/tsa.c
+++ b/drivers/soc/fsl/qe/tsa.c
@@ -706,7 +706,7 @@ static int tsa_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int tsa_remove(struct platform_device *pdev)
+static void tsa_remove(struct platform_device *pdev)
 {
 	struct tsa *tsa = platform_get_drvdata(pdev);
 	int i;
@@ -729,7 +729,6 @@ static int tsa_remove(struct platform_device *pdev)
 			clk_put(tsa->tdm[i].l1rclk_clk);
 		}
 	}
-	return 0;
 }
 
 static const struct of_device_id tsa_id_table[] = {
@@ -744,7 +743,7 @@ static struct platform_driver tsa_driver = {
 		.of_match_table = of_match_ptr(tsa_id_table),
 	},
 	.probe = tsa_probe,
-	.remove = tsa_remove,
+	.remove_new = tsa_remove,
 };
 module_platform_driver(tsa_driver);
 
-- 
2.40.1


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

* [PATCH 07/40] soc/fsl: cpm: tsa: Convert to platform remove callback returning void
@ 2023-09-25  9:54   ` Uwe Kleine-König
  0 siblings, 0 replies; 133+ messages in thread
From: Uwe Kleine-König @ 2023-09-25  9:54 UTC (permalink / raw)
  To: Herve Codina, Qiang Zhao, Li Yang
  Cc: kernel, linuxppc-dev, linux-kernel, linux-arm-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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

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/soc/fsl/qe/tsa.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/soc/fsl/qe/tsa.c b/drivers/soc/fsl/qe/tsa.c
index 3646153117b3..3f9981335590 100644
--- a/drivers/soc/fsl/qe/tsa.c
+++ b/drivers/soc/fsl/qe/tsa.c
@@ -706,7 +706,7 @@ static int tsa_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int tsa_remove(struct platform_device *pdev)
+static void tsa_remove(struct platform_device *pdev)
 {
 	struct tsa *tsa = platform_get_drvdata(pdev);
 	int i;
@@ -729,7 +729,6 @@ static int tsa_remove(struct platform_device *pdev)
 			clk_put(tsa->tdm[i].l1rclk_clk);
 		}
 	}
-	return 0;
 }
 
 static const struct of_device_id tsa_id_table[] = {
@@ -744,7 +743,7 @@ static struct platform_driver tsa_driver = {
 		.of_match_table = of_match_ptr(tsa_id_table),
 	},
 	.probe = tsa_probe,
-	.remove = tsa_remove,
+	.remove_new = tsa_remove,
 };
 module_platform_driver(tsa_driver);
 
-- 
2.40.1


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

* [PATCH 07/40] soc/fsl: cpm: tsa: Convert to platform remove callback returning void
@ 2023-09-25  9:54   ` Uwe Kleine-König
  0 siblings, 0 replies; 133+ messages in thread
From: Uwe Kleine-König @ 2023-09-25  9:54 UTC (permalink / raw)
  To: Herve Codina, Qiang Zhao, Li Yang
  Cc: linuxppc-dev, linux-arm-kernel, linux-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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

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/soc/fsl/qe/tsa.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/soc/fsl/qe/tsa.c b/drivers/soc/fsl/qe/tsa.c
index 3646153117b3..3f9981335590 100644
--- a/drivers/soc/fsl/qe/tsa.c
+++ b/drivers/soc/fsl/qe/tsa.c
@@ -706,7 +706,7 @@ static int tsa_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int tsa_remove(struct platform_device *pdev)
+static void tsa_remove(struct platform_device *pdev)
 {
 	struct tsa *tsa = platform_get_drvdata(pdev);
 	int i;
@@ -729,7 +729,6 @@ static int tsa_remove(struct platform_device *pdev)
 			clk_put(tsa->tdm[i].l1rclk_clk);
 		}
 	}
-	return 0;
 }
 
 static const struct of_device_id tsa_id_table[] = {
@@ -744,7 +743,7 @@ static struct platform_driver tsa_driver = {
 		.of_match_table = of_match_ptr(tsa_id_table),
 	},
 	.probe = tsa_probe,
-	.remove = tsa_remove,
+	.remove_new = tsa_remove,
 };
 module_platform_driver(tsa_driver);
 
-- 
2.40.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 08/40] soc/fujitsu: a64fx-diag: Convert to platform remove callback returning void
  2023-09-25  9:54 ` Uwe Kleine-König
                   ` (9 preceding siblings ...)
  (?)
@ 2023-09-25  9:54 ` Uwe Kleine-König
  -1 siblings, 0 replies; 133+ messages in thread
From: Uwe Kleine-König @ 2023-09-25  9:54 UTC (permalink / raw)
  To: Hitomi Hasegawa; +Cc: linux-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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

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/soc/fujitsu/a64fx-diag.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/soc/fujitsu/a64fx-diag.c b/drivers/soc/fujitsu/a64fx-diag.c
index 524fbfeb94e3..330901893577 100644
--- a/drivers/soc/fujitsu/a64fx-diag.c
+++ b/drivers/soc/fujitsu/a64fx-diag.c
@@ -116,7 +116,7 @@ static int a64fx_diag_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int a64fx_diag_remove(struct platform_device *pdev)
+static void a64fx_diag_remove(struct platform_device *pdev)
 {
 	struct a64fx_diag_priv *priv = platform_get_drvdata(pdev);
 
@@ -127,8 +127,6 @@ static int a64fx_diag_remove(struct platform_device *pdev)
 		free_nmi(priv->irq, NULL);
 	else
 		free_irq(priv->irq, NULL);
-
-	return 0;
 }
 
 static const struct acpi_device_id a64fx_diag_acpi_match[] = {
@@ -144,7 +142,7 @@ static struct platform_driver a64fx_diag_driver = {
 		.acpi_match_table = ACPI_PTR(a64fx_diag_acpi_match),
 	},
 	.probe = a64fx_diag_probe,
-	.remove = a64fx_diag_remove,
+	.remove_new = a64fx_diag_remove,
 };
 
 module_platform_driver(a64fx_diag_driver);
-- 
2.40.1


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

* [PATCH 09/40] soc/hisilicon: kunpeng_hccs: Convert to platform remove callback returning void
  2023-09-25  9:54 ` Uwe Kleine-König
                   ` (10 preceding siblings ...)
  (?)
@ 2023-09-25  9:55 ` Uwe Kleine-König
  -1 siblings, 0 replies; 133+ messages in thread
From: Uwe Kleine-König @ 2023-09-25  9:55 UTC (permalink / raw)
  To: Huisong Li; +Cc: linux-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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

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/soc/hisilicon/kunpeng_hccs.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/soc/hisilicon/kunpeng_hccs.c b/drivers/soc/hisilicon/kunpeng_hccs.c
index f3810d9d1caa..01aec0df98ec 100644
--- a/drivers/soc/hisilicon/kunpeng_hccs.c
+++ b/drivers/soc/hisilicon/kunpeng_hccs.c
@@ -1244,14 +1244,12 @@ static int hccs_probe(struct platform_device *pdev)
 	return rc;
 }
 
-static int hccs_remove(struct platform_device *pdev)
+static void hccs_remove(struct platform_device *pdev)
 {
 	struct hccs_dev *hdev = platform_get_drvdata(pdev);
 
 	hccs_remove_topo_dirs(hdev);
 	hccs_unregister_pcc_channel(hdev);
-
-	return 0;
 }
 
 static const struct acpi_device_id hccs_acpi_match[] = {
@@ -1262,7 +1260,7 @@ MODULE_DEVICE_TABLE(acpi, hccs_acpi_match);
 
 static struct platform_driver hccs_driver = {
 	.probe = hccs_probe,
-	.remove = hccs_remove,
+	.remove_new = hccs_remove,
 	.driver = {
 		.name = "kunpeng_hccs",
 		.acpi_match_table = hccs_acpi_match,
-- 
2.40.1


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

* [PATCH 10/40] soc/ixp4xx: ixp4xx-npe: Convert to platform remove callback returning void
  2023-09-25  9:54 ` Uwe Kleine-König
                   ` (11 preceding siblings ...)
  (?)
@ 2023-09-25  9:55 ` Uwe Kleine-König
  -1 siblings, 0 replies; 133+ messages in thread
From: Uwe Kleine-König @ 2023-09-25  9:55 UTC (permalink / raw)
  To: Krzysztof Halasa; +Cc: linux-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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

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/soc/ixp4xx/ixp4xx-npe.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/soc/ixp4xx/ixp4xx-npe.c b/drivers/soc/ixp4xx/ixp4xx-npe.c
index 5be9988f30ce..35825ee95dff 100644
--- a/drivers/soc/ixp4xx/ixp4xx-npe.c
+++ b/drivers/soc/ixp4xx/ixp4xx-npe.c
@@ -736,7 +736,7 @@ static int ixp4xx_npe_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int ixp4xx_npe_remove(struct platform_device *pdev)
+static void ixp4xx_npe_remove(struct platform_device *pdev)
 {
 	int i;
 
@@ -744,8 +744,6 @@ static int ixp4xx_npe_remove(struct platform_device *pdev)
 		if (npe_tab[i].regs) {
 			npe_reset(&npe_tab[i]);
 		}
-
-	return 0;
 }
 
 static const struct of_device_id ixp4xx_npe_of_match[] = {
@@ -761,7 +759,7 @@ static struct platform_driver ixp4xx_npe_driver = {
 		.of_match_table = ixp4xx_npe_of_match,
 	},
 	.probe = ixp4xx_npe_probe,
-	.remove = ixp4xx_npe_remove,
+	.remove_new = ixp4xx_npe_remove,
 };
 module_platform_driver(ixp4xx_npe_driver);
 
-- 
2.40.1


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

* [PATCH 11/40] soc/ixp4xx: ixp4xx-qmgr: Convert to platform remove callback returning void
  2023-09-25  9:54 ` Uwe Kleine-König
                   ` (12 preceding siblings ...)
  (?)
@ 2023-09-25  9:55 ` Uwe Kleine-König
  -1 siblings, 0 replies; 133+ messages in thread
From: Uwe Kleine-König @ 2023-09-25  9:55 UTC (permalink / raw)
  To: Krzysztof Halasa; +Cc: linux-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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

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/soc/ixp4xx/ixp4xx-qmgr.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/soc/ixp4xx/ixp4xx-qmgr.c b/drivers/soc/ixp4xx/ixp4xx-qmgr.c
index 291086bb9313..244ad8d7e80b 100644
--- a/drivers/soc/ixp4xx/ixp4xx-qmgr.c
+++ b/drivers/soc/ixp4xx/ixp4xx-qmgr.c
@@ -442,11 +442,10 @@ static int ixp4xx_qmgr_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int ixp4xx_qmgr_remove(struct platform_device *pdev)
+static void ixp4xx_qmgr_remove(struct platform_device *pdev)
 {
 	synchronize_irq(qmgr_irq_1);
 	synchronize_irq(qmgr_irq_2);
-	return 0;
 }
 
 static const struct of_device_id ixp4xx_qmgr_of_match[] = {
@@ -462,7 +461,7 @@ static struct platform_driver ixp4xx_qmgr_driver = {
 		.of_match_table = ixp4xx_qmgr_of_match,
 	},
 	.probe = ixp4xx_qmgr_probe,
-	.remove = ixp4xx_qmgr_remove,
+	.remove_new = ixp4xx_qmgr_remove,
 };
 module_platform_driver(ixp4xx_qmgr_driver);
 
-- 
2.40.1


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

* [PATCH 12/40] soc/litex: litex_soc_ctrl: Convert to platform remove callback returning void
  2023-09-25  9:54 ` Uwe Kleine-König
                   ` (13 preceding siblings ...)
  (?)
@ 2023-09-25  9:55 ` Uwe Kleine-König
  2023-09-25 13:03   ` Gabriel L. Somlo
  -1 siblings, 1 reply; 133+ messages in thread
From: Uwe Kleine-König @ 2023-09-25  9:55 UTC (permalink / raw)
  To: Karol Gugala, Mateusz Holenko, Gabriel Somlo, Joel Stanley
  Cc: linux-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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

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/soc/litex/litex_soc_ctrl.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/soc/litex/litex_soc_ctrl.c b/drivers/soc/litex/litex_soc_ctrl.c
index f75790091d38..10813299aa10 100644
--- a/drivers/soc/litex/litex_soc_ctrl.c
+++ b/drivers/soc/litex/litex_soc_ctrl.c
@@ -120,12 +120,11 @@ static int litex_soc_ctrl_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int litex_soc_ctrl_remove(struct platform_device *pdev)
+static void litex_soc_ctrl_remove(struct platform_device *pdev)
 {
 	struct litex_soc_ctrl_device *soc_ctrl_dev = platform_get_drvdata(pdev);
 
 	unregister_restart_handler(&soc_ctrl_dev->reset_nb);
-	return 0;
 }
 
 static struct platform_driver litex_soc_ctrl_driver = {
@@ -134,7 +133,7 @@ static struct platform_driver litex_soc_ctrl_driver = {
 		.of_match_table = of_match_ptr(litex_soc_ctrl_of_match)
 	},
 	.probe = litex_soc_ctrl_probe,
-	.remove = litex_soc_ctrl_remove,
+	.remove_new = litex_soc_ctrl_remove,
 };
 
 module_platform_driver(litex_soc_ctrl_driver);
-- 
2.40.1


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

* [PATCH 13/40] soc/loongson: loongson2_guts: Convert to platform remove callback returning void
  2023-09-25  9:54 ` Uwe Kleine-König
                   ` (14 preceding siblings ...)
  (?)
@ 2023-09-25  9:55 ` Uwe Kleine-König
  -1 siblings, 0 replies; 133+ messages in thread
From: Uwe Kleine-König @ 2023-09-25  9:55 UTC (permalink / raw)
  To: Yinbo Zhu; +Cc: loongarch, linux-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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

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/soc/loongson/loongson2_guts.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/soc/loongson/loongson2_guts.c b/drivers/soc/loongson/loongson2_guts.c
index bace4bc8e03b..48f8382888a7 100644
--- a/drivers/soc/loongson/loongson2_guts.c
+++ b/drivers/soc/loongson/loongson2_guts.c
@@ -150,11 +150,9 @@ static int loongson2_guts_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int loongson2_guts_remove(struct platform_device *dev)
+static void loongson2_guts_remove(struct platform_device *dev)
 {
 	soc_device_unregister(soc_dev);
-
-	return 0;
 }
 
 /*
@@ -173,7 +171,7 @@ static struct platform_driver loongson2_guts_driver = {
 		.of_match_table = loongson2_guts_of_match,
 	},
 	.probe = loongson2_guts_probe,
-	.remove = loongson2_guts_remove,
+	.remove_new = loongson2_guts_remove,
 };
 
 static int __init loongson2_guts_init(void)
-- 
2.40.1


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

* [PATCH 14/40] soc/mediatek: mtk-devapc: Convert to platform remove callback returning void
  2023-09-25  9:54 ` Uwe Kleine-König
@ 2023-09-25  9:55   ` Uwe Kleine-König
  -1 siblings, 0 replies; 133+ messages in thread
From: Uwe Kleine-König @ 2023-09-25  9:55 UTC (permalink / raw)
  To: Matthias Brugger
  Cc: AngeloGioacchino Del Regno, linux-kernel, linux-arm-kernel,
	linux-mediatek, 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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

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/soc/mediatek/mtk-devapc.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/soc/mediatek/mtk-devapc.c b/drivers/soc/mediatek/mtk-devapc.c
index b28feb967540..56cc345552a4 100644
--- a/drivers/soc/mediatek/mtk-devapc.c
+++ b/drivers/soc/mediatek/mtk-devapc.c
@@ -292,18 +292,16 @@ static int mtk_devapc_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int mtk_devapc_remove(struct platform_device *pdev)
+static void mtk_devapc_remove(struct platform_device *pdev)
 {
 	struct mtk_devapc_context *ctx = platform_get_drvdata(pdev);
 
 	stop_devapc(ctx);
-
-	return 0;
 }
 
 static struct platform_driver mtk_devapc_driver = {
 	.probe = mtk_devapc_probe,
-	.remove = mtk_devapc_remove,
+	.remove_new = mtk_devapc_remove,
 	.driver = {
 		.name = "mtk-devapc",
 		.of_match_table = mtk_devapc_dt_match,
-- 
2.40.1


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

* [PATCH 14/40] soc/mediatek: mtk-devapc: Convert to platform remove callback returning void
@ 2023-09-25  9:55   ` Uwe Kleine-König
  0 siblings, 0 replies; 133+ messages in thread
From: Uwe Kleine-König @ 2023-09-25  9:55 UTC (permalink / raw)
  To: Matthias Brugger
  Cc: AngeloGioacchino Del Regno, linux-kernel, linux-arm-kernel,
	linux-mediatek, 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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

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/soc/mediatek/mtk-devapc.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/soc/mediatek/mtk-devapc.c b/drivers/soc/mediatek/mtk-devapc.c
index b28feb967540..56cc345552a4 100644
--- a/drivers/soc/mediatek/mtk-devapc.c
+++ b/drivers/soc/mediatek/mtk-devapc.c
@@ -292,18 +292,16 @@ static int mtk_devapc_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int mtk_devapc_remove(struct platform_device *pdev)
+static void mtk_devapc_remove(struct platform_device *pdev)
 {
 	struct mtk_devapc_context *ctx = platform_get_drvdata(pdev);
 
 	stop_devapc(ctx);
-
-	return 0;
 }
 
 static struct platform_driver mtk_devapc_driver = {
 	.probe = mtk_devapc_probe,
-	.remove = mtk_devapc_remove,
+	.remove_new = mtk_devapc_remove,
 	.driver = {
 		.name = "mtk-devapc",
 		.of_match_table = mtk_devapc_dt_match,
-- 
2.40.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 15/40] soc/mediatek: mtk-mmsys: Convert to platform remove callback returning void
  2023-09-25  9:54 ` Uwe Kleine-König
@ 2023-09-25  9:55   ` Uwe Kleine-König
  -1 siblings, 0 replies; 133+ messages in thread
From: Uwe Kleine-König @ 2023-09-25  9:55 UTC (permalink / raw)
  To: Matthias Brugger
  Cc: AngeloGioacchino Del Regno, linux-kernel, linux-arm-kernel,
	linux-mediatek, 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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

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/soc/mediatek/mtk-mmsys.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/soc/mediatek/mtk-mmsys.c b/drivers/soc/mediatek/mtk-mmsys.c
index ffb75711a1da..88209102ff3b 100644
--- a/drivers/soc/mediatek/mtk-mmsys.c
+++ b/drivers/soc/mediatek/mtk-mmsys.c
@@ -410,14 +410,12 @@ static int mtk_mmsys_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int mtk_mmsys_remove(struct platform_device *pdev)
+static void mtk_mmsys_remove(struct platform_device *pdev)
 {
 	struct mtk_mmsys *mmsys = platform_get_drvdata(pdev);
 
 	platform_device_unregister(mmsys->drm_pdev);
 	platform_device_unregister(mmsys->clks_pdev);
-
-	return 0;
 }
 
 static const struct of_device_id of_match_mtk_mmsys[] = {
@@ -449,7 +447,7 @@ static struct platform_driver mtk_mmsys_drv = {
 		.of_match_table = of_match_mtk_mmsys,
 	},
 	.probe = mtk_mmsys_probe,
-	.remove = mtk_mmsys_remove,
+	.remove_new = mtk_mmsys_remove,
 };
 module_platform_driver(mtk_mmsys_drv);
 
-- 
2.40.1


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

* [PATCH 15/40] soc/mediatek: mtk-mmsys: Convert to platform remove callback returning void
@ 2023-09-25  9:55   ` Uwe Kleine-König
  0 siblings, 0 replies; 133+ messages in thread
From: Uwe Kleine-König @ 2023-09-25  9:55 UTC (permalink / raw)
  To: Matthias Brugger
  Cc: AngeloGioacchino Del Regno, linux-kernel, linux-arm-kernel,
	linux-mediatek, 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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

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/soc/mediatek/mtk-mmsys.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/soc/mediatek/mtk-mmsys.c b/drivers/soc/mediatek/mtk-mmsys.c
index ffb75711a1da..88209102ff3b 100644
--- a/drivers/soc/mediatek/mtk-mmsys.c
+++ b/drivers/soc/mediatek/mtk-mmsys.c
@@ -410,14 +410,12 @@ static int mtk_mmsys_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int mtk_mmsys_remove(struct platform_device *pdev)
+static void mtk_mmsys_remove(struct platform_device *pdev)
 {
 	struct mtk_mmsys *mmsys = platform_get_drvdata(pdev);
 
 	platform_device_unregister(mmsys->drm_pdev);
 	platform_device_unregister(mmsys->clks_pdev);
-
-	return 0;
 }
 
 static const struct of_device_id of_match_mtk_mmsys[] = {
@@ -449,7 +447,7 @@ static struct platform_driver mtk_mmsys_drv = {
 		.of_match_table = of_match_mtk_mmsys,
 	},
 	.probe = mtk_mmsys_probe,
-	.remove = mtk_mmsys_remove,
+	.remove_new = mtk_mmsys_remove,
 };
 module_platform_driver(mtk_mmsys_drv);
 
-- 
2.40.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 16/40] soc/microchip: mpfs-sys-controller: Convert to platform remove callback returning void
  2023-09-25  9:54 ` Uwe Kleine-König
@ 2023-09-25  9:55   ` Uwe Kleine-König
  -1 siblings, 0 replies; 133+ messages in thread
From: Uwe Kleine-König @ 2023-09-25  9:55 UTC (permalink / raw)
  To: Conor Dooley, Daire McNamara; +Cc: linux-riscv, linux-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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

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/soc/microchip/mpfs-sys-controller.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/soc/microchip/mpfs-sys-controller.c b/drivers/soc/microchip/mpfs-sys-controller.c
index fbcd5fd24d7c..0935e9e94172 100644
--- a/drivers/soc/microchip/mpfs-sys-controller.c
+++ b/drivers/soc/microchip/mpfs-sys-controller.c
@@ -149,13 +149,11 @@ static int mpfs_sys_controller_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int mpfs_sys_controller_remove(struct platform_device *pdev)
+static void mpfs_sys_controller_remove(struct platform_device *pdev)
 {
 	struct mpfs_sys_controller *sys_controller = platform_get_drvdata(pdev);
 
 	mpfs_sys_controller_put(sys_controller);
-
-	return 0;
 }
 
 static const struct of_device_id mpfs_sys_controller_of_match[] = {
@@ -207,7 +205,7 @@ static struct platform_driver mpfs_sys_controller_driver = {
 		.of_match_table = mpfs_sys_controller_of_match,
 	},
 	.probe = mpfs_sys_controller_probe,
-	.remove = mpfs_sys_controller_remove,
+	.remove_new = mpfs_sys_controller_remove,
 };
 module_platform_driver(mpfs_sys_controller_driver);
 
-- 
2.40.1


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

* [PATCH 16/40] soc/microchip: mpfs-sys-controller: Convert to platform remove callback returning void
@ 2023-09-25  9:55   ` Uwe Kleine-König
  0 siblings, 0 replies; 133+ messages in thread
From: Uwe Kleine-König @ 2023-09-25  9:55 UTC (permalink / raw)
  To: Conor Dooley, Daire McNamara; +Cc: linux-riscv, linux-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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

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/soc/microchip/mpfs-sys-controller.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/soc/microchip/mpfs-sys-controller.c b/drivers/soc/microchip/mpfs-sys-controller.c
index fbcd5fd24d7c..0935e9e94172 100644
--- a/drivers/soc/microchip/mpfs-sys-controller.c
+++ b/drivers/soc/microchip/mpfs-sys-controller.c
@@ -149,13 +149,11 @@ static int mpfs_sys_controller_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int mpfs_sys_controller_remove(struct platform_device *pdev)
+static void mpfs_sys_controller_remove(struct platform_device *pdev)
 {
 	struct mpfs_sys_controller *sys_controller = platform_get_drvdata(pdev);
 
 	mpfs_sys_controller_put(sys_controller);
-
-	return 0;
 }
 
 static const struct of_device_id mpfs_sys_controller_of_match[] = {
@@ -207,7 +205,7 @@ static struct platform_driver mpfs_sys_controller_driver = {
 		.of_match_table = mpfs_sys_controller_of_match,
 	},
 	.probe = mpfs_sys_controller_probe,
-	.remove = mpfs_sys_controller_remove,
+	.remove_new = mpfs_sys_controller_remove,
 };
 module_platform_driver(mpfs_sys_controller_driver);
 
-- 
2.40.1


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* [PATCH 17/40] soc/pxa: ssp: Convert to platform remove callback returning void
  2023-09-25  9:54 ` Uwe Kleine-König
                   ` (18 preceding siblings ...)
  (?)
@ 2023-09-25  9:55 ` Uwe Kleine-König
  -1 siblings, 0 replies; 133+ messages in thread
From: Uwe Kleine-König @ 2023-09-25  9:55 UTC (permalink / raw)
  Cc: Arnd Bergmann, zhang songyi, Lubomir Rintel, linux-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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

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/soc/pxa/ssp.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/soc/pxa/ssp.c b/drivers/soc/pxa/ssp.c
index bd029e838241..a1e8a07f7275 100644
--- a/drivers/soc/pxa/ssp.c
+++ b/drivers/soc/pxa/ssp.c
@@ -176,15 +176,13 @@ static int pxa_ssp_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int pxa_ssp_remove(struct platform_device *pdev)
+static void pxa_ssp_remove(struct platform_device *pdev)
 {
 	struct ssp_device *ssp = platform_get_drvdata(pdev);
 
 	mutex_lock(&ssp_lock);
 	list_del(&ssp->node);
 	mutex_unlock(&ssp_lock);
-
-	return 0;
 }
 
 static const struct platform_device_id ssp_id_table[] = {
@@ -199,7 +197,7 @@ static const struct platform_device_id ssp_id_table[] = {
 
 static struct platform_driver pxa_ssp_driver = {
 	.probe		= pxa_ssp_probe,
-	.remove		= pxa_ssp_remove,
+	.remove_new	= pxa_ssp_remove,
 	.driver		= {
 		.name		= "pxa2xx-ssp",
 		.of_match_table	= of_match_ptr(pxa_ssp_of_ids),
-- 
2.40.1


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

* [PATCH 18/40] soc/qcom: icc-bwmon: Convert to platform remove callback returning void
  2023-09-25  9:54 ` Uwe Kleine-König
                   ` (19 preceding siblings ...)
  (?)
@ 2023-09-25  9:55 ` Uwe Kleine-König
  2023-09-25  9:57   ` Konrad Dybcio
  2023-09-25 10:39   ` Krzysztof Kozlowski
  -1 siblings, 2 replies; 133+ messages in thread
From: Uwe Kleine-König @ 2023-09-25  9:55 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Andy Gross, Bjorn Andersson, Konrad Dybcio
  Cc: linux-arm-msm, linux-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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

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/soc/qcom/icc-bwmon.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/soc/qcom/icc-bwmon.c b/drivers/soc/qcom/icc-bwmon.c
index adf2d523f103..656706259353 100644
--- a/drivers/soc/qcom/icc-bwmon.c
+++ b/drivers/soc/qcom/icc-bwmon.c
@@ -793,13 +793,11 @@ static int bwmon_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int bwmon_remove(struct platform_device *pdev)
+static void bwmon_remove(struct platform_device *pdev)
 {
 	struct icc_bwmon *bwmon = platform_get_drvdata(pdev);
 
 	bwmon_disable(bwmon);
-
-	return 0;
 }
 
 static const struct icc_bwmon_data msm8998_bwmon_data = {
@@ -862,7 +860,7 @@ MODULE_DEVICE_TABLE(of, bwmon_of_match);
 
 static struct platform_driver bwmon_driver = {
 	.probe = bwmon_probe,
-	.remove = bwmon_remove,
+	.remove_new = bwmon_remove,
 	.driver = {
 		.name = "qcom-bwmon",
 		.of_match_table = bwmon_of_match,
-- 
2.40.1


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

* [PATCH 19/40] soc/qcom: llcc-qcom: Convert to platform remove callback returning void
  2023-09-25  9:54 ` Uwe Kleine-König
                   ` (20 preceding siblings ...)
  (?)
@ 2023-09-25  9:55 ` Uwe Kleine-König
  2023-09-25  9:58   ` Konrad Dybcio
  -1 siblings, 1 reply; 133+ messages in thread
From: Uwe Kleine-König @ 2023-09-25  9:55 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio
  Cc: linux-arm-msm, linux-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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

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/soc/qcom/llcc-qcom.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/soc/qcom/llcc-qcom.c b/drivers/soc/qcom/llcc-qcom.c
index feb21637ac20..2a71548d2dc9 100644
--- a/drivers/soc/qcom/llcc-qcom.c
+++ b/drivers/soc/qcom/llcc-qcom.c
@@ -1080,11 +1080,10 @@ static int qcom_llcc_get_cfg_index(struct platform_device *pdev, u8 *cfg_index,
 	return ret;
 }
 
-static int qcom_llcc_remove(struct platform_device *pdev)
+static void qcom_llcc_remove(struct platform_device *pdev)
 {
 	/* Set the global pointer to a error code to avoid referencing it */
 	drv_data = ERR_PTR(-ENODEV);
-	return 0;
 }
 
 static struct regmap *qcom_llcc_init_mmio(struct platform_device *pdev, u8 index,
@@ -1257,7 +1256,7 @@ static struct platform_driver qcom_llcc_driver = {
 		.of_match_table = qcom_llcc_of_match,
 	},
 	.probe = qcom_llcc_probe,
-	.remove = qcom_llcc_remove,
+	.remove_new = qcom_llcc_remove,
 };
 module_platform_driver(qcom_llcc_driver);
 
-- 
2.40.1


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

* [PATCH 20/40] soc/qcom: ocmem: Convert to platform remove callback returning void
  2023-09-25  9:54 ` Uwe Kleine-König
                   ` (21 preceding siblings ...)
  (?)
@ 2023-09-25  9:55 ` Uwe Kleine-König
  2023-09-25  9:58   ` Konrad Dybcio
  -1 siblings, 1 reply; 133+ messages in thread
From: Uwe Kleine-König @ 2023-09-25  9:55 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio
  Cc: linux-arm-msm, linux-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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

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/soc/qcom/ocmem.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/soc/qcom/ocmem.c b/drivers/soc/qcom/ocmem.c
index 20f5461d46b9..5e9f2c1fd305 100644
--- a/drivers/soc/qcom/ocmem.c
+++ b/drivers/soc/qcom/ocmem.c
@@ -416,14 +416,12 @@ static int ocmem_dev_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int ocmem_dev_remove(struct platform_device *pdev)
+static void ocmem_dev_remove(struct platform_device *pdev)
 {
 	struct ocmem *ocmem = platform_get_drvdata(pdev);
 
 	clk_disable_unprepare(ocmem->core_clk);
 	clk_disable_unprepare(ocmem->iface_clk);
-
-	return 0;
 }
 
 static const struct ocmem_config ocmem_8226_config = {
@@ -446,7 +444,7 @@ MODULE_DEVICE_TABLE(of, ocmem_of_match);
 
 static struct platform_driver ocmem_driver = {
 	.probe = ocmem_dev_probe,
-	.remove = ocmem_dev_remove,
+	.remove_new = ocmem_dev_remove,
 	.driver = {
 		.name = "ocmem",
 		.of_match_table = ocmem_of_match,
-- 
2.40.1


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

* [PATCH 21/40] soc/qcom: pmic_glink: Convert to platform remove callback returning void
  2023-09-25  9:54 ` Uwe Kleine-König
                   ` (22 preceding siblings ...)
  (?)
@ 2023-09-25  9:55 ` Uwe Kleine-König
  -1 siblings, 0 replies; 133+ messages in thread
From: Uwe Kleine-König @ 2023-09-25  9:55 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio
  Cc: linux-arm-msm, linux-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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

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/soc/qcom/pmic_glink.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/soc/qcom/pmic_glink.c b/drivers/soc/qcom/pmic_glink.c
index 61c89ddfc75b..914057331afd 100644
--- a/drivers/soc/qcom/pmic_glink.c
+++ b/drivers/soc/qcom/pmic_glink.c
@@ -318,7 +318,7 @@ static int pmic_glink_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int pmic_glink_remove(struct platform_device *pdev)
+static void pmic_glink_remove(struct platform_device *pdev)
 {
 	struct pmic_glink *pg = dev_get_drvdata(&pdev->dev);
 
@@ -334,8 +334,6 @@ static int pmic_glink_remove(struct platform_device *pdev)
 	mutex_lock(&__pmic_glink_lock);
 	__pmic_glink = NULL;
 	mutex_unlock(&__pmic_glink_lock);
-
-	return 0;
 }
 
 static const unsigned long pmic_glink_sm8450_client_mask = BIT(PMIC_GLINK_CLIENT_BATT) |
@@ -352,7 +350,7 @@ MODULE_DEVICE_TABLE(of, pmic_glink_of_match);
 
 static struct platform_driver pmic_glink_driver = {
 	.probe = pmic_glink_probe,
-	.remove = pmic_glink_remove,
+	.remove_new = pmic_glink_remove,
 	.driver = {
 		.name = "qcom_pmic_glink",
 		.of_match_table = pmic_glink_of_match,
-- 
2.40.1


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

* [PATCH 22/40] soc/qcom: qcom_aoss: Convert to platform remove callback returning void
  2023-09-25  9:54 ` Uwe Kleine-König
                   ` (23 preceding siblings ...)
  (?)
@ 2023-09-25  9:55 ` Uwe Kleine-König
  -1 siblings, 0 replies; 133+ messages in thread
From: Uwe Kleine-König @ 2023-09-25  9:55 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio
  Cc: linux-arm-msm, linux-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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

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/soc/qcom/qcom_aoss.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/soc/qcom/qcom_aoss.c b/drivers/soc/qcom/qcom_aoss.c
index 77f0cf126629..e6f16b0f6160 100644
--- a/drivers/soc/qcom/qcom_aoss.c
+++ b/drivers/soc/qcom/qcom_aoss.c
@@ -533,7 +533,7 @@ static int qmp_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int qmp_remove(struct platform_device *pdev)
+static void qmp_remove(struct platform_device *pdev)
 {
 	struct qmp *qmp = platform_get_drvdata(pdev);
 
@@ -542,8 +542,6 @@ static int qmp_remove(struct platform_device *pdev)
 
 	qmp_close(qmp);
 	mbox_free_channel(qmp->mbox_chan);
-
-	return 0;
 }
 
 static const struct of_device_id qmp_dt_match[] = {
@@ -565,7 +563,7 @@ static struct platform_driver qmp_driver = {
 		.suppress_bind_attrs = true,
 	},
 	.probe = qmp_probe,
-	.remove	= qmp_remove,
+	.remove_new = qmp_remove,
 };
 module_platform_driver(qmp_driver);
 
-- 
2.40.1


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

* [PATCH 23/40] soc/qcom: qcom_gsbi: Convert to platform remove callback returning void
  2023-09-25  9:54 ` Uwe Kleine-König
                   ` (24 preceding siblings ...)
  (?)
@ 2023-09-25  9:55 ` Uwe Kleine-König
  -1 siblings, 0 replies; 133+ messages in thread
From: Uwe Kleine-König @ 2023-09-25  9:55 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio
  Cc: linux-arm-msm, linux-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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

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/soc/qcom/qcom_gsbi.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/soc/qcom/qcom_gsbi.c b/drivers/soc/qcom/qcom_gsbi.c
index df7907a83aa8..f04b9a324ea9 100644
--- a/drivers/soc/qcom/qcom_gsbi.c
+++ b/drivers/soc/qcom/qcom_gsbi.c
@@ -212,13 +212,11 @@ static int gsbi_probe(struct platform_device *pdev)
 	return of_platform_populate(node, NULL, NULL, &pdev->dev);
 }
 
-static int gsbi_remove(struct platform_device *pdev)
+static void gsbi_remove(struct platform_device *pdev)
 {
 	struct gsbi_info *gsbi = platform_get_drvdata(pdev);
 
 	clk_disable_unprepare(gsbi->hclk);
-
-	return 0;
 }
 
 static const struct of_device_id gsbi_dt_match[] = {
@@ -234,7 +232,7 @@ static struct platform_driver gsbi_driver = {
 		.of_match_table	= gsbi_dt_match,
 	},
 	.probe = gsbi_probe,
-	.remove	= gsbi_remove,
+	.remove_new = gsbi_remove,
 };
 
 module_platform_driver(gsbi_driver);
-- 
2.40.1


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

* [PATCH 24/40] soc/qcom: qcom_stats: Convert to platform remove callback returning void
  2023-09-25  9:54 ` Uwe Kleine-König
                   ` (25 preceding siblings ...)
  (?)
@ 2023-09-25  9:55 ` Uwe Kleine-König
  -1 siblings, 0 replies; 133+ messages in thread
From: Uwe Kleine-König @ 2023-09-25  9:55 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio
  Cc: linux-arm-msm, linux-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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

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/soc/qcom/qcom_stats.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/soc/qcom/qcom_stats.c b/drivers/soc/qcom/qcom_stats.c
index c207bb96c523..0216fc24f2ca 100644
--- a/drivers/soc/qcom/qcom_stats.c
+++ b/drivers/soc/qcom/qcom_stats.c
@@ -216,13 +216,11 @@ static int qcom_stats_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int qcom_stats_remove(struct platform_device *pdev)
+static void qcom_stats_remove(struct platform_device *pdev)
 {
 	struct dentry *root = platform_get_drvdata(pdev);
 
 	debugfs_remove_recursive(root);
-
-	return 0;
 }
 
 static const struct stats_config rpm_data = {
@@ -272,7 +270,7 @@ MODULE_DEVICE_TABLE(of, qcom_stats_table);
 
 static struct platform_driver qcom_stats = {
 	.probe = qcom_stats_probe,
-	.remove = qcom_stats_remove,
+	.remove_new = qcom_stats_remove,
 	.driver = {
 		.name = "qcom_stats",
 		.of_match_table = qcom_stats_table,
-- 
2.40.1


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

* [PATCH 25/40] soc/qcom: rmtfs_mem: Convert to platform remove callback returning void
  2023-09-25  9:54 ` Uwe Kleine-König
                   ` (26 preceding siblings ...)
  (?)
@ 2023-09-25  9:55 ` Uwe Kleine-König
  -1 siblings, 0 replies; 133+ messages in thread
From: Uwe Kleine-König @ 2023-09-25  9:55 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio
  Cc: linux-arm-msm, linux-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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

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/soc/qcom/rmtfs_mem.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/soc/qcom/rmtfs_mem.c b/drivers/soc/qcom/rmtfs_mem.c
index f83811f51175..ab084b633ef0 100644
--- a/drivers/soc/qcom/rmtfs_mem.c
+++ b/drivers/soc/qcom/rmtfs_mem.c
@@ -281,7 +281,7 @@ static int qcom_rmtfs_mem_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int qcom_rmtfs_mem_remove(struct platform_device *pdev)
+static void qcom_rmtfs_mem_remove(struct platform_device *pdev)
 {
 	struct qcom_rmtfs_mem *rmtfs_mem = dev_get_drvdata(&pdev->dev);
 	struct qcom_scm_vmperm perm;
@@ -296,8 +296,6 @@ static int qcom_rmtfs_mem_remove(struct platform_device *pdev)
 
 	cdev_device_del(&rmtfs_mem->cdev, &rmtfs_mem->dev);
 	put_device(&rmtfs_mem->dev);
-
-	return 0;
 }
 
 static const struct of_device_id qcom_rmtfs_mem_of_match[] = {
@@ -308,7 +306,7 @@ MODULE_DEVICE_TABLE(of, qcom_rmtfs_mem_of_match);
 
 static struct platform_driver qcom_rmtfs_mem_driver = {
 	.probe = qcom_rmtfs_mem_probe,
-	.remove = qcom_rmtfs_mem_remove,
+	.remove_new = qcom_rmtfs_mem_remove,
 	.driver  = {
 		.name  = "qcom_rmtfs_mem",
 		.of_match_table = qcom_rmtfs_mem_of_match,
-- 
2.40.1


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

* [PATCH 26/40] soc/qcom: smem: Convert to platform remove callback returning void
  2023-09-25  9:54 ` Uwe Kleine-König
                   ` (27 preceding siblings ...)
  (?)
@ 2023-09-25  9:55 ` Uwe Kleine-König
  -1 siblings, 0 replies; 133+ messages in thread
From: Uwe Kleine-König @ 2023-09-25  9:55 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio
  Cc: linux-arm-msm, linux-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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

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/soc/qcom/smem.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/soc/qcom/smem.c b/drivers/soc/qcom/smem.c
index d4a89d2bb43b..58beeaab6fb4 100644
--- a/drivers/soc/qcom/smem.c
+++ b/drivers/soc/qcom/smem.c
@@ -1187,14 +1187,12 @@ static int qcom_smem_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int qcom_smem_remove(struct platform_device *pdev)
+static void qcom_smem_remove(struct platform_device *pdev)
 {
 	platform_device_unregister(__smem->socinfo);
 
 	hwspin_lock_free(__smem->hwlock);
 	__smem = NULL;
-
-	return 0;
 }
 
 static const struct of_device_id qcom_smem_of_match[] = {
@@ -1205,7 +1203,7 @@ MODULE_DEVICE_TABLE(of, qcom_smem_of_match);
 
 static struct platform_driver qcom_smem_driver = {
 	.probe = qcom_smem_probe,
-	.remove = qcom_smem_remove,
+	.remove_new = qcom_smem_remove,
 	.driver  = {
 		.name = "qcom-smem",
 		.of_match_table = qcom_smem_of_match,
-- 
2.40.1


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

* [PATCH 27/40] soc/qcom: smp2p: Convert to platform remove callback returning void
  2023-09-25  9:54 ` Uwe Kleine-König
                   ` (28 preceding siblings ...)
  (?)
@ 2023-09-25  9:55 ` Uwe Kleine-König
  -1 siblings, 0 replies; 133+ messages in thread
From: Uwe Kleine-König @ 2023-09-25  9:55 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio
  Cc: linux-arm-msm, linux-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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

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/soc/qcom/smp2p.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/soc/qcom/smp2p.c b/drivers/soc/qcom/smp2p.c
index e9c8030d50ee..914b2246148f 100644
--- a/drivers/soc/qcom/smp2p.c
+++ b/drivers/soc/qcom/smp2p.c
@@ -660,7 +660,7 @@ static int qcom_smp2p_probe(struct platform_device *pdev)
 	return -EINVAL;
 }
 
-static int qcom_smp2p_remove(struct platform_device *pdev)
+static void qcom_smp2p_remove(struct platform_device *pdev)
 {
 	struct qcom_smp2p *smp2p = platform_get_drvdata(pdev);
 	struct smp2p_entry *entry;
@@ -676,8 +676,6 @@ static int qcom_smp2p_remove(struct platform_device *pdev)
 	mbox_free_channel(smp2p->mbox_chan);
 
 	smp2p->out->valid_entries = 0;
-
-	return 0;
 }
 
 static const struct of_device_id qcom_smp2p_of_match[] = {
@@ -688,7 +686,7 @@ MODULE_DEVICE_TABLE(of, qcom_smp2p_of_match);
 
 static struct platform_driver qcom_smp2p_driver = {
 	.probe = qcom_smp2p_probe,
-	.remove = qcom_smp2p_remove,
+	.remove_new = qcom_smp2p_remove,
 	.driver  = {
 		.name  = "qcom_smp2p",
 		.of_match_table = qcom_smp2p_of_match,
-- 
2.40.1


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

* [PATCH 28/40] soc/qcom: smsm: Convert to platform remove callback returning void
  2023-09-25  9:54 ` Uwe Kleine-König
                   ` (29 preceding siblings ...)
  (?)
@ 2023-09-25  9:55 ` Uwe Kleine-König
  -1 siblings, 0 replies; 133+ messages in thread
From: Uwe Kleine-König @ 2023-09-25  9:55 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio
  Cc: linux-arm-msm, linux-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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

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/soc/qcom/smsm.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/soc/qcom/smsm.c b/drivers/soc/qcom/smsm.c
index c58cfff64856..e7c7e9a640a6 100644
--- a/drivers/soc/qcom/smsm.c
+++ b/drivers/soc/qcom/smsm.c
@@ -613,7 +613,7 @@ static int qcom_smsm_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int qcom_smsm_remove(struct platform_device *pdev)
+static void qcom_smsm_remove(struct platform_device *pdev)
 {
 	struct qcom_smsm *smsm = platform_get_drvdata(pdev);
 	unsigned id;
@@ -623,8 +623,6 @@ static int qcom_smsm_remove(struct platform_device *pdev)
 			irq_domain_remove(smsm->entries[id].domain);
 
 	qcom_smem_state_unregister(smsm->state);
-
-	return 0;
 }
 
 static const struct of_device_id qcom_smsm_of_match[] = {
@@ -635,7 +633,7 @@ MODULE_DEVICE_TABLE(of, qcom_smsm_of_match);
 
 static struct platform_driver qcom_smsm_driver = {
 	.probe = qcom_smsm_probe,
-	.remove = qcom_smsm_remove,
+	.remove_new = qcom_smsm_remove,
 	.driver  = {
 		.name  = "qcom-smsm",
 		.of_match_table = qcom_smsm_of_match,
-- 
2.40.1


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

* [PATCH 29/40] soc/qcom: socinfo: Convert to platform remove callback returning void
  2023-09-25  9:54 ` Uwe Kleine-König
                   ` (30 preceding siblings ...)
  (?)
@ 2023-09-25  9:55 ` Uwe Kleine-König
  -1 siblings, 0 replies; 133+ messages in thread
From: Uwe Kleine-König @ 2023-09-25  9:55 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio
  Cc: linux-arm-msm, linux-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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

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/soc/qcom/socinfo.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/soc/qcom/socinfo.c b/drivers/soc/qcom/socinfo.c
index 2a15983d9f60..51e05bec5bfc 100644
--- a/drivers/soc/qcom/socinfo.c
+++ b/drivers/soc/qcom/socinfo.c
@@ -787,20 +787,18 @@ static int qcom_socinfo_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int qcom_socinfo_remove(struct platform_device *pdev)
+static void qcom_socinfo_remove(struct platform_device *pdev)
 {
 	struct qcom_socinfo *qs = platform_get_drvdata(pdev);
 
 	soc_device_unregister(qs->soc_dev);
 
 	socinfo_debugfs_exit(qs);
-
-	return 0;
 }
 
 static struct platform_driver qcom_socinfo_driver = {
 	.probe = qcom_socinfo_probe,
-	.remove = qcom_socinfo_remove,
+	.remove_new = qcom_socinfo_remove,
 	.driver  = {
 		.name = "qcom-socinfo",
 	},
-- 
2.40.1


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

* [PATCH 30/40] soc/rockchip: io-domain: Convert to platform remove callback returning void
  2023-09-25  9:54 ` Uwe Kleine-König
  (?)
@ 2023-09-25  9:55   ` Uwe Kleine-König
  -1 siblings, 0 replies; 133+ messages in thread
From: Uwe Kleine-König @ 2023-09-25  9:55 UTC (permalink / raw)
  To: Heiko Stuebner; +Cc: linux-arm-kernel, linux-rockchip, linux-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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

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/soc/rockchip/io-domain.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/soc/rockchip/io-domain.c b/drivers/soc/rockchip/io-domain.c
index 6619256c2d11..18f809c160a7 100644
--- a/drivers/soc/rockchip/io-domain.c
+++ b/drivers/soc/rockchip/io-domain.c
@@ -687,7 +687,7 @@ static int rockchip_iodomain_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int rockchip_iodomain_remove(struct platform_device *pdev)
+static void rockchip_iodomain_remove(struct platform_device *pdev)
 {
 	struct rockchip_iodomain *iod = platform_get_drvdata(pdev);
 	int i;
@@ -699,13 +699,11 @@ static int rockchip_iodomain_remove(struct platform_device *pdev)
 			regulator_unregister_notifier(io_supply->reg,
 						      &io_supply->nb);
 	}
-
-	return 0;
 }
 
 static struct platform_driver rockchip_iodomain_driver = {
 	.probe   = rockchip_iodomain_probe,
-	.remove  = rockchip_iodomain_remove,
+	.remove_new = rockchip_iodomain_remove,
 	.driver  = {
 		.name  = "rockchip-iodomain",
 		.of_match_table = rockchip_iodomain_match,
-- 
2.40.1


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

* [PATCH 30/40] soc/rockchip: io-domain: Convert to platform remove callback returning void
@ 2023-09-25  9:55   ` Uwe Kleine-König
  0 siblings, 0 replies; 133+ messages in thread
From: Uwe Kleine-König @ 2023-09-25  9:55 UTC (permalink / raw)
  To: Heiko Stuebner; +Cc: linux-arm-kernel, linux-rockchip, linux-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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

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/soc/rockchip/io-domain.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/soc/rockchip/io-domain.c b/drivers/soc/rockchip/io-domain.c
index 6619256c2d11..18f809c160a7 100644
--- a/drivers/soc/rockchip/io-domain.c
+++ b/drivers/soc/rockchip/io-domain.c
@@ -687,7 +687,7 @@ static int rockchip_iodomain_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int rockchip_iodomain_remove(struct platform_device *pdev)
+static void rockchip_iodomain_remove(struct platform_device *pdev)
 {
 	struct rockchip_iodomain *iod = platform_get_drvdata(pdev);
 	int i;
@@ -699,13 +699,11 @@ static int rockchip_iodomain_remove(struct platform_device *pdev)
 			regulator_unregister_notifier(io_supply->reg,
 						      &io_supply->nb);
 	}
-
-	return 0;
 }
 
 static struct platform_driver rockchip_iodomain_driver = {
 	.probe   = rockchip_iodomain_probe,
-	.remove  = rockchip_iodomain_remove,
+	.remove_new = rockchip_iodomain_remove,
 	.driver  = {
 		.name  = "rockchip-iodomain",
 		.of_match_table = rockchip_iodomain_match,
-- 
2.40.1


_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

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

* [PATCH 30/40] soc/rockchip: io-domain: Convert to platform remove callback returning void
@ 2023-09-25  9:55   ` Uwe Kleine-König
  0 siblings, 0 replies; 133+ messages in thread
From: Uwe Kleine-König @ 2023-09-25  9:55 UTC (permalink / raw)
  To: Heiko Stuebner; +Cc: linux-arm-kernel, linux-rockchip, linux-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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

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/soc/rockchip/io-domain.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/soc/rockchip/io-domain.c b/drivers/soc/rockchip/io-domain.c
index 6619256c2d11..18f809c160a7 100644
--- a/drivers/soc/rockchip/io-domain.c
+++ b/drivers/soc/rockchip/io-domain.c
@@ -687,7 +687,7 @@ static int rockchip_iodomain_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int rockchip_iodomain_remove(struct platform_device *pdev)
+static void rockchip_iodomain_remove(struct platform_device *pdev)
 {
 	struct rockchip_iodomain *iod = platform_get_drvdata(pdev);
 	int i;
@@ -699,13 +699,11 @@ static int rockchip_iodomain_remove(struct platform_device *pdev)
 			regulator_unregister_notifier(io_supply->reg,
 						      &io_supply->nb);
 	}
-
-	return 0;
 }
 
 static struct platform_driver rockchip_iodomain_driver = {
 	.probe   = rockchip_iodomain_probe,
-	.remove  = rockchip_iodomain_remove,
+	.remove_new = rockchip_iodomain_remove,
 	.driver  = {
 		.name  = "rockchip-iodomain",
 		.of_match_table = rockchip_iodomain_match,
-- 
2.40.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 31/40] soc/samsung: exynos-chipid: Convert to platform remove callback returning void
  2023-09-25  9:54 ` Uwe Kleine-König
@ 2023-09-25  9:55   ` Uwe Kleine-König
  -1 siblings, 0 replies; 133+ messages in thread
From: Uwe Kleine-König @ 2023-09-25  9:55 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Alim Akhtar, linux-arm-kernel, linux-samsung-soc, linux-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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

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/soc/samsung/exynos-chipid.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/soc/samsung/exynos-chipid.c b/drivers/soc/samsung/exynos-chipid.c
index 7ba45c4aff97..3fd0f2b84dd3 100644
--- a/drivers/soc/samsung/exynos-chipid.c
+++ b/drivers/soc/samsung/exynos-chipid.c
@@ -158,13 +158,11 @@ static int exynos_chipid_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int exynos_chipid_remove(struct platform_device *pdev)
+static void exynos_chipid_remove(struct platform_device *pdev)
 {
 	struct soc_device *soc_dev = platform_get_drvdata(pdev);
 
 	soc_device_unregister(soc_dev);
-
-	return 0;
 }
 
 static const struct exynos_chipid_variant exynos4210_chipid_drv_data = {
@@ -197,7 +195,7 @@ static struct platform_driver exynos_chipid_driver = {
 		.of_match_table = exynos_chipid_of_device_ids,
 	},
 	.probe	= exynos_chipid_probe,
-	.remove	= exynos_chipid_remove,
+	.remove_new = exynos_chipid_remove,
 };
 module_platform_driver(exynos_chipid_driver);
 
-- 
2.40.1


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

* [PATCH 31/40] soc/samsung: exynos-chipid: Convert to platform remove callback returning void
@ 2023-09-25  9:55   ` Uwe Kleine-König
  0 siblings, 0 replies; 133+ messages in thread
From: Uwe Kleine-König @ 2023-09-25  9:55 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Alim Akhtar, linux-arm-kernel, linux-samsung-soc, linux-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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

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/soc/samsung/exynos-chipid.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/soc/samsung/exynos-chipid.c b/drivers/soc/samsung/exynos-chipid.c
index 7ba45c4aff97..3fd0f2b84dd3 100644
--- a/drivers/soc/samsung/exynos-chipid.c
+++ b/drivers/soc/samsung/exynos-chipid.c
@@ -158,13 +158,11 @@ static int exynos_chipid_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int exynos_chipid_remove(struct platform_device *pdev)
+static void exynos_chipid_remove(struct platform_device *pdev)
 {
 	struct soc_device *soc_dev = platform_get_drvdata(pdev);
 
 	soc_device_unregister(soc_dev);
-
-	return 0;
 }
 
 static const struct exynos_chipid_variant exynos4210_chipid_drv_data = {
@@ -197,7 +195,7 @@ static struct platform_driver exynos_chipid_driver = {
 		.of_match_table = exynos_chipid_of_device_ids,
 	},
 	.probe	= exynos_chipid_probe,
-	.remove	= exynos_chipid_remove,
+	.remove_new = exynos_chipid_remove,
 };
 module_platform_driver(exynos_chipid_driver);
 
-- 
2.40.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 32/40] soc/tegra: cbb: tegra194-cbb: Convert to platform remove callback returning void
  2023-09-25  9:54 ` Uwe Kleine-König
                   ` (33 preceding siblings ...)
  (?)
@ 2023-09-25  9:55 ` Uwe Kleine-König
  -1 siblings, 0 replies; 133+ messages in thread
From: Uwe Kleine-König @ 2023-09-25  9:55 UTC (permalink / raw)
  To: Thierry Reding, Jonathan Hunter, Sumit Gupta, Shang XiaoJing,
	Muhammad Usama Anjum, Rob Herring
  Cc: Nick Alcock, Yang Yingliang, linux-tegra, linux-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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

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/soc/tegra/cbb/tegra194-cbb.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/soc/tegra/cbb/tegra194-cbb.c b/drivers/soc/tegra/cbb/tegra194-cbb.c
index cf6886f362d3..9cbc562ae7d3 100644
--- a/drivers/soc/tegra/cbb/tegra194-cbb.c
+++ b/drivers/soc/tegra/cbb/tegra194-cbb.c
@@ -2293,7 +2293,7 @@ static int tegra194_cbb_probe(struct platform_device *pdev)
 	return tegra_cbb_register(&cbb->base);
 }
 
-static int tegra194_cbb_remove(struct platform_device *pdev)
+static void tegra194_cbb_remove(struct platform_device *pdev)
 {
 	struct tegra194_cbb *cbb = platform_get_drvdata(pdev);
 	struct tegra_cbb *noc, *tmp;
@@ -2311,8 +2311,6 @@ static int tegra194_cbb_remove(struct platform_device *pdev)
 	}
 
 	spin_unlock_irqrestore(&cbb_lock, flags);
-
-	return 0;
 }
 
 static int __maybe_unused tegra194_cbb_resume_noirq(struct device *dev)
@@ -2332,7 +2330,7 @@ static const struct dev_pm_ops tegra194_cbb_pm = {
 
 static struct platform_driver tegra194_cbb_driver = {
 	.probe = tegra194_cbb_probe,
-	.remove = tegra194_cbb_remove,
+	.remove_new = tegra194_cbb_remove,
 	.driver = {
 		.name = "tegra194-cbb",
 		.of_match_table = of_match_ptr(tegra194_cbb_match),
-- 
2.40.1


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

* [PATCH 33/40] soc/ti: k3-ringacc: Convert to platform remove callback returning void
  2023-09-25  9:54 ` Uwe Kleine-König
@ 2023-09-25  9:55   ` Uwe Kleine-König
  -1 siblings, 0 replies; 133+ messages in thread
From: Uwe Kleine-König @ 2023-09-25  9:55 UTC (permalink / raw)
  To: Nishanth Menon, Santosh Shilimkar; +Cc: linux-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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

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/soc/ti/k3-ringacc.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/soc/ti/k3-ringacc.c b/drivers/soc/ti/k3-ringacc.c
index 148f54d9691d..fd4251d75935 100644
--- a/drivers/soc/ti/k3-ringacc.c
+++ b/drivers/soc/ti/k3-ringacc.c
@@ -1551,19 +1551,18 @@ static int k3_ringacc_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int k3_ringacc_remove(struct platform_device *pdev)
+static void k3_ringacc_remove(struct platform_device *pdev)
 {
 	struct k3_ringacc *ringacc = dev_get_drvdata(&pdev->dev);
 
 	mutex_lock(&k3_ringacc_list_lock);
 	list_del(&ringacc->list);
 	mutex_unlock(&k3_ringacc_list_lock);
-	return 0;
 }
 
 static struct platform_driver k3_ringacc_driver = {
 	.probe		= k3_ringacc_probe,
-	.remove		= k3_ringacc_remove,
+	.remove_new	= k3_ringacc_remove,
 	.driver		= {
 		.name	= "k3-ringacc",
 		.of_match_table = k3_ringacc_of_match,
-- 
2.40.1


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

* [PATCH 33/40] soc/ti: k3-ringacc: Convert to platform remove callback returning void
@ 2023-09-25  9:55   ` Uwe Kleine-König
  0 siblings, 0 replies; 133+ messages in thread
From: Uwe Kleine-König @ 2023-09-25  9:55 UTC (permalink / raw)
  To: Nishanth Menon, Santosh Shilimkar; +Cc: linux-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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

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/soc/ti/k3-ringacc.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/soc/ti/k3-ringacc.c b/drivers/soc/ti/k3-ringacc.c
index 148f54d9691d..fd4251d75935 100644
--- a/drivers/soc/ti/k3-ringacc.c
+++ b/drivers/soc/ti/k3-ringacc.c
@@ -1551,19 +1551,18 @@ static int k3_ringacc_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int k3_ringacc_remove(struct platform_device *pdev)
+static void k3_ringacc_remove(struct platform_device *pdev)
 {
 	struct k3_ringacc *ringacc = dev_get_drvdata(&pdev->dev);
 
 	mutex_lock(&k3_ringacc_list_lock);
 	list_del(&ringacc->list);
 	mutex_unlock(&k3_ringacc_list_lock);
-	return 0;
 }
 
 static struct platform_driver k3_ringacc_driver = {
 	.probe		= k3_ringacc_probe,
-	.remove		= k3_ringacc_remove,
+	.remove_new	= k3_ringacc_remove,
 	.driver		= {
 		.name	= "k3-ringacc",
 		.of_match_table = k3_ringacc_of_match,
-- 
2.40.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 34/40] soc/ti: knav_dma: Convert to platform remove callback returning void
  2023-09-25  9:54 ` Uwe Kleine-König
@ 2023-09-25  9:55   ` Uwe Kleine-König
  -1 siblings, 0 replies; 133+ messages in thread
From: Uwe Kleine-König @ 2023-09-25  9:55 UTC (permalink / raw)
  To: Nishanth Menon, Santosh Shilimkar; +Cc: linux-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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

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/soc/ti/knav_dma.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/soc/ti/knav_dma.c b/drivers/soc/ti/knav_dma.c
index 0fbc37cd5123..6023006685fc 100644
--- a/drivers/soc/ti/knav_dma.c
+++ b/drivers/soc/ti/knav_dma.c
@@ -773,7 +773,7 @@ static int knav_dma_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int knav_dma_remove(struct platform_device *pdev)
+static void knav_dma_remove(struct platform_device *pdev)
 {
 	struct knav_dma_device *dma;
 
@@ -784,8 +784,6 @@ static int knav_dma_remove(struct platform_device *pdev)
 
 	pm_runtime_put_sync(&pdev->dev);
 	pm_runtime_disable(&pdev->dev);
-
-	return 0;
 }
 
 static struct of_device_id of_match[] = {
@@ -797,7 +795,7 @@ MODULE_DEVICE_TABLE(of, of_match);
 
 static struct platform_driver knav_dma_driver = {
 	.probe	= knav_dma_probe,
-	.remove	= knav_dma_remove,
+	.remove_new = knav_dma_remove,
 	.driver = {
 		.name		= "keystone-navigator-dma",
 		.of_match_table	= of_match,
-- 
2.40.1


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

* [PATCH 34/40] soc/ti: knav_dma: Convert to platform remove callback returning void
@ 2023-09-25  9:55   ` Uwe Kleine-König
  0 siblings, 0 replies; 133+ messages in thread
From: Uwe Kleine-König @ 2023-09-25  9:55 UTC (permalink / raw)
  To: Nishanth Menon, Santosh Shilimkar; +Cc: linux-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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

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/soc/ti/knav_dma.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/soc/ti/knav_dma.c b/drivers/soc/ti/knav_dma.c
index 0fbc37cd5123..6023006685fc 100644
--- a/drivers/soc/ti/knav_dma.c
+++ b/drivers/soc/ti/knav_dma.c
@@ -773,7 +773,7 @@ static int knav_dma_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int knav_dma_remove(struct platform_device *pdev)
+static void knav_dma_remove(struct platform_device *pdev)
 {
 	struct knav_dma_device *dma;
 
@@ -784,8 +784,6 @@ static int knav_dma_remove(struct platform_device *pdev)
 
 	pm_runtime_put_sync(&pdev->dev);
 	pm_runtime_disable(&pdev->dev);
-
-	return 0;
 }
 
 static struct of_device_id of_match[] = {
@@ -797,7 +795,7 @@ MODULE_DEVICE_TABLE(of, of_match);
 
 static struct platform_driver knav_dma_driver = {
 	.probe	= knav_dma_probe,
-	.remove	= knav_dma_remove,
+	.remove_new = knav_dma_remove,
 	.driver = {
 		.name		= "keystone-navigator-dma",
 		.of_match_table	= of_match,
-- 
2.40.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 35/40] soc/ti: knav_qmss_queue: Convert to platform remove callback returning void
  2023-09-25  9:54 ` Uwe Kleine-König
@ 2023-09-25  9:55   ` Uwe Kleine-König
  -1 siblings, 0 replies; 133+ messages in thread
From: Uwe Kleine-König @ 2023-09-25  9:55 UTC (permalink / raw)
  To: Nishanth Menon, Santosh Shilimkar; +Cc: linux-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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

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/soc/ti/knav_qmss_queue.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/soc/ti/knav_qmss_queue.c b/drivers/soc/ti/knav_qmss_queue.c
index 0f252c2549ba..cea791717957 100644
--- a/drivers/soc/ti/knav_qmss_queue.c
+++ b/drivers/soc/ti/knav_qmss_queue.c
@@ -1884,17 +1884,16 @@ static int knav_queue_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int knav_queue_remove(struct platform_device *pdev)
+static void knav_queue_remove(struct platform_device *pdev)
 {
 	/* TODO: Free resources */
 	pm_runtime_put_sync(&pdev->dev);
 	pm_runtime_disable(&pdev->dev);
-	return 0;
 }
 
 static struct platform_driver keystone_qmss_driver = {
 	.probe		= knav_queue_probe,
-	.remove		= knav_queue_remove,
+	.remove_new	= knav_queue_remove,
 	.driver		= {
 		.name	= "keystone-navigator-qmss",
 		.of_match_table = keystone_qmss_of_match,
-- 
2.40.1


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

* [PATCH 35/40] soc/ti: knav_qmss_queue: Convert to platform remove callback returning void
@ 2023-09-25  9:55   ` Uwe Kleine-König
  0 siblings, 0 replies; 133+ messages in thread
From: Uwe Kleine-König @ 2023-09-25  9:55 UTC (permalink / raw)
  To: Nishanth Menon, Santosh Shilimkar; +Cc: linux-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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

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/soc/ti/knav_qmss_queue.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/soc/ti/knav_qmss_queue.c b/drivers/soc/ti/knav_qmss_queue.c
index 0f252c2549ba..cea791717957 100644
--- a/drivers/soc/ti/knav_qmss_queue.c
+++ b/drivers/soc/ti/knav_qmss_queue.c
@@ -1884,17 +1884,16 @@ static int knav_queue_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int knav_queue_remove(struct platform_device *pdev)
+static void knav_queue_remove(struct platform_device *pdev)
 {
 	/* TODO: Free resources */
 	pm_runtime_put_sync(&pdev->dev);
 	pm_runtime_disable(&pdev->dev);
-	return 0;
 }
 
 static struct platform_driver keystone_qmss_driver = {
 	.probe		= knav_queue_probe,
-	.remove		= knav_queue_remove,
+	.remove_new	= knav_queue_remove,
 	.driver		= {
 		.name	= "keystone-navigator-qmss",
 		.of_match_table = keystone_qmss_of_match,
-- 
2.40.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 36/40] soc/ti: pm33xx: Convert to platform remove callback returning void
  2023-09-25  9:54 ` Uwe Kleine-König
@ 2023-09-25  9:55   ` Uwe Kleine-König
  -1 siblings, 0 replies; 133+ messages in thread
From: Uwe Kleine-König @ 2023-09-25  9:55 UTC (permalink / raw)
  To: Nishanth Menon, Santosh Shilimkar; +Cc: linux-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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

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/soc/ti/pm33xx.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/soc/ti/pm33xx.c b/drivers/soc/ti/pm33xx.c
index f04c21157904..8e983c3c4e03 100644
--- a/drivers/soc/ti/pm33xx.c
+++ b/drivers/soc/ti/pm33xx.c
@@ -583,7 +583,7 @@ static int am33xx_pm_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int am33xx_pm_remove(struct platform_device *pdev)
+static void am33xx_pm_remove(struct platform_device *pdev)
 {
 	pm_runtime_put_sync(&pdev->dev);
 	pm_runtime_disable(&pdev->dev);
@@ -594,7 +594,6 @@ static int am33xx_pm_remove(struct platform_device *pdev)
 	am33xx_pm_free_sram();
 	iounmap(rtc_base_virt);
 	clk_put(rtc_fck);
-	return 0;
 }
 
 static struct platform_driver am33xx_pm_driver = {
@@ -602,7 +601,7 @@ static struct platform_driver am33xx_pm_driver = {
 		.name   = "pm33xx",
 	},
 	.probe = am33xx_pm_probe,
-	.remove = am33xx_pm_remove,
+	.remove_new = am33xx_pm_remove,
 };
 module_platform_driver(am33xx_pm_driver);
 
-- 
2.40.1


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

* [PATCH 36/40] soc/ti: pm33xx: Convert to platform remove callback returning void
@ 2023-09-25  9:55   ` Uwe Kleine-König
  0 siblings, 0 replies; 133+ messages in thread
From: Uwe Kleine-König @ 2023-09-25  9:55 UTC (permalink / raw)
  To: Nishanth Menon, Santosh Shilimkar; +Cc: linux-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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

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/soc/ti/pm33xx.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/soc/ti/pm33xx.c b/drivers/soc/ti/pm33xx.c
index f04c21157904..8e983c3c4e03 100644
--- a/drivers/soc/ti/pm33xx.c
+++ b/drivers/soc/ti/pm33xx.c
@@ -583,7 +583,7 @@ static int am33xx_pm_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int am33xx_pm_remove(struct platform_device *pdev)
+static void am33xx_pm_remove(struct platform_device *pdev)
 {
 	pm_runtime_put_sync(&pdev->dev);
 	pm_runtime_disable(&pdev->dev);
@@ -594,7 +594,6 @@ static int am33xx_pm_remove(struct platform_device *pdev)
 	am33xx_pm_free_sram();
 	iounmap(rtc_base_virt);
 	clk_put(rtc_fck);
-	return 0;
 }
 
 static struct platform_driver am33xx_pm_driver = {
@@ -602,7 +601,7 @@ static struct platform_driver am33xx_pm_driver = {
 		.name   = "pm33xx",
 	},
 	.probe = am33xx_pm_probe,
-	.remove = am33xx_pm_remove,
+	.remove_new = am33xx_pm_remove,
 };
 module_platform_driver(am33xx_pm_driver);
 
-- 
2.40.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 37/40] soc/ti: pruss: Convert to platform remove callback returning void
  2023-09-25  9:54 ` Uwe Kleine-König
@ 2023-09-25  9:55   ` Uwe Kleine-König
  -1 siblings, 0 replies; 133+ messages in thread
From: Uwe Kleine-König @ 2023-09-25  9:55 UTC (permalink / raw)
  To: Nishanth Menon, Santosh Shilimkar; +Cc: linux-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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

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/soc/ti/pruss.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/soc/ti/pruss.c b/drivers/soc/ti/pruss.c
index f49f8492dde5..24a42e0b645c 100644
--- a/drivers/soc/ti/pruss.c
+++ b/drivers/soc/ti/pruss.c
@@ -565,7 +565,7 @@ static int pruss_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int pruss_remove(struct platform_device *pdev)
+static void pruss_remove(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
 
@@ -573,8 +573,6 @@ static int pruss_remove(struct platform_device *pdev)
 
 	pm_runtime_put_sync(dev);
 	pm_runtime_disable(dev);
-
-	return 0;
 }
 
 /* instance-specific driver private data */
@@ -610,7 +608,7 @@ static struct platform_driver pruss_driver = {
 		.of_match_table = pruss_of_match,
 	},
 	.probe  = pruss_probe,
-	.remove = pruss_remove,
+	.remove_new = pruss_remove,
 };
 module_platform_driver(pruss_driver);
 
-- 
2.40.1


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

* [PATCH 37/40] soc/ti: pruss: Convert to platform remove callback returning void
@ 2023-09-25  9:55   ` Uwe Kleine-König
  0 siblings, 0 replies; 133+ messages in thread
From: Uwe Kleine-König @ 2023-09-25  9:55 UTC (permalink / raw)
  To: Nishanth Menon, Santosh Shilimkar; +Cc: linux-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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

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/soc/ti/pruss.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/soc/ti/pruss.c b/drivers/soc/ti/pruss.c
index f49f8492dde5..24a42e0b645c 100644
--- a/drivers/soc/ti/pruss.c
+++ b/drivers/soc/ti/pruss.c
@@ -565,7 +565,7 @@ static int pruss_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int pruss_remove(struct platform_device *pdev)
+static void pruss_remove(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
 
@@ -573,8 +573,6 @@ static int pruss_remove(struct platform_device *pdev)
 
 	pm_runtime_put_sync(dev);
 	pm_runtime_disable(dev);
-
-	return 0;
 }
 
 /* instance-specific driver private data */
@@ -610,7 +608,7 @@ static struct platform_driver pruss_driver = {
 		.of_match_table = pruss_of_match,
 	},
 	.probe  = pruss_probe,
-	.remove = pruss_remove,
+	.remove_new = pruss_remove,
 };
 module_platform_driver(pruss_driver);
 
-- 
2.40.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 38/40] soc/ti: smartreflex: Convert to platform remove callback returning void
  2023-09-25  9:54 ` Uwe Kleine-König
@ 2023-09-25  9:55   ` Uwe Kleine-König
  -1 siblings, 0 replies; 133+ messages in thread
From: Uwe Kleine-König @ 2023-09-25  9:55 UTC (permalink / raw)
  To: Nishanth Menon, Santosh Shilimkar
  Cc: linux-kernel, linux-arm-kernel, linux-pm, 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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

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/soc/ti/smartreflex.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/soc/ti/smartreflex.c b/drivers/soc/ti/smartreflex.c
index 62b2f1464e46..d6219060b616 100644
--- a/drivers/soc/ti/smartreflex.c
+++ b/drivers/soc/ti/smartreflex.c
@@ -933,7 +933,7 @@ static int omap_sr_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int omap_sr_remove(struct platform_device *pdev)
+static void omap_sr_remove(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
 	struct omap_sr *sr_info = platform_get_drvdata(pdev);
@@ -945,7 +945,6 @@ static int omap_sr_remove(struct platform_device *pdev)
 	pm_runtime_disable(dev);
 	clk_unprepare(sr_info->fck);
 	list_del(&sr_info->node);
-	return 0;
 }
 
 static void omap_sr_shutdown(struct platform_device *pdev)
@@ -970,7 +969,7 @@ MODULE_DEVICE_TABLE(of, omap_sr_match);
 
 static struct platform_driver smartreflex_driver = {
 	.probe		= omap_sr_probe,
-	.remove         = omap_sr_remove,
+	.remove_new     = omap_sr_remove,
 	.shutdown	= omap_sr_shutdown,
 	.driver		= {
 		.name	= DRIVER_NAME,
-- 
2.40.1


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

* [PATCH 38/40] soc/ti: smartreflex: Convert to platform remove callback returning void
@ 2023-09-25  9:55   ` Uwe Kleine-König
  0 siblings, 0 replies; 133+ messages in thread
From: Uwe Kleine-König @ 2023-09-25  9:55 UTC (permalink / raw)
  To: Nishanth Menon, Santosh Shilimkar
  Cc: linux-kernel, linux-arm-kernel, linux-pm, 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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

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/soc/ti/smartreflex.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/soc/ti/smartreflex.c b/drivers/soc/ti/smartreflex.c
index 62b2f1464e46..d6219060b616 100644
--- a/drivers/soc/ti/smartreflex.c
+++ b/drivers/soc/ti/smartreflex.c
@@ -933,7 +933,7 @@ static int omap_sr_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int omap_sr_remove(struct platform_device *pdev)
+static void omap_sr_remove(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
 	struct omap_sr *sr_info = platform_get_drvdata(pdev);
@@ -945,7 +945,6 @@ static int omap_sr_remove(struct platform_device *pdev)
 	pm_runtime_disable(dev);
 	clk_unprepare(sr_info->fck);
 	list_del(&sr_info->node);
-	return 0;
 }
 
 static void omap_sr_shutdown(struct platform_device *pdev)
@@ -970,7 +969,7 @@ MODULE_DEVICE_TABLE(of, omap_sr_match);
 
 static struct platform_driver smartreflex_driver = {
 	.probe		= omap_sr_probe,
-	.remove         = omap_sr_remove,
+	.remove_new     = omap_sr_remove,
 	.shutdown	= omap_sr_shutdown,
 	.driver		= {
 		.name	= DRIVER_NAME,
-- 
2.40.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 39/40] soc/ti: wkup_m3_ipc: Convert to platform remove callback returning void
  2023-09-25  9:54 ` Uwe Kleine-König
@ 2023-09-25  9:55   ` Uwe Kleine-König
  -1 siblings, 0 replies; 133+ messages in thread
From: Uwe Kleine-König @ 2023-09-25  9:55 UTC (permalink / raw)
  To: Nishanth Menon, Santosh Shilimkar; +Cc: linux-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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

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/soc/ti/wkup_m3_ipc.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/soc/ti/wkup_m3_ipc.c b/drivers/soc/ti/wkup_m3_ipc.c
index 3aff106fc11a..6a1c6b34c414 100644
--- a/drivers/soc/ti/wkup_m3_ipc.c
+++ b/drivers/soc/ti/wkup_m3_ipc.c
@@ -713,7 +713,7 @@ static int wkup_m3_ipc_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int wkup_m3_ipc_remove(struct platform_device *pdev)
+static void wkup_m3_ipc_remove(struct platform_device *pdev)
 {
 	wkup_m3_ipc_dbg_destroy(m3_ipc_state);
 
@@ -723,8 +723,6 @@ static int wkup_m3_ipc_remove(struct platform_device *pdev)
 	rproc_put(m3_ipc_state->rproc);
 
 	m3_ipc_state = NULL;
-
-	return 0;
 }
 
 static int __maybe_unused wkup_m3_ipc_suspend(struct device *dev)
@@ -760,7 +758,7 @@ MODULE_DEVICE_TABLE(of, wkup_m3_ipc_of_match);
 
 static struct platform_driver wkup_m3_ipc_driver = {
 	.probe = wkup_m3_ipc_probe,
-	.remove = wkup_m3_ipc_remove,
+	.remove_new = wkup_m3_ipc_remove,
 	.driver = {
 		.name = "wkup_m3_ipc",
 		.of_match_table = wkup_m3_ipc_of_match,
-- 
2.40.1


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

* [PATCH 39/40] soc/ti: wkup_m3_ipc: Convert to platform remove callback returning void
@ 2023-09-25  9:55   ` Uwe Kleine-König
  0 siblings, 0 replies; 133+ messages in thread
From: Uwe Kleine-König @ 2023-09-25  9:55 UTC (permalink / raw)
  To: Nishanth Menon, Santosh Shilimkar; +Cc: linux-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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

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/soc/ti/wkup_m3_ipc.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/soc/ti/wkup_m3_ipc.c b/drivers/soc/ti/wkup_m3_ipc.c
index 3aff106fc11a..6a1c6b34c414 100644
--- a/drivers/soc/ti/wkup_m3_ipc.c
+++ b/drivers/soc/ti/wkup_m3_ipc.c
@@ -713,7 +713,7 @@ static int wkup_m3_ipc_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int wkup_m3_ipc_remove(struct platform_device *pdev)
+static void wkup_m3_ipc_remove(struct platform_device *pdev)
 {
 	wkup_m3_ipc_dbg_destroy(m3_ipc_state);
 
@@ -723,8 +723,6 @@ static int wkup_m3_ipc_remove(struct platform_device *pdev)
 	rproc_put(m3_ipc_state->rproc);
 
 	m3_ipc_state = NULL;
-
-	return 0;
 }
 
 static int __maybe_unused wkup_m3_ipc_suspend(struct device *dev)
@@ -760,7 +758,7 @@ MODULE_DEVICE_TABLE(of, wkup_m3_ipc_of_match);
 
 static struct platform_driver wkup_m3_ipc_driver = {
 	.probe = wkup_m3_ipc_probe,
-	.remove = wkup_m3_ipc_remove,
+	.remove_new = wkup_m3_ipc_remove,
 	.driver = {
 		.name = "wkup_m3_ipc",
 		.of_match_table = wkup_m3_ipc_of_match,
-- 
2.40.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 40/40] soc/xilinx: zynqmp_power: Convert to platform remove callback returning void
  2023-09-25  9:54 ` Uwe Kleine-König
@ 2023-09-25  9:55   ` Uwe Kleine-König
  -1 siblings, 0 replies; 133+ messages in thread
From: Uwe Kleine-König @ 2023-09-25  9:55 UTC (permalink / raw)
  To: Michal Simek
  Cc: Rob Herring, Ruan Jinjie, Arnd Bergmann, linux-arm-kernel,
	linux-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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

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/soc/xilinx/zynqmp_power.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/soc/xilinx/zynqmp_power.c b/drivers/soc/xilinx/zynqmp_power.c
index c2c819701eec..9d27f850f491 100644
--- a/drivers/soc/xilinx/zynqmp_power.c
+++ b/drivers/soc/xilinx/zynqmp_power.c
@@ -275,7 +275,7 @@ static int zynqmp_pm_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int zynqmp_pm_remove(struct platform_device *pdev)
+static void zynqmp_pm_remove(struct platform_device *pdev)
 {
 	sysfs_remove_file(&pdev->dev.kobj, &dev_attr_suspend_mode.attr);
 	if (event_registered)
@@ -283,8 +283,6 @@ static int zynqmp_pm_remove(struct platform_device *pdev)
 
 	if (!rx_chan)
 		mbox_free_channel(rx_chan);
-
-	return 0;
 }
 
 static const struct of_device_id pm_of_match[] = {
@@ -295,7 +293,7 @@ MODULE_DEVICE_TABLE(of, pm_of_match);
 
 static struct platform_driver zynqmp_pm_platform_driver = {
 	.probe = zynqmp_pm_probe,
-	.remove = zynqmp_pm_remove,
+	.remove_new = zynqmp_pm_remove,
 	.driver = {
 		.name = "zynqmp_power",
 		.of_match_table = pm_of_match,
-- 
2.40.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 40/40] soc/xilinx: zynqmp_power: Convert to platform remove callback returning void
@ 2023-09-25  9:55   ` Uwe Kleine-König
  0 siblings, 0 replies; 133+ messages in thread
From: Uwe Kleine-König @ 2023-09-25  9:55 UTC (permalink / raw)
  To: Michal Simek
  Cc: Rob Herring, Ruan Jinjie, Arnd Bergmann, linux-arm-kernel,
	linux-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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

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/soc/xilinx/zynqmp_power.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/soc/xilinx/zynqmp_power.c b/drivers/soc/xilinx/zynqmp_power.c
index c2c819701eec..9d27f850f491 100644
--- a/drivers/soc/xilinx/zynqmp_power.c
+++ b/drivers/soc/xilinx/zynqmp_power.c
@@ -275,7 +275,7 @@ static int zynqmp_pm_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int zynqmp_pm_remove(struct platform_device *pdev)
+static void zynqmp_pm_remove(struct platform_device *pdev)
 {
 	sysfs_remove_file(&pdev->dev.kobj, &dev_attr_suspend_mode.attr);
 	if (event_registered)
@@ -283,8 +283,6 @@ static int zynqmp_pm_remove(struct platform_device *pdev)
 
 	if (!rx_chan)
 		mbox_free_channel(rx_chan);
-
-	return 0;
 }
 
 static const struct of_device_id pm_of_match[] = {
@@ -295,7 +293,7 @@ MODULE_DEVICE_TABLE(of, pm_of_match);
 
 static struct platform_driver zynqmp_pm_platform_driver = {
 	.probe = zynqmp_pm_probe,
-	.remove = zynqmp_pm_remove,
+	.remove_new = zynqmp_pm_remove,
 	.driver = {
 		.name = "zynqmp_power",
 		.of_match_table = pm_of_match,
-- 
2.40.1


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

* Re: [PATCH 18/40] soc/qcom: icc-bwmon: Convert to platform remove callback returning void
  2023-09-25  9:55 ` [PATCH 18/40] soc/qcom: icc-bwmon: " Uwe Kleine-König
@ 2023-09-25  9:57   ` Konrad Dybcio
  2023-09-25 10:39   ` Krzysztof Kozlowski
  1 sibling, 0 replies; 133+ messages in thread
From: Konrad Dybcio @ 2023-09-25  9:57 UTC (permalink / raw)
  To: Uwe Kleine-König, Krzysztof Kozlowski, Andy Gross, Bjorn Andersson
  Cc: linux-arm-msm, linux-kernel, kernel

On 25.09.2023 11:55, 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 ignored (apart
> from emitting a warning) 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. Eventually after all drivers
> are converted, .remove_new() will be renamed to .remove().
> 
> 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: Konrad Dybcio <konrad.dybcio@linaro.org>

Konrad

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

* Re: [PATCH 19/40] soc/qcom: llcc-qcom: Convert to platform remove callback returning void
  2023-09-25  9:55 ` [PATCH 19/40] soc/qcom: llcc-qcom: " Uwe Kleine-König
@ 2023-09-25  9:58   ` Konrad Dybcio
  0 siblings, 0 replies; 133+ messages in thread
From: Konrad Dybcio @ 2023-09-25  9:58 UTC (permalink / raw)
  To: Uwe Kleine-König, Andy Gross, Bjorn Andersson
  Cc: linux-arm-msm, linux-kernel, kernel

On 25.09.2023 11:55, 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 ignored (apart
> from emitting a warning) 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. Eventually after all drivers
> are converted, .remove_new() will be renamed to .remove().
> 
> 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: Konrad Dybcio <konrad.dybcio@linaro.org>

Konrad

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

* Re: [PATCH 20/40] soc/qcom: ocmem: Convert to platform remove callback returning void
  2023-09-25  9:55 ` [PATCH 20/40] soc/qcom: ocmem: " Uwe Kleine-König
@ 2023-09-25  9:58   ` Konrad Dybcio
  0 siblings, 0 replies; 133+ messages in thread
From: Konrad Dybcio @ 2023-09-25  9:58 UTC (permalink / raw)
  To: Uwe Kleine-König, Andy Gross, Bjorn Andersson
  Cc: linux-arm-msm, linux-kernel, kernel

On 25.09.2023 11:55, 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 ignored (apart
> from emitting a warning) 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. Eventually after all drivers
> are converted, .remove_new() will be renamed to .remove().
> 
> 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: Konrad Dybcio <konrad.dybcio@linaro.org>

Konrad

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

* Re: [PATCH 00/40] soc: Convert to platform remove callback returning void
  2023-09-25  9:54 ` Uwe Kleine-König
  (?)
  (?)
@ 2023-09-25  9:58   ` Konrad Dybcio
  -1 siblings, 0 replies; 133+ messages in thread
From: Konrad Dybcio @ 2023-09-25  9:58 UTC (permalink / raw)
  To: Uwe Kleine-König, Joel Stanley, Li Yang, Herve Codina,
	Qiang Zhao, Hitomi Hasegawa, Huisong Li, Krzysztof Halasa,
	Karol Gugala, Mateusz Holenko, Gabriel Somlo, Yinbo Zhu,
	Matthias Brugger, Conor Dooley, Daire McNamara,
	Krzysztof Kozlowski, Andy Gross, Bjorn Andersson, Heiko Stuebner,
	Thierry Reding, Jonathan Hunter, Sumit Gupta, Shang XiaoJing,
	Muhammad Usama Anjum, Rob Herring, Nishanth Menon,
	Santosh Shilimkar, Michal Simek
  Cc: Andrew Jeffery, linux-arm-kernel, linux-aspeed, linux-kernel,
	Arnd Bergmann, Zev Weiss, linuxppc-dev, loongarch,
	AngeloGioacchino Del Regno, linux-mediatek, linux-riscv,
	zhang songyi, Lubomir Rintel, linux-arm-msm, linux-rockchip,
	Alim Akhtar, linux-samsung-soc, Nick Alcock, Yang Yingliang,
	linux-tegra, linux-pm, Ruan Jinjie, kernel

On 25.09.2023 11:54, Uwe Kleine-König wrote:
> Hello,
> 
> this series converts all platform drivers below drivers/soc to use
> .remove_new(). The motivation is to get rid of an integer return code
> that is (mostly) ignored by the platform driver core and error prone on
> the driver side.
> 
> See commit 5c5a7680e67b ("platform: Provide a remove callback that
> returns no value") for an extended explanation and the eventual goal.
>
Acked-by: Konrad Dybcio <konrad.dybcio@linaro.org> # qcom

Konrad

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

* Re: [PATCH 00/40] soc: Convert to platform remove callback returning void
@ 2023-09-25  9:58   ` Konrad Dybcio
  0 siblings, 0 replies; 133+ messages in thread
From: Konrad Dybcio @ 2023-09-25  9:58 UTC (permalink / raw)
  To: Uwe Kleine-König, Joel Stanley, Li Yang, Herve Codina,
	Qiang Zhao, Hitomi Hasegawa, Huisong Li, Krzysztof Halasa,
	Karol Gugala, Mateusz Holenko, Gabriel Somlo, Yinbo Zhu,
	Matthias Brugger, Conor Dooley, Daire McNamara,
	Krzysztof Kozlowski, Andy Gross, Bjorn Andersson, Heiko Stuebner,
	Thierry Reding, Jonathan Hunter, Sumit Gupta, Shang XiaoJing,
	Muhammad Usama Anjum, Rob Herring, Nishanth Menon,
	Santosh Shilimkar, Michal Simek
  Cc: Andrew Jeffery, linux-arm-kernel, linux-aspeed, linux-kernel,
	Arnd Bergmann, Zev Weiss, linuxppc-dev, loongarch,
	AngeloGioacchino Del Regno, linux-mediatek, linux-riscv,
	zhang songyi, Lubomir Rintel, linux-arm-msm, linux-rockchip,
	Alim Akhtar, linux-samsung-soc, Nick Alcock, Yang Yingliang,
	linux-tegra, linux-pm, Ruan Jinjie, kernel

On 25.09.2023 11:54, Uwe Kleine-König wrote:
> Hello,
> 
> this series converts all platform drivers below drivers/soc to use
> .remove_new(). The motivation is to get rid of an integer return code
> that is (mostly) ignored by the platform driver core and error prone on
> the driver side.
> 
> See commit 5c5a7680e67b ("platform: Provide a remove callback that
> returns no value") for an extended explanation and the eventual goal.
>
Acked-by: Konrad Dybcio <konrad.dybcio@linaro.org> # qcom

Konrad

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* Re: [PATCH 00/40] soc: Convert to platform remove callback returning void
@ 2023-09-25  9:58   ` Konrad Dybcio
  0 siblings, 0 replies; 133+ messages in thread
From: Konrad Dybcio @ 2023-09-25  9:58 UTC (permalink / raw)
  To: Uwe Kleine-König, Joel Stanley, Li Yang, Herve Codina,
	Qiang Zhao, Hitomi Hasegawa, Huisong Li, Krzysztof Halasa,
	Karol Gugala, Mateusz Holenko, Gabriel Somlo, Yinbo Zhu,
	Matthias Brugger, Conor Dooley, Daire McNamara,
	Krzysztof Kozlowski, Andy Gross, Bjorn Andersson, Heiko Stuebner,
	Thierry Reding, Jonathan Hunter, Sumit Gupta, Shang XiaoJing,
	Muhammad Usama Anjum, Rob Herring, Nishanth Menon,
	Santosh Shilimkar, Michal Simek
  Cc: Andrew Jeffery, linux-arm-kernel, linux-aspeed, linux-kernel,
	Arnd Bergmann, Zev Weiss, linuxppc-dev, loongarch,
	AngeloGioacchino Del Regno, linux-mediatek, linux-riscv,
	zhang songyi, Lubomir Rintel, linux-arm-msm, linux-rockchip,
	Alim Akhtar, linux-samsung-soc, Nick Alcock, Yang Yingliang,
	linux-tegra, linux-pm, Ruan Jinjie, kernel

On 25.09.2023 11:54, Uwe Kleine-König wrote:
> Hello,
> 
> this series converts all platform drivers below drivers/soc to use
> .remove_new(). The motivation is to get rid of an integer return code
> that is (mostly) ignored by the platform driver core and error prone on
> the driver side.
> 
> See commit 5c5a7680e67b ("platform: Provide a remove callback that
> returns no value") for an extended explanation and the eventual goal.
>
Acked-by: Konrad Dybcio <konrad.dybcio@linaro.org> # qcom

Konrad

_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

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

* Re: [PATCH 00/40] soc: Convert to platform remove callback returning void
@ 2023-09-25  9:58   ` Konrad Dybcio
  0 siblings, 0 replies; 133+ messages in thread
From: Konrad Dybcio @ 2023-09-25  9:58 UTC (permalink / raw)
  To: Uwe Kleine-König, Joel Stanley, Li Yang, Herve Codina,
	Qiang Zhao, Hitomi Hasegawa, Huisong Li, Krzysztof Halasa,
	Karol Gugala, Mateusz Holenko, Gabriel Somlo, Yinbo Zhu,
	Matthias Brugger, Conor Dooley, Daire McNamara,
	Krzysztof Kozlowski, Andy Gross, Bjorn Andersson, Heiko Stuebner,
	Thierry Reding, Jonathan Hunter, Sumit Gupta, Shang XiaoJing,
	Muhammad Usama Anjum, Rob Herring, Nishanth Menon,
	Santosh Shilimkar, Michal Simek
  Cc: Zev Weiss, Alim Akhtar, linux-riscv, linux-samsung-soc,
	linux-aspeed, Ruan Jinjie, linux-rockchip, Yang Yingliang,
	Nick Alcock, Arnd Bergmann, linux-pm, linux-arm-msm,
	Lubomir Rintel, linux-mediatek, loongarch, linux-tegra,
	linux-arm-kernel, AngeloGioacchino Del Regno, Andrew Jeffery,
	linux-kernel, kernel, zhang songyi, linuxppc-dev

On 25.09.2023 11:54, Uwe Kleine-König wrote:
> Hello,
> 
> this series converts all platform drivers below drivers/soc to use
> .remove_new(). The motivation is to get rid of an integer return code
> that is (mostly) ignored by the platform driver core and error prone on
> the driver side.
> 
> See commit 5c5a7680e67b ("platform: Provide a remove callback that
> returns no value") for an extended explanation and the eventual goal.
>
Acked-by: Konrad Dybcio <konrad.dybcio@linaro.org> # qcom

Konrad

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

* Re: [PATCH 16/40] soc/microchip: mpfs-sys-controller: Convert to platform remove callback returning void
  2023-09-25  9:55   ` Uwe Kleine-König
@ 2023-09-25 10:20     ` Conor Dooley
  -1 siblings, 0 replies; 133+ messages in thread
From: Conor Dooley @ 2023-09-25 10:20 UTC (permalink / raw)
  To: Uwe Kleine-König; +Cc: Daire McNamara, linux-riscv, linux-kernel, kernel

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

On Mon, Sep 25, 2023 at 11:55:07AM +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 ignored (apart
> from emitting a warning) 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. Eventually after all drivers
> are converted, .remove_new() will be renamed to .remove().
> 
> 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>

Applied with some cosmetic changes to the commit message, thanks!

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

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

* Re: [PATCH 16/40] soc/microchip: mpfs-sys-controller: Convert to platform remove callback returning void
@ 2023-09-25 10:20     ` Conor Dooley
  0 siblings, 0 replies; 133+ messages in thread
From: Conor Dooley @ 2023-09-25 10:20 UTC (permalink / raw)
  To: Uwe Kleine-König; +Cc: Daire McNamara, linux-riscv, linux-kernel, kernel


[-- Attachment #1.1: Type: text/plain, Size: 904 bytes --]

On Mon, Sep 25, 2023 at 11:55:07AM +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 ignored (apart
> from emitting a warning) 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. Eventually after all drivers
> are converted, .remove_new() will be renamed to .remove().
> 
> 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>

Applied with some cosmetic changes to the commit message, thanks!

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

[-- Attachment #2: Type: text/plain, Size: 161 bytes --]

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* Re: [PATCH 18/40] soc/qcom: icc-bwmon: Convert to platform remove callback returning void
  2023-09-25  9:55 ` [PATCH 18/40] soc/qcom: icc-bwmon: " Uwe Kleine-König
  2023-09-25  9:57   ` Konrad Dybcio
@ 2023-09-25 10:39   ` Krzysztof Kozlowski
  1 sibling, 0 replies; 133+ messages in thread
From: Krzysztof Kozlowski @ 2023-09-25 10:39 UTC (permalink / raw)
  To: Uwe Kleine-König, Andy Gross, Bjorn Andersson, Konrad Dybcio
  Cc: linux-arm-msm, linux-kernel, kernel

On 25/09/2023 11:55, 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 ignored (apart
> from emitting a warning) 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. Eventually after all drivers
> are converted, .remove_new() will be renamed to .remove().
> 
> 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] 133+ messages in thread

* Re: [PATCH 12/40] soc/litex: litex_soc_ctrl: Convert to platform remove callback returning void
  2023-09-25  9:55 ` [PATCH 12/40] soc/litex: litex_soc_ctrl: " Uwe Kleine-König
@ 2023-09-25 13:03   ` Gabriel L. Somlo
  0 siblings, 0 replies; 133+ messages in thread
From: Gabriel L. Somlo @ 2023-09-25 13:03 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Karol Gugala, Mateusz Holenko, Joel Stanley, linux-kernel, kernel

On Mon, Sep 25, 2023 at 11:55:03AM +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 ignored (apart
> from emitting a warning) 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. Eventually after all drivers
> are converted, .remove_new() will be renamed to .remove().
> 
> 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!
Acked-by: Gabriel Somlo <gsomlo@gmail.com>

> ---
>  drivers/soc/litex/litex_soc_ctrl.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/soc/litex/litex_soc_ctrl.c b/drivers/soc/litex/litex_soc_ctrl.c
> index f75790091d38..10813299aa10 100644
> --- a/drivers/soc/litex/litex_soc_ctrl.c
> +++ b/drivers/soc/litex/litex_soc_ctrl.c
> @@ -120,12 +120,11 @@ static int litex_soc_ctrl_probe(struct platform_device *pdev)
>  	return 0;
>  }
>  
> -static int litex_soc_ctrl_remove(struct platform_device *pdev)
> +static void litex_soc_ctrl_remove(struct platform_device *pdev)
>  {
>  	struct litex_soc_ctrl_device *soc_ctrl_dev = platform_get_drvdata(pdev);
>  
>  	unregister_restart_handler(&soc_ctrl_dev->reset_nb);
> -	return 0;
>  }
>  
>  static struct platform_driver litex_soc_ctrl_driver = {
> @@ -134,7 +133,7 @@ static struct platform_driver litex_soc_ctrl_driver = {
>  		.of_match_table = of_match_ptr(litex_soc_ctrl_of_match)
>  	},
>  	.probe = litex_soc_ctrl_probe,
> -	.remove = litex_soc_ctrl_remove,
> +	.remove_new = litex_soc_ctrl_remove,
>  };
>  
>  module_platform_driver(litex_soc_ctrl_driver);
> -- 
> 2.40.1
> 

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

* Re: [PATCH 02/40] soc/aspeed: aspeed-lpc-snoop: Convert to platform remove callback returning void
  2023-09-25  9:54   ` Uwe Kleine-König
@ 2023-09-26  1:30     ` Andrew Jeffery
  -1 siblings, 0 replies; 133+ messages in thread
From: Andrew Jeffery @ 2023-09-26  1:30 UTC (permalink / raw)
  To: Uwe Kleine-König, Joel Stanley
  Cc: Rob Herring, Arnd Bergmann, linux-arm-kernel, linux-aspeed,
	linux-kernel, Pengutronix Kernel Team



On Mon, 25 Sep 2023, at 19:24, 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 ignored (apart
> from emitting a warning) 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. Eventually after all drivers
> are converted, .remove_new() will be renamed to .remove().
>
> 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: Andrew Jeffery <andrew@aj.id.au>

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

* Re: [PATCH 02/40] soc/aspeed: aspeed-lpc-snoop: Convert to platform remove callback returning void
@ 2023-09-26  1:30     ` Andrew Jeffery
  0 siblings, 0 replies; 133+ messages in thread
From: Andrew Jeffery @ 2023-09-26  1:30 UTC (permalink / raw)
  To: Uwe Kleine-König, Joel Stanley
  Cc: Rob Herring, Arnd Bergmann, linux-arm-kernel, linux-aspeed,
	linux-kernel, Pengutronix Kernel Team



On Mon, 25 Sep 2023, at 19:24, 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 ignored (apart
> from emitting a warning) 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. Eventually after all drivers
> are converted, .remove_new() will be renamed to .remove().
>
> 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: Andrew Jeffery <andrew@aj.id.au>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 04/40] soc/aspeed: aspeed-uart-routing: Convert to platform remove callback returning void
  2023-09-25  9:54   ` Uwe Kleine-König
@ 2023-09-26  1:31     ` Andrew Jeffery
  -1 siblings, 0 replies; 133+ messages in thread
From: Andrew Jeffery @ 2023-09-26  1:31 UTC (permalink / raw)
  To: Uwe Kleine-König, Joel Stanley
  Cc: Arnd Bergmann, Rob Herring, Zev Weiss, linux-arm-kernel,
	linux-aspeed, linux-kernel, Pengutronix Kernel Team



On Mon, 25 Sep 2023, at 19:24, 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 ignored (apart
> from emitting a warning) 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. Eventually after all drivers
> are converted, .remove_new() will be renamed to .remove().
>
> 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: Andrew Jeffery <andrew@aj.id.au>

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

* Re: [PATCH 04/40] soc/aspeed: aspeed-uart-routing: Convert to platform remove callback returning void
@ 2023-09-26  1:31     ` Andrew Jeffery
  0 siblings, 0 replies; 133+ messages in thread
From: Andrew Jeffery @ 2023-09-26  1:31 UTC (permalink / raw)
  To: Uwe Kleine-König, Joel Stanley
  Cc: Arnd Bergmann, Rob Herring, Zev Weiss, linux-arm-kernel,
	linux-aspeed, linux-kernel, Pengutronix Kernel Team



On Mon, 25 Sep 2023, at 19:24, 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 ignored (apart
> from emitting a warning) 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. Eventually after all drivers
> are converted, .remove_new() will be renamed to .remove().
>
> 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: Andrew Jeffery <andrew@aj.id.au>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 03/40] soc/aspeed: aspeed-p2a-ctrl: Convert to platform remove callback returning void
  2023-09-25  9:54   ` Uwe Kleine-König
@ 2023-09-26  1:32     ` Andrew Jeffery
  -1 siblings, 0 replies; 133+ messages in thread
From: Andrew Jeffery @ 2023-09-26  1:32 UTC (permalink / raw)
  To: Uwe Kleine-König, Joel Stanley
  Cc: Rob Herring, Arnd Bergmann, linux-arm-kernel, linux-aspeed,
	linux-kernel, Pengutronix Kernel Team



On Mon, 25 Sep 2023, at 19:24, 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 ignored (apart
> from emitting a warning) 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. Eventually after all drivers
> are converted, .remove_new() will be renamed to .remove().
>
> 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: Andrew Jeffery <andrew@aj.id.au>

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

* Re: [PATCH 03/40] soc/aspeed: aspeed-p2a-ctrl: Convert to platform remove callback returning void
@ 2023-09-26  1:32     ` Andrew Jeffery
  0 siblings, 0 replies; 133+ messages in thread
From: Andrew Jeffery @ 2023-09-26  1:32 UTC (permalink / raw)
  To: Uwe Kleine-König, Joel Stanley
  Cc: Rob Herring, Arnd Bergmann, linux-arm-kernel, linux-aspeed,
	linux-kernel, Pengutronix Kernel Team



On Mon, 25 Sep 2023, at 19:24, 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 ignored (apart
> from emitting a warning) 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. Eventually after all drivers
> are converted, .remove_new() will be renamed to .remove().
>
> 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: Andrew Jeffery <andrew@aj.id.au>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 01/40] soc/aspeed: aspeed-lpc-ctrl: Convert to platform remove callback returning void
  2023-09-25  9:54   ` Uwe Kleine-König
@ 2023-09-26  1:33     ` Andrew Jeffery
  -1 siblings, 0 replies; 133+ messages in thread
From: Andrew Jeffery @ 2023-09-26  1:33 UTC (permalink / raw)
  To: Uwe Kleine-König, Joel Stanley
  Cc: linux-arm-kernel, linux-aspeed, linux-kernel, Pengutronix Kernel Team



On Mon, 25 Sep 2023, at 19:24, 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 ignored (apart
> from emitting a warning) 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. Eventually after all drivers
> are converted, .remove_new() will be renamed to .remove().
>
> 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: Andrew Jeffery <andrew@aj.id.au>

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

* Re: [PATCH 01/40] soc/aspeed: aspeed-lpc-ctrl: Convert to platform remove callback returning void
@ 2023-09-26  1:33     ` Andrew Jeffery
  0 siblings, 0 replies; 133+ messages in thread
From: Andrew Jeffery @ 2023-09-26  1:33 UTC (permalink / raw)
  To: Uwe Kleine-König, Joel Stanley
  Cc: linux-arm-kernel, linux-aspeed, linux-kernel, Pengutronix Kernel Team



On Mon, 25 Sep 2023, at 19:24, 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 ignored (apart
> from emitting a warning) 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. Eventually after all drivers
> are converted, .remove_new() will be renamed to .remove().
>
> 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: Andrew Jeffery <andrew@aj.id.au>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 15/40] soc/mediatek: mtk-mmsys: Convert to platform remove callback returning void
  2023-09-25  9:55   ` Uwe Kleine-König
@ 2023-09-26  9:23     ` AngeloGioacchino Del Regno
  -1 siblings, 0 replies; 133+ messages in thread
From: AngeloGioacchino Del Regno @ 2023-09-26  9:23 UTC (permalink / raw)
  To: Uwe Kleine-König, Matthias Brugger
  Cc: linux-kernel, linux-arm-kernel, linux-mediatek, kernel

Il 25/09/23 11:55, Uwe Kleine-König ha scritto:
> 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 ignored (apart
> from emitting a warning) 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. Eventually after all drivers
> are converted, .remove_new() will be renamed to .remove().
> 
> 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: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>



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

* Re: [PATCH 15/40] soc/mediatek: mtk-mmsys: Convert to platform remove callback returning void
@ 2023-09-26  9:23     ` AngeloGioacchino Del Regno
  0 siblings, 0 replies; 133+ messages in thread
From: AngeloGioacchino Del Regno @ 2023-09-26  9:23 UTC (permalink / raw)
  To: Uwe Kleine-König, Matthias Brugger
  Cc: linux-kernel, linux-arm-kernel, linux-mediatek, kernel

Il 25/09/23 11:55, Uwe Kleine-König ha scritto:
> 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 ignored (apart
> from emitting a warning) 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. Eventually after all drivers
> are converted, .remove_new() will be renamed to .remove().
> 
> 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: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 14/40] soc/mediatek: mtk-devapc: Convert to platform remove callback returning void
  2023-09-25  9:55   ` Uwe Kleine-König
@ 2023-09-26  9:23     ` AngeloGioacchino Del Regno
  -1 siblings, 0 replies; 133+ messages in thread
From: AngeloGioacchino Del Regno @ 2023-09-26  9:23 UTC (permalink / raw)
  To: Uwe Kleine-König, Matthias Brugger
  Cc: linux-kernel, linux-arm-kernel, linux-mediatek, kernel

Il 25/09/23 11:55, Uwe Kleine-König ha scritto:
> 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 ignored (apart
> from emitting a warning) 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. Eventually after all drivers
> are converted, .remove_new() will be renamed to .remove().
> 
> 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: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>



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

* Re: [PATCH 14/40] soc/mediatek: mtk-devapc: Convert to platform remove callback returning void
@ 2023-09-26  9:23     ` AngeloGioacchino Del Regno
  0 siblings, 0 replies; 133+ messages in thread
From: AngeloGioacchino Del Regno @ 2023-09-26  9:23 UTC (permalink / raw)
  To: Uwe Kleine-König, Matthias Brugger
  Cc: linux-kernel, linux-arm-kernel, linux-mediatek, kernel

Il 25/09/23 11:55, Uwe Kleine-König ha scritto:
> 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 ignored (apart
> from emitting a warning) 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. Eventually after all drivers
> are converted, .remove_new() will be renamed to .remove().
> 
> 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: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 00/40] soc: Convert to platform remove callback returning void
  2023-09-25  9:54 ` Uwe Kleine-König
  (?)
  (?)
@ 2023-09-27  2:25   ` Joel Stanley
  -1 siblings, 0 replies; 133+ messages in thread
From: Joel Stanley @ 2023-09-27  2:25 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Li Yang, Herve Codina, Qiang Zhao, Hitomi Hasegawa, Huisong Li,
	Krzysztof Halasa, Karol Gugala, Mateusz Holenko, Gabriel Somlo,
	Yinbo Zhu, Matthias Brugger, Conor Dooley, Daire McNamara,
	Krzysztof Kozlowski, Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Heiko Stuebner, Thierry Reding, Jonathan Hunter, Sumit Gupta,
	Shang XiaoJing, Muhammad Usama Anjum, Rob Herring,
	Nishanth Menon, Santosh Shilimkar, Michal Simek, Andrew Jeffery,
	linux-arm-kernel, linux-aspeed, linux-kernel, Arnd Bergmann,
	Zev Weiss, linuxppc-dev, loongarch, AngeloGioacchino Del Regno,
	linux-mediatek, linux-riscv, zhang songyi, Lubomir Rintel,
	linux-arm-msm, linux-rockchip, Alim Akhtar, linux-samsung-soc,
	Nick Alcock, Yang Yingliang, linux-tegra, linux-pm, Ruan Jinjie,
	kernel

On Mon, 25 Sept 2023 at 09:55, Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> wrote:
>
> Hello,
>
> this series converts all platform drivers below drivers/soc to use
> .remove_new(). The motivation is to get rid of an integer return code
> that is (mostly) ignored by the platform driver core and error prone on
> the driver side.
>
> See commit 5c5a7680e67b ("platform: Provide a remove callback that
> returns no value") for an extended explanation and the eventual goal.
>
> As there is no single maintainer team for drivers/soc, I suggest the
> individual maintainers to pick up "their" patches.

I'd be happy if Arnd merged the lot at once. Arnd, what do you think?

If that will be too messy then I understand. I have queued the aspeed
ones locally and will push that out if we decide that's the best way
to go.

Thanks for doing this cleanup Uwe.

Cheers,

Joel

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

* Re: [PATCH 00/40] soc: Convert to platform remove callback returning void
@ 2023-09-27  2:25   ` Joel Stanley
  0 siblings, 0 replies; 133+ messages in thread
From: Joel Stanley @ 2023-09-27  2:25 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Li Yang, Herve Codina, Qiang Zhao, Hitomi Hasegawa, Huisong Li,
	Krzysztof Halasa, Karol Gugala, Mateusz Holenko, Gabriel Somlo,
	Yinbo Zhu, Matthias Brugger, Conor Dooley, Daire McNamara,
	Krzysztof Kozlowski, Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Heiko Stuebner, Thierry Reding, Jonathan Hunter, Sumit Gupta,
	Shang XiaoJing, Muhammad Usama Anjum, Rob Herring,
	Nishanth Menon, Santosh Shilimkar, Michal Simek, Andrew Jeffery,
	linux-arm-kernel, linux-aspeed, linux-kernel, Arnd Bergmann,
	Zev Weiss, linuxppc-dev, loongarch, AngeloGioacchino Del Regno,
	linux-mediatek, linux-riscv, zhang songyi, Lubomir Rintel,
	linux-arm-msm, linux-rockchip, Alim Akhtar, linux-samsung-soc,
	Nick Alcock, Yang Yingliang, linux-tegra, linux-pm, Ruan Jinjie,
	kernel

On Mon, 25 Sept 2023 at 09:55, Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> wrote:
>
> Hello,
>
> this series converts all platform drivers below drivers/soc to use
> .remove_new(). The motivation is to get rid of an integer return code
> that is (mostly) ignored by the platform driver core and error prone on
> the driver side.
>
> See commit 5c5a7680e67b ("platform: Provide a remove callback that
> returns no value") for an extended explanation and the eventual goal.
>
> As there is no single maintainer team for drivers/soc, I suggest the
> individual maintainers to pick up "their" patches.

I'd be happy if Arnd merged the lot at once. Arnd, what do you think?

If that will be too messy then I understand. I have queued the aspeed
ones locally and will push that out if we decide that's the best way
to go.

Thanks for doing this cleanup Uwe.

Cheers,

Joel

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* Re: [PATCH 00/40] soc: Convert to platform remove callback returning void
@ 2023-09-27  2:25   ` Joel Stanley
  0 siblings, 0 replies; 133+ messages in thread
From: Joel Stanley @ 2023-09-27  2:25 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Nishanth Menon, Herve Codina, Heiko Stuebner, Mateusz Holenko,
	Muhammad Usama Anjum, linux-tegra, Conor Dooley, Thierry Reding,
	Alim Akhtar, linux-riscv, Karol Gugala, Qiang Zhao,
	Hitomi Hasegawa, Rob Herring, linux-samsung-soc, linux-aspeed,
	Ruan Jinjie, Yinbo Zhu, Jonathan Hunter, linux-rockchip,
	Gabriel Somlo, Andy Gross, Huisong Li, Yang Yingliang,
	Sumit Gupta, zhang songyi, Zev Weiss, Arnd Bergmann, linux-pm,
	linux-arm-msm, Lubomir Rintel, Krzysztof Halasa, loongarch,
	Santosh Shilimkar, Matthias Brugger, Michal Simek,
	linux-arm-kernel, AngeloGioacchino Del Regno, Daire McNamara,
	Bjorn Andersson, linux-kernel, Shang XiaoJing, Li Yang,
	Konrad Dybcio, Andrew Jeffery, Krzysztof Kozlowski, kernel,
	linux-mediatek, Nick Alcock, linuxppc-dev

On Mon, 25 Sept 2023 at 09:55, Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> wrote:
>
> Hello,
>
> this series converts all platform drivers below drivers/soc to use
> .remove_new(). The motivation is to get rid of an integer return code
> that is (mostly) ignored by the platform driver core and error prone on
> the driver side.
>
> See commit 5c5a7680e67b ("platform: Provide a remove callback that
> returns no value") for an extended explanation and the eventual goal.
>
> As there is no single maintainer team for drivers/soc, I suggest the
> individual maintainers to pick up "their" patches.

I'd be happy if Arnd merged the lot at once. Arnd, what do you think?

If that will be too messy then I understand. I have queued the aspeed
ones locally and will push that out if we decide that's the best way
to go.

Thanks for doing this cleanup Uwe.

Cheers,

Joel

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

* Re: [PATCH 00/40] soc: Convert to platform remove callback returning void
@ 2023-09-27  2:25   ` Joel Stanley
  0 siblings, 0 replies; 133+ messages in thread
From: Joel Stanley @ 2023-09-27  2:25 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Li Yang, Herve Codina, Qiang Zhao, Hitomi Hasegawa, Huisong Li,
	Krzysztof Halasa, Karol Gugala, Mateusz Holenko, Gabriel Somlo,
	Yinbo Zhu, Matthias Brugger, Conor Dooley, Daire McNamara,
	Krzysztof Kozlowski, Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Heiko Stuebner, Thierry Reding, Jonathan Hunter, Sumit Gupta,
	Shang XiaoJing, Muhammad Usama Anjum, Rob Herring,
	Nishanth Menon, Santosh Shilimkar, Michal Simek, Andrew Jeffery,
	linux-arm-kernel, linux-aspeed, linux-kernel, Arnd Bergmann,
	Zev Weiss, linuxppc-dev, loongarch, AngeloGioacchino Del Regno,
	linux-mediatek, linux-riscv, zhang songyi, Lubomir Rintel,
	linux-arm-msm, linux-rockchip, Alim Akhtar, linux-samsung-soc,
	Nick Alcock, Yang Yingliang, linux-tegra, linux-pm, Ruan Jinjie,
	kernel

On Mon, 25 Sept 2023 at 09:55, Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> wrote:
>
> Hello,
>
> this series converts all platform drivers below drivers/soc to use
> .remove_new(). The motivation is to get rid of an integer return code
> that is (mostly) ignored by the platform driver core and error prone on
> the driver side.
>
> See commit 5c5a7680e67b ("platform: Provide a remove callback that
> returns no value") for an extended explanation and the eventual goal.
>
> As there is no single maintainer team for drivers/soc, I suggest the
> individual maintainers to pick up "their" patches.

I'd be happy if Arnd merged the lot at once. Arnd, what do you think?

If that will be too messy then I understand. I have queued the aspeed
ones locally and will push that out if we decide that's the best way
to go.

Thanks for doing this cleanup Uwe.

Cheers,

Joel

_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

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

* Re: [PATCH 07/40] soc/fsl: cpm: tsa: Convert to platform remove callback returning void
  2023-09-25  9:54   ` Uwe Kleine-König
  (?)
@ 2023-09-27  6:44     ` Herve Codina
  -1 siblings, 0 replies; 133+ messages in thread
From: Herve Codina @ 2023-09-27  6:44 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Qiang Zhao, Li Yang, linuxppc-dev, linux-arm-kernel,
	linux-kernel, kernel

Hi Uwe,

On Mon, 25 Sep 2023 11:54:58 +0200
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 ignored (apart
> from emitting a warning) 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. Eventually after all drivers
> are converted, .remove_new() will be renamed to .remove().
> 
> 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/soc/fsl/qe/tsa.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/soc/fsl/qe/tsa.c b/drivers/soc/fsl/qe/tsa.c
> index 3646153117b3..3f9981335590 100644
> --- a/drivers/soc/fsl/qe/tsa.c
> +++ b/drivers/soc/fsl/qe/tsa.c
> @@ -706,7 +706,7 @@ static int tsa_probe(struct platform_device *pdev)
>  	return 0;
>  }
>  
> -static int tsa_remove(struct platform_device *pdev)
> +static void tsa_remove(struct platform_device *pdev)
>  {
>  	struct tsa *tsa = platform_get_drvdata(pdev);
>  	int i;
> @@ -729,7 +729,6 @@ static int tsa_remove(struct platform_device *pdev)
>  			clk_put(tsa->tdm[i].l1rclk_clk);
>  		}
>  	}
> -	return 0;
>  }
>  
>  static const struct of_device_id tsa_id_table[] = {
> @@ -744,7 +743,7 @@ static struct platform_driver tsa_driver = {
>  		.of_match_table = of_match_ptr(tsa_id_table),
>  	},
>  	.probe = tsa_probe,
> -	.remove = tsa_remove,
> +	.remove_new = tsa_remove,
>  };
>  module_platform_driver(tsa_driver);
>  

Acked-by: Herve Codina <herve.codina@bootlin.com>

Best regards,
Hervé

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

* Re: [PATCH 07/40] soc/fsl: cpm: tsa: Convert to platform remove callback returning void
@ 2023-09-27  6:44     ` Herve Codina
  0 siblings, 0 replies; 133+ messages in thread
From: Herve Codina @ 2023-09-27  6:44 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Qiang Zhao, Li Yang, linuxppc-dev, linux-arm-kernel,
	linux-kernel, kernel

Hi Uwe,

On Mon, 25 Sep 2023 11:54:58 +0200
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 ignored (apart
> from emitting a warning) 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. Eventually after all drivers
> are converted, .remove_new() will be renamed to .remove().
> 
> 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/soc/fsl/qe/tsa.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/soc/fsl/qe/tsa.c b/drivers/soc/fsl/qe/tsa.c
> index 3646153117b3..3f9981335590 100644
> --- a/drivers/soc/fsl/qe/tsa.c
> +++ b/drivers/soc/fsl/qe/tsa.c
> @@ -706,7 +706,7 @@ static int tsa_probe(struct platform_device *pdev)
>  	return 0;
>  }
>  
> -static int tsa_remove(struct platform_device *pdev)
> +static void tsa_remove(struct platform_device *pdev)
>  {
>  	struct tsa *tsa = platform_get_drvdata(pdev);
>  	int i;
> @@ -729,7 +729,6 @@ static int tsa_remove(struct platform_device *pdev)
>  			clk_put(tsa->tdm[i].l1rclk_clk);
>  		}
>  	}
> -	return 0;
>  }
>  
>  static const struct of_device_id tsa_id_table[] = {
> @@ -744,7 +743,7 @@ static struct platform_driver tsa_driver = {
>  		.of_match_table = of_match_ptr(tsa_id_table),
>  	},
>  	.probe = tsa_probe,
> -	.remove = tsa_remove,
> +	.remove_new = tsa_remove,
>  };
>  module_platform_driver(tsa_driver);
>  

Acked-by: Herve Codina <herve.codina@bootlin.com>

Best regards,
Hervé

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 07/40] soc/fsl: cpm: tsa: Convert to platform remove callback returning void
@ 2023-09-27  6:44     ` Herve Codina
  0 siblings, 0 replies; 133+ messages in thread
From: Herve Codina @ 2023-09-27  6:44 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: linux-kernel, Li Yang, kernel, linuxppc-dev, linux-arm-kernel,
	Qiang Zhao

Hi Uwe,

On Mon, 25 Sep 2023 11:54:58 +0200
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 ignored (apart
> from emitting a warning) 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. Eventually after all drivers
> are converted, .remove_new() will be renamed to .remove().
> 
> 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/soc/fsl/qe/tsa.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/soc/fsl/qe/tsa.c b/drivers/soc/fsl/qe/tsa.c
> index 3646153117b3..3f9981335590 100644
> --- a/drivers/soc/fsl/qe/tsa.c
> +++ b/drivers/soc/fsl/qe/tsa.c
> @@ -706,7 +706,7 @@ static int tsa_probe(struct platform_device *pdev)
>  	return 0;
>  }
>  
> -static int tsa_remove(struct platform_device *pdev)
> +static void tsa_remove(struct platform_device *pdev)
>  {
>  	struct tsa *tsa = platform_get_drvdata(pdev);
>  	int i;
> @@ -729,7 +729,6 @@ static int tsa_remove(struct platform_device *pdev)
>  			clk_put(tsa->tdm[i].l1rclk_clk);
>  		}
>  	}
> -	return 0;
>  }
>  
>  static const struct of_device_id tsa_id_table[] = {
> @@ -744,7 +743,7 @@ static struct platform_driver tsa_driver = {
>  		.of_match_table = of_match_ptr(tsa_id_table),
>  	},
>  	.probe = tsa_probe,
> -	.remove = tsa_remove,
> +	.remove_new = tsa_remove,
>  };
>  module_platform_driver(tsa_driver);
>  

Acked-by: Herve Codina <herve.codina@bootlin.com>

Best regards,
Hervé

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

* Re: [PATCH 06/40] soc/fsl: cpm: qmc: Convert to platform remove callback returning void
  2023-09-25  9:54   ` Uwe Kleine-König
  (?)
@ 2023-09-27  6:44     ` Herve Codina
  -1 siblings, 0 replies; 133+ messages in thread
From: Herve Codina @ 2023-09-27  6:44 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Qiang Zhao, Li Yang, linuxppc-dev, linux-arm-kernel,
	linux-kernel, kernel

On Mon, 25 Sep 2023 11:54:57 +0200
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 ignored (apart
> from emitting a warning) 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. Eventually after all drivers
> are converted, .remove_new() will be renamed to .remove().
> 
> 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/soc/fsl/qe/qmc.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/soc/fsl/qe/qmc.c b/drivers/soc/fsl/qe/qmc.c
> index b3c292c9a14e..92ec76c03965 100644
> --- a/drivers/soc/fsl/qe/qmc.c
> +++ b/drivers/soc/fsl/qe/qmc.c
> @@ -1415,7 +1415,7 @@ static int qmc_probe(struct platform_device *pdev)
>  	return ret;
>  }
>  
> -static int qmc_remove(struct platform_device *pdev)
> +static void qmc_remove(struct platform_device *pdev)
>  {
>  	struct qmc *qmc = platform_get_drvdata(pdev);
>  
> @@ -1427,8 +1427,6 @@ static int qmc_remove(struct platform_device *pdev)
>  
>  	/* Disconnect the serial from TSA */
>  	tsa_serial_disconnect(qmc->tsa_serial);
> -
> -	return 0;
>  }
>  
>  static const struct of_device_id qmc_id_table[] = {
> @@ -1443,7 +1441,7 @@ static struct platform_driver qmc_driver = {
>  		.of_match_table = of_match_ptr(qmc_id_table),
>  	},
>  	.probe = qmc_probe,
> -	.remove = qmc_remove,
> +	.remove_new = qmc_remove,
>  };
>  module_platform_driver(qmc_driver);
>  

Acked-by: Herve Codina <herve.codina@bootlin.com>

Best regards,
Hervé

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

* Re: [PATCH 06/40] soc/fsl: cpm: qmc: Convert to platform remove callback returning void
@ 2023-09-27  6:44     ` Herve Codina
  0 siblings, 0 replies; 133+ messages in thread
From: Herve Codina @ 2023-09-27  6:44 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Qiang Zhao, Li Yang, linuxppc-dev, linux-arm-kernel,
	linux-kernel, kernel

On Mon, 25 Sep 2023 11:54:57 +0200
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 ignored (apart
> from emitting a warning) 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. Eventually after all drivers
> are converted, .remove_new() will be renamed to .remove().
> 
> 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/soc/fsl/qe/qmc.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/soc/fsl/qe/qmc.c b/drivers/soc/fsl/qe/qmc.c
> index b3c292c9a14e..92ec76c03965 100644
> --- a/drivers/soc/fsl/qe/qmc.c
> +++ b/drivers/soc/fsl/qe/qmc.c
> @@ -1415,7 +1415,7 @@ static int qmc_probe(struct platform_device *pdev)
>  	return ret;
>  }
>  
> -static int qmc_remove(struct platform_device *pdev)
> +static void qmc_remove(struct platform_device *pdev)
>  {
>  	struct qmc *qmc = platform_get_drvdata(pdev);
>  
> @@ -1427,8 +1427,6 @@ static int qmc_remove(struct platform_device *pdev)
>  
>  	/* Disconnect the serial from TSA */
>  	tsa_serial_disconnect(qmc->tsa_serial);
> -
> -	return 0;
>  }
>  
>  static const struct of_device_id qmc_id_table[] = {
> @@ -1443,7 +1441,7 @@ static struct platform_driver qmc_driver = {
>  		.of_match_table = of_match_ptr(qmc_id_table),
>  	},
>  	.probe = qmc_probe,
> -	.remove = qmc_remove,
> +	.remove_new = qmc_remove,
>  };
>  module_platform_driver(qmc_driver);
>  

Acked-by: Herve Codina <herve.codina@bootlin.com>

Best regards,
Hervé

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 06/40] soc/fsl: cpm: qmc: Convert to platform remove callback returning void
@ 2023-09-27  6:44     ` Herve Codina
  0 siblings, 0 replies; 133+ messages in thread
From: Herve Codina @ 2023-09-27  6:44 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: linux-kernel, Li Yang, kernel, linuxppc-dev, linux-arm-kernel,
	Qiang Zhao

On Mon, 25 Sep 2023 11:54:57 +0200
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 ignored (apart
> from emitting a warning) 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. Eventually after all drivers
> are converted, .remove_new() will be renamed to .remove().
> 
> 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/soc/fsl/qe/qmc.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/soc/fsl/qe/qmc.c b/drivers/soc/fsl/qe/qmc.c
> index b3c292c9a14e..92ec76c03965 100644
> --- a/drivers/soc/fsl/qe/qmc.c
> +++ b/drivers/soc/fsl/qe/qmc.c
> @@ -1415,7 +1415,7 @@ static int qmc_probe(struct platform_device *pdev)
>  	return ret;
>  }
>  
> -static int qmc_remove(struct platform_device *pdev)
> +static void qmc_remove(struct platform_device *pdev)
>  {
>  	struct qmc *qmc = platform_get_drvdata(pdev);
>  
> @@ -1427,8 +1427,6 @@ static int qmc_remove(struct platform_device *pdev)
>  
>  	/* Disconnect the serial from TSA */
>  	tsa_serial_disconnect(qmc->tsa_serial);
> -
> -	return 0;
>  }
>  
>  static const struct of_device_id qmc_id_table[] = {
> @@ -1443,7 +1441,7 @@ static struct platform_driver qmc_driver = {
>  		.of_match_table = of_match_ptr(qmc_id_table),
>  	},
>  	.probe = qmc_probe,
> -	.remove = qmc_remove,
> +	.remove_new = qmc_remove,
>  };
>  module_platform_driver(qmc_driver);
>  

Acked-by: Herve Codina <herve.codina@bootlin.com>

Best regards,
Hervé

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

* Re: [PATCH 00/40] soc: Convert to platform remove callback returning void
  2023-09-27  2:25   ` Joel Stanley
  (?)
  (?)
@ 2023-09-27  8:43     ` Arnd Bergmann
  -1 siblings, 0 replies; 133+ messages in thread
From: Arnd Bergmann @ 2023-09-27  8:43 UTC (permalink / raw)
  To: Joel Stanley, Uwe Kleine-König
  Cc: Leo Li, Herve Codina, Qiang Zhao, Hitomi Hasegawa, Huisong Li,
	Krzysztof Halasa, Karol Gugala, Mateusz Holenko, Gabriel Somlo,
	Yinbo Zhu, Matthias Brugger, Conor.Dooley, Daire McNamara,
	Krzysztof Kozlowski, Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Heiko Stübner, Thierry Reding, Jon Hunter, Sumit Gupta,
	Shang XiaoJing, Muhammad Usama Anjum, Rob Herring,
	Nishanth Menon, Santosh Shilimkar, Michal Simek, Andrew Jeffery,
	linux-arm-kernel, linux-aspeed, linux-kernel, Zev Weiss,
	linuxppc-dev, loongarch, AngeloGioacchino Del Regno,
	linux-mediatek, linux-riscv, zhang.songyi, Lubomir Rintel,
	linux-arm-msm, linux-rockchip, Alim Akhtar, linux-samsung-soc,
	Nick Alcock, Yang Yingliang, linux-tegra, linux-pm, Ruan Jinjie,
	Pengutronix Kernel Team

On Wed, Sep 27, 2023, at 04:25, Joel Stanley wrote:
> On Mon, 25 Sept 2023 at 09:55, Uwe Kleine-König <u.kleine-koenig@pengutronix.de> wrote:
>>
>> this series converts all platform drivers below drivers/soc to use
>> .remove_new(). The motivation is to get rid of an integer return code
>> that is (mostly) ignored by the platform driver core and error prone on
>> the driver side.
>>
>> See commit 5c5a7680e67b ("platform: Provide a remove callback that
>> returns no value") for an extended explanation and the eventual goal.
>>
>> As there is no single maintainer team for drivers/soc, I suggest the
>> individual maintainers to pick up "their" patches.
>
> I'd be happy if Arnd merged the lot at once. Arnd, what do you think?
>
> If that will be too messy then I understand. I have queued the aspeed
> ones locally and will push that out if we decide that's the best way
> to go.

The main downside of merging it all at once through the soc tree
is that there may be patches that conflict with other work going on
in individual drivers.

What I'd suggest doing here is:

- have platform maintainers pick up patches for their drivers
  if that is their preference for any reason

- get a pull request from Uwe for the soc tree for anything that has
  not been picked up in one or two weeks from now

      Arnd

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* Re: [PATCH 00/40] soc: Convert to platform remove callback returning void
@ 2023-09-27  8:43     ` Arnd Bergmann
  0 siblings, 0 replies; 133+ messages in thread
From: Arnd Bergmann @ 2023-09-27  8:43 UTC (permalink / raw)
  To: Joel Stanley, Uwe Kleine-König
  Cc: Leo Li, Herve Codina, Qiang Zhao, Hitomi Hasegawa, Huisong Li,
	Krzysztof Halasa, Karol Gugala, Mateusz Holenko, Gabriel Somlo,
	Yinbo Zhu, Matthias Brugger, Conor.Dooley, Daire McNamara,
	Krzysztof Kozlowski, Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Heiko Stübner, Thierry Reding, Jon Hunter, Sumit Gupta,
	Shang XiaoJing, Muhammad Usama Anjum, Rob Herring,
	Nishanth Menon, Santosh Shilimkar, Michal Simek, Andrew Jeffery,
	linux-arm-kernel, linux-aspeed, linux-kernel, Zev Weiss,
	linuxppc-dev, loongarch, AngeloGioacchino Del Regno,
	linux-mediatek, linux-riscv, zhang.songyi, Lubomir Rintel,
	linux-arm-msm, linux-rockchip, Alim Akhtar, linux-samsung-soc,
	Nick Alcock, Yang Yingliang, linux-tegra, linux-pm, Ruan Jinjie,
	Pengutronix Kernel Team

On Wed, Sep 27, 2023, at 04:25, Joel Stanley wrote:
> On Mon, 25 Sept 2023 at 09:55, Uwe Kleine-König <u.kleine-koenig@pengutronix.de> wrote:
>>
>> this series converts all platform drivers below drivers/soc to use
>> .remove_new(). The motivation is to get rid of an integer return code
>> that is (mostly) ignored by the platform driver core and error prone on
>> the driver side.
>>
>> See commit 5c5a7680e67b ("platform: Provide a remove callback that
>> returns no value") for an extended explanation and the eventual goal.
>>
>> As there is no single maintainer team for drivers/soc, I suggest the
>> individual maintainers to pick up "their" patches.
>
> I'd be happy if Arnd merged the lot at once. Arnd, what do you think?
>
> If that will be too messy then I understand. I have queued the aspeed
> ones locally and will push that out if we decide that's the best way
> to go.

The main downside of merging it all at once through the soc tree
is that there may be patches that conflict with other work going on
in individual drivers.

What I'd suggest doing here is:

- have platform maintainers pick up patches for their drivers
  if that is their preference for any reason

- get a pull request from Uwe for the soc tree for anything that has
  not been picked up in one or two weeks from now

      Arnd

_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

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

* Re: [PATCH 00/40] soc: Convert to platform remove callback returning void
@ 2023-09-27  8:43     ` Arnd Bergmann
  0 siblings, 0 replies; 133+ messages in thread
From: Arnd Bergmann @ 2023-09-27  8:43 UTC (permalink / raw)
  To: Joel Stanley, Uwe Kleine-König
  Cc: Leo Li, Herve Codina, Qiang Zhao, Hitomi Hasegawa, Huisong Li,
	Krzysztof Halasa, Karol Gugala, Mateusz Holenko, Gabriel Somlo,
	Yinbo Zhu, Matthias Brugger, Conor.Dooley, Daire McNamara,
	Krzysztof Kozlowski, Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Heiko Stübner, Thierry Reding, Jon Hunter, Sumit Gupta,
	Shang XiaoJing, Muhammad Usama Anjum, Rob Herring,
	Nishanth Menon, Santosh Shilimkar, Michal Simek, Andrew Jeffery,
	linux-arm-kernel, linux-aspeed, linux-kernel, Zev Weiss,
	linuxppc-dev, loongarch, AngeloGioacchino Del Regno,
	linux-mediatek, linux-riscv, zhang.songyi, Lubomir Rintel,
	linux-arm-msm, linux-rockchip, Alim Akhtar, linux-samsung-soc,
	Nick Alcock, Yang Yingliang, linux-tegra, linux-pm, Ruan Jinjie,
	Pengutronix Kernel Team

On Wed, Sep 27, 2023, at 04:25, Joel Stanley wrote:
> On Mon, 25 Sept 2023 at 09:55, Uwe Kleine-König <u.kleine-koenig@pengutronix.de> wrote:
>>
>> this series converts all platform drivers below drivers/soc to use
>> .remove_new(). The motivation is to get rid of an integer return code
>> that is (mostly) ignored by the platform driver core and error prone on
>> the driver side.
>>
>> See commit 5c5a7680e67b ("platform: Provide a remove callback that
>> returns no value") for an extended explanation and the eventual goal.
>>
>> As there is no single maintainer team for drivers/soc, I suggest the
>> individual maintainers to pick up "their" patches.
>
> I'd be happy if Arnd merged the lot at once. Arnd, what do you think?
>
> If that will be too messy then I understand. I have queued the aspeed
> ones locally and will push that out if we decide that's the best way
> to go.

The main downside of merging it all at once through the soc tree
is that there may be patches that conflict with other work going on
in individual drivers.

What I'd suggest doing here is:

- have platform maintainers pick up patches for their drivers
  if that is their preference for any reason

- get a pull request from Uwe for the soc tree for anything that has
  not been picked up in one or two weeks from now

      Arnd

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

* Re: [PATCH 00/40] soc: Convert to platform remove callback returning void
@ 2023-09-27  8:43     ` Arnd Bergmann
  0 siblings, 0 replies; 133+ messages in thread
From: Arnd Bergmann @ 2023-09-27  8:43 UTC (permalink / raw)
  To: Joel Stanley, Uwe Kleine-König
  Cc: Nishanth Menon, Herve Codina, Heiko Stübner,
	Mateusz Holenko, Muhammad Usama Anjum, linux-tegra, Conor.Dooley,
	Thierry Reding, Alim Akhtar, linux-riscv, Karol Gugala,
	Qiang Zhao, Hitomi Hasegawa, Rob Herring, linux-samsung-soc,
	linux-aspeed, Ruan Jinjie, Yinbo Zhu, Jon Hunter, linux-rockchip,
	Gabriel Somlo, Andy Gross, Huisong Li, Yang Yingliang,
	Sumit Gupta, zhang.songyi, Zev Weiss

On Wed, Sep 27, 2023, at 04:25, Joel Stanley wrote:
> On Mon, 25 Sept 2023 at 09:55, Uwe Kleine-König <u.kleine-koenig@pengutronix.de> wrote:
>>
>> this series converts all platform drivers below drivers/soc to use
>> .remove_new(). The motivation is to get rid of an integer return code
>> that is (mostly) ignored by the platform driver core and error prone on
>> the driver side.
>>
>> See commit 5c5a7680e67b ("platform: Provide a remove callback that
>> returns no value") for an extended explanation and the eventual goal.
>>
>> As there is no single maintainer team for drivers/soc, I suggest the
>> individual maintainers to pick up "their" patches.
>
> I'd be happy if Arnd merged the lot at once. Arnd, what do you think?
>
> If that will be too messy then I understand. I have queued the aspeed
> ones locally and will push that out if we decide that's the best way
> to go.

The main downside of merging it all at once through the soc tree
is that there may be patches that conflict with other work going on
in individual drivers.

What I'd suggest doing here is:

- have platform maintainers pick up patches for their drivers
  if that is their preference for any reason

- get a pull request from Uwe for the soc tree for anything that has
  not been picked up in one or two weeks from now

      Arnd

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

* Re: [PATCH 00/40] soc: Convert to platform remove callback returning void
  2023-09-27  8:43     ` Arnd Bergmann
  (?)
  (?)
@ 2023-09-27 23:01       ` Bjorn Andersson
  -1 siblings, 0 replies; 133+ messages in thread
From: Bjorn Andersson @ 2023-09-27 23:01 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Joel Stanley, Uwe Kleine-König, Leo Li, Herve Codina,
	Qiang Zhao, Hitomi Hasegawa, Huisong Li, Krzysztof Halasa,
	Karol Gugala, Mateusz Holenko, Gabriel Somlo, Yinbo Zhu,
	Matthias Brugger, Conor.Dooley, Daire McNamara,
	Krzysztof Kozlowski, Andy Gross, Konrad Dybcio,
	Heiko Stübner, Thierry Reding, Jon Hunter, Sumit Gupta,
	Shang XiaoJing, Muhammad Usama Anjum, Rob Herring,
	Nishanth Menon, Santosh Shilimkar, Michal Simek, Andrew Jeffery,
	linux-arm-kernel, linux-aspeed, linux-kernel, Zev Weiss,
	linuxppc-dev, loongarch, AngeloGioacchino Del Regno,
	linux-mediatek, linux-riscv, zhang.songyi, Lubomir Rintel,
	linux-arm-msm, linux-rockchip, Alim Akhtar, linux-samsung-soc,
	Nick Alcock, Yang Yingliang, linux-tegra, linux-pm, Ruan Jinjie,
	Pengutronix Kernel Team

On Wed, Sep 27, 2023 at 10:43:16AM +0200, Arnd Bergmann wrote:
> On Wed, Sep 27, 2023, at 04:25, Joel Stanley wrote:
> > On Mon, 25 Sept 2023 at 09:55, Uwe Kleine-König <u.kleine-koenig@pengutronix.de> wrote:
> >>
> >> this series converts all platform drivers below drivers/soc to use
> >> .remove_new(). The motivation is to get rid of an integer return code
> >> that is (mostly) ignored by the platform driver core and error prone on
> >> the driver side.
> >>
> >> See commit 5c5a7680e67b ("platform: Provide a remove callback that
> >> returns no value") for an extended explanation and the eventual goal.
> >>
> >> As there is no single maintainer team for drivers/soc, I suggest the
> >> individual maintainers to pick up "their" patches.
> >
> > I'd be happy if Arnd merged the lot at once. Arnd, what do you think?
> >
> > If that will be too messy then I understand. I have queued the aspeed
> > ones locally and will push that out if we decide that's the best way
> > to go.
> 
> The main downside of merging it all at once through the soc tree
> is that there may be patches that conflict with other work going on
> in individual drivers.
> 
> What I'd suggest doing here is:
> 
> - have platform maintainers pick up patches for their drivers
>   if that is their preference for any reason
> 

I'd prefer this for the qcom drivers at least, please let me know if you
would like me to proceed.

Regards,
Bjorn

> - get a pull request from Uwe for the soc tree for anything that has
>   not been picked up in one or two weeks from now
> 
>       Arnd

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

* Re: [PATCH 00/40] soc: Convert to platform remove callback returning void
@ 2023-09-27 23:01       ` Bjorn Andersson
  0 siblings, 0 replies; 133+ messages in thread
From: Bjorn Andersson @ 2023-09-27 23:01 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Joel Stanley, Uwe Kleine-König, Leo Li, Herve Codina,
	Qiang Zhao, Hitomi Hasegawa, Huisong Li, Krzysztof Halasa,
	Karol Gugala, Mateusz Holenko, Gabriel Somlo, Yinbo Zhu,
	Matthias Brugger, Conor.Dooley, Daire McNamara,
	Krzysztof Kozlowski, Andy Gross, Konrad Dybcio,
	Heiko Stübner, Thierry Reding, Jon Hunter, Sumit Gupta,
	Shang XiaoJing, Muhammad Usama Anjum, Rob Herring,
	Nishanth Menon, Santosh Shilimkar, Michal Simek, Andrew Jeffery,
	linux-arm-kernel, linux-aspeed, linux-kernel, Zev Weiss,
	linuxppc-dev, loongarch, AngeloGioacchino Del Regno,
	linux-mediatek, linux-riscv, zhang.songyi, Lubomir Rintel,
	linux-arm-msm, linux-rockchip, Alim Akhtar, linux-samsung-soc,
	Nick Alcock, Yang Yingliang, linux-tegra, linux-pm, Ruan Jinjie,
	Pengutronix Kernel Team

On Wed, Sep 27, 2023 at 10:43:16AM +0200, Arnd Bergmann wrote:
> On Wed, Sep 27, 2023, at 04:25, Joel Stanley wrote:
> > On Mon, 25 Sept 2023 at 09:55, Uwe Kleine-König <u.kleine-koenig@pengutronix.de> wrote:
> >>
> >> this series converts all platform drivers below drivers/soc to use
> >> .remove_new(). The motivation is to get rid of an integer return code
> >> that is (mostly) ignored by the platform driver core and error prone on
> >> the driver side.
> >>
> >> See commit 5c5a7680e67b ("platform: Provide a remove callback that
> >> returns no value") for an extended explanation and the eventual goal.
> >>
> >> As there is no single maintainer team for drivers/soc, I suggest the
> >> individual maintainers to pick up "their" patches.
> >
> > I'd be happy if Arnd merged the lot at once. Arnd, what do you think?
> >
> > If that will be too messy then I understand. I have queued the aspeed
> > ones locally and will push that out if we decide that's the best way
> > to go.
> 
> The main downside of merging it all at once through the soc tree
> is that there may be patches that conflict with other work going on
> in individual drivers.
> 
> What I'd suggest doing here is:
> 
> - have platform maintainers pick up patches for their drivers
>   if that is their preference for any reason
> 

I'd prefer this for the qcom drivers at least, please let me know if you
would like me to proceed.

Regards,
Bjorn

> - get a pull request from Uwe for the soc tree for anything that has
>   not been picked up in one or two weeks from now
> 
>       Arnd

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* Re: [PATCH 00/40] soc: Convert to platform remove callback returning void
@ 2023-09-27 23:01       ` Bjorn Andersson
  0 siblings, 0 replies; 133+ messages in thread
From: Bjorn Andersson @ 2023-09-27 23:01 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Joel Stanley, Uwe Kleine-König, Leo Li, Herve Codina,
	Qiang Zhao, Hitomi Hasegawa, Huisong Li, Krzysztof Halasa,
	Karol Gugala, Mateusz Holenko, Gabriel Somlo, Yinbo Zhu,
	Matthias Brugger, Conor.Dooley, Daire McNamara,
	Krzysztof Kozlowski, Andy Gross, Konrad Dybcio,
	Heiko Stübner, Thierry Reding, Jon Hunter, Sumit Gupta,
	Shang XiaoJing, Muhammad Usama Anjum, Rob Herring,
	Nishanth Menon, Santosh Shilimkar, Michal Simek, Andrew Jeffery,
	linux-arm-kernel, linux-aspeed, linux-kernel, Zev Weiss,
	linuxppc-dev, loongarch, AngeloGioacchino Del Regno,
	linux-mediatek, linux-riscv, zhang.songyi, Lubomir Rintel,
	linux-arm-msm, linux-rockchip, Alim Akhtar, linux-samsung-soc,
	Nick Alcock, Yang Yingliang, linux-tegra, linux-pm, Ruan Jinjie,
	Pengutronix Kernel Team

On Wed, Sep 27, 2023 at 10:43:16AM +0200, Arnd Bergmann wrote:
> On Wed, Sep 27, 2023, at 04:25, Joel Stanley wrote:
> > On Mon, 25 Sept 2023 at 09:55, Uwe Kleine-König <u.kleine-koenig@pengutronix.de> wrote:
> >>
> >> this series converts all platform drivers below drivers/soc to use
> >> .remove_new(). The motivation is to get rid of an integer return code
> >> that is (mostly) ignored by the platform driver core and error prone on
> >> the driver side.
> >>
> >> See commit 5c5a7680e67b ("platform: Provide a remove callback that
> >> returns no value") for an extended explanation and the eventual goal.
> >>
> >> As there is no single maintainer team for drivers/soc, I suggest the
> >> individual maintainers to pick up "their" patches.
> >
> > I'd be happy if Arnd merged the lot at once. Arnd, what do you think?
> >
> > If that will be too messy then I understand. I have queued the aspeed
> > ones locally and will push that out if we decide that's the best way
> > to go.
> 
> The main downside of merging it all at once through the soc tree
> is that there may be patches that conflict with other work going on
> in individual drivers.
> 
> What I'd suggest doing here is:
> 
> - have platform maintainers pick up patches for their drivers
>   if that is their preference for any reason
> 

I'd prefer this for the qcom drivers at least, please let me know if you
would like me to proceed.

Regards,
Bjorn

> - get a pull request from Uwe for the soc tree for anything that has
>   not been picked up in one or two weeks from now
> 
>       Arnd

_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

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

* Re: [PATCH 00/40] soc: Convert to platform remove callback returning void
@ 2023-09-27 23:01       ` Bjorn Andersson
  0 siblings, 0 replies; 133+ messages in thread
From: Bjorn Andersson @ 2023-09-27 23:01 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Nishanth Menon, Herve Codina, Heiko Stübner,
	Mateusz Holenko, Muhammad Usama Anjum, linux-tegra, Conor.Dooley,
	Thierry Reding, Alim Akhtar, linux-riscv, Karol Gugala,
	Qiang Zhao, Hitomi Hasegawa, Rob Herring, linux-samsung-soc,
	linux-aspeed, Ruan Jinjie, Yinbo Zhu, Jon Hunter, linux-rockchip,
	Gabriel Somlo, Andy Gross, Huisong Li, Joel Stanley,
	Uwe Kleine-König, Sumit Gupta, zhang .songyi, Zev Weiss,
	linux-pm, linux-arm-msm, Yang Yingliang, Lubomir Rintel,
	Krzysztof Halasa, loongarch, Santosh Shilimkar, Matthias Brugger,
	Michal Simek, linux-arm-kernel, AngeloGioacchino Del Regno,
	Daire McNamara, linux-kernel, Shang XiaoJing, Leo Li,
	Konrad Dybcio, Andrew Jeffery, Krzysztof Kozlowski,
	Pengutronix Kernel Team, linux-mediatek, Nick Alcock,
	linuxppc-dev

On Wed, Sep 27, 2023 at 10:43:16AM +0200, Arnd Bergmann wrote:
> On Wed, Sep 27, 2023, at 04:25, Joel Stanley wrote:
> > On Mon, 25 Sept 2023 at 09:55, Uwe Kleine-König <u.kleine-koenig@pengutronix.de> wrote:
> >>
> >> this series converts all platform drivers below drivers/soc to use
> >> .remove_new(). The motivation is to get rid of an integer return code
> >> that is (mostly) ignored by the platform driver core and error prone on
> >> the driver side.
> >>
> >> See commit 5c5a7680e67b ("platform: Provide a remove callback that
> >> returns no value") for an extended explanation and the eventual goal.
> >>
> >> As there is no single maintainer team for drivers/soc, I suggest the
> >> individual maintainers to pick up "their" patches.
> >
> > I'd be happy if Arnd merged the lot at once. Arnd, what do you think?
> >
> > If that will be too messy then I understand. I have queued the aspeed
> > ones locally and will push that out if we decide that's the best way
> > to go.
> 
> The main downside of merging it all at once through the soc tree
> is that there may be patches that conflict with other work going on
> in individual drivers.
> 
> What I'd suggest doing here is:
> 
> - have platform maintainers pick up patches for their drivers
>   if that is their preference for any reason
> 

I'd prefer this for the qcom drivers at least, please let me know if you
would like me to proceed.

Regards,
Bjorn

> - get a pull request from Uwe for the soc tree for anything that has
>   not been picked up in one or two weeks from now
> 
>       Arnd

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

* Re: (subset) [PATCH 31/40] soc/samsung: exynos-chipid: Convert to platform remove callback returning void
  2023-09-25  9:55   ` Uwe Kleine-König
@ 2023-09-28  5:52     ` Krzysztof Kozlowski
  -1 siblings, 0 replies; 133+ messages in thread
From: Krzysztof Kozlowski @ 2023-09-28  5:52 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Krzysztof Kozlowski, Alim Akhtar, linux-arm-kernel,
	linux-samsung-soc, linux-kernel, kernel


On Mon, 25 Sep 2023 11:55:22 +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 ignored (apart
> from emitting a warning) 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. Eventually after all drivers
> are converted, .remove_new() will be renamed to .remove().
> 
> [...]

Applied, thanks!

[31/40] soc/samsung: exynos-chipid: Convert to platform remove callback returning void
        https://git.kernel.org/krzk/linux/c/0da7c05d232dc015ab421771bb71cdbfb46e0d67

Best regards,
-- 
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

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

* Re: (subset) [PATCH 31/40] soc/samsung: exynos-chipid: Convert to platform remove callback returning void
@ 2023-09-28  5:52     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 133+ messages in thread
From: Krzysztof Kozlowski @ 2023-09-28  5:52 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Krzysztof Kozlowski, Alim Akhtar, linux-arm-kernel,
	linux-samsung-soc, linux-kernel, kernel


On Mon, 25 Sep 2023 11:55:22 +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 ignored (apart
> from emitting a warning) 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. Eventually after all drivers
> are converted, .remove_new() will be renamed to .remove().
> 
> [...]

Applied, thanks!

[31/40] soc/samsung: exynos-chipid: Convert to platform remove callback returning void
        https://git.kernel.org/krzk/linux/c/0da7c05d232dc015ab421771bb71cdbfb46e0d67

Best regards,
-- 
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 00/40] soc: Convert to platform remove callback returning void
  2023-09-27 23:01       ` Bjorn Andersson
  (?)
  (?)
@ 2023-09-28  6:14         ` Uwe Kleine-König
  -1 siblings, 0 replies; 133+ messages in thread
From: Uwe Kleine-König @ 2023-09-28  6:14 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Arnd Bergmann, Nishanth Menon, Herve Codina, Heiko Stübner,
	Mateusz Holenko, Muhammad Usama Anjum, linux-tegra, Conor.Dooley,
	Thierry Reding, Alim Akhtar, linux-riscv, Karol Gugala,
	Qiang Zhao, Hitomi Hasegawa, Rob Herring, linux-samsung-soc,
	linux-aspeed, Ruan Jinjie, Yinbo Zhu, Jon Hunter, linux-rockchip,
	Gabriel Somlo, Andy Gross, Huisong Li, Joel Stanley, Sumit Gupta,
	zhang.songyi, Zev Weiss, linux-pm, linux-arm-msm, Yang Yingliang,
	Lubomir Rintel, Krzysztof Halasa, loongarch, Santosh Shilimkar,
	Matthias Brugger, Michal Simek, linux-arm-kernel,
	AngeloGioacchino Del Regno, Daire McNamara, linux-kernel,
	Shang XiaoJing, Leo Li, Konrad Dybcio, Andrew Jeffery,
	Krzysztof Kozlowski, Pengutronix Kernel Team, linux-mediatek,
	Nick Alcock, linuxppc-dev

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

On Wed, Sep 27, 2023 at 04:01:58PM -0700, Bjorn Andersson wrote:
> On Wed, Sep 27, 2023 at 10:43:16AM +0200, Arnd Bergmann wrote:
> > On Wed, Sep 27, 2023, at 04:25, Joel Stanley wrote:
> > > On Mon, 25 Sept 2023 at 09:55, Uwe Kleine-König <u.kleine-koenig@pengutronix.de> wrote:
> > >>
> > >> this series converts all platform drivers below drivers/soc to use
> > >> .remove_new(). The motivation is to get rid of an integer return code
> > >> that is (mostly) ignored by the platform driver core and error prone on
> > >> the driver side.
> > >>
> > >> See commit 5c5a7680e67b ("platform: Provide a remove callback that
> > >> returns no value") for an extended explanation and the eventual goal.
> > >>
> > >> As there is no single maintainer team for drivers/soc, I suggest the
> > >> individual maintainers to pick up "their" patches.
> > >
> > > I'd be happy if Arnd merged the lot at once. Arnd, what do you think?
> > >
> > > If that will be too messy then I understand. I have queued the aspeed
> > > ones locally and will push that out if we decide that's the best way
> > > to go.
> > 
> > The main downside of merging it all at once through the soc tree
> > is that there may be patches that conflict with other work going on
> > in individual drivers.
> > 
> > What I'd suggest doing here is:
> > 
> > - have platform maintainers pick up patches for their drivers
> >   if that is their preference for any reason
> 
> I'd prefer this for the qcom drivers at least, please let me know if you
> would like me to proceed.

I can send a pull request as Arnd suggested. So iff you want the qcom
drivers not be a part of that PR, just make sure they appear in next
during the next week. :-)

(I'm not sure if "this" in your last quoted sentence is "platform
maintainers pick up" or "merging it all at once through the soc tree". I
think you mean the former. Still if you don't want me to pick up the
qcom patches and won't manage to make them appear in next via your tree,
I ask you to tell me explicitly to skip these in my PR.)

Best regards and thanks,
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

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

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

* Re: [PATCH 00/40] soc: Convert to platform remove callback returning void
@ 2023-09-28  6:14         ` Uwe Kleine-König
  0 siblings, 0 replies; 133+ messages in thread
From: Uwe Kleine-König @ 2023-09-28  6:14 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Arnd Bergmann, Nishanth Menon, Herve Codina, Heiko Stübner,
	Mateusz Holenko, Muhammad Usama Anjum, linux-tegra, Conor.Dooley,
	Thierry Reding, Alim Akhtar, linux-riscv, Karol Gugala,
	Qiang Zhao, Hitomi Hasegawa, Rob Herring, linux-samsung-soc,
	linux-aspeed, Ruan Jinjie, Yinbo Zhu, Jon Hunter, linux-rockchip,
	Gabriel Somlo, Andy Gross, Huisong Li, Joel Stanley, Sumit Gupta,
	zhang.songyi, Zev Weiss, linux-pm, linux-arm-msm, Yang Yingliang,
	Lubomir Rintel, Krzysztof Halasa, loongarch, Santosh Shilimkar,
	Matthias Brugger, Michal Simek, linux-arm-kernel,
	AngeloGioacchino Del Regno, Daire McNamara, linux-kernel,
	Shang XiaoJing, Leo Li, Konrad Dybcio, Andrew Jeffery,
	Krzysztof Kozlowski, Pengutronix Kernel Team, linux-mediatek,
	Nick Alcock, linuxppc-dev


[-- Attachment #1.1: Type: text/plain, Size: 2272 bytes --]

On Wed, Sep 27, 2023 at 04:01:58PM -0700, Bjorn Andersson wrote:
> On Wed, Sep 27, 2023 at 10:43:16AM +0200, Arnd Bergmann wrote:
> > On Wed, Sep 27, 2023, at 04:25, Joel Stanley wrote:
> > > On Mon, 25 Sept 2023 at 09:55, Uwe Kleine-König <u.kleine-koenig@pengutronix.de> wrote:
> > >>
> > >> this series converts all platform drivers below drivers/soc to use
> > >> .remove_new(). The motivation is to get rid of an integer return code
> > >> that is (mostly) ignored by the platform driver core and error prone on
> > >> the driver side.
> > >>
> > >> See commit 5c5a7680e67b ("platform: Provide a remove callback that
> > >> returns no value") for an extended explanation and the eventual goal.
> > >>
> > >> As there is no single maintainer team for drivers/soc, I suggest the
> > >> individual maintainers to pick up "their" patches.
> > >
> > > I'd be happy if Arnd merged the lot at once. Arnd, what do you think?
> > >
> > > If that will be too messy then I understand. I have queued the aspeed
> > > ones locally and will push that out if we decide that's the best way
> > > to go.
> > 
> > The main downside of merging it all at once through the soc tree
> > is that there may be patches that conflict with other work going on
> > in individual drivers.
> > 
> > What I'd suggest doing here is:
> > 
> > - have platform maintainers pick up patches for their drivers
> >   if that is their preference for any reason
> 
> I'd prefer this for the qcom drivers at least, please let me know if you
> would like me to proceed.

I can send a pull request as Arnd suggested. So iff you want the qcom
drivers not be a part of that PR, just make sure they appear in next
during the next week. :-)

(I'm not sure if "this" in your last quoted sentence is "platform
maintainers pick up" or "merging it all at once through the soc tree". I
think you mean the former. Still if you don't want me to pick up the
qcom patches and won't manage to make them appear in next via your tree,
I ask you to tell me explicitly to skip these in my PR.)

Best regards and thanks,
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

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

[-- Attachment #2: Type: text/plain, Size: 161 bytes --]

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* Re: [PATCH 00/40] soc: Convert to platform remove callback returning void
@ 2023-09-28  6:14         ` Uwe Kleine-König
  0 siblings, 0 replies; 133+ messages in thread
From: Uwe Kleine-König @ 2023-09-28  6:14 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Arnd Bergmann, Nishanth Menon, Herve Codina, Heiko Stübner,
	Mateusz Holenko, Muhammad Usama Anjum, linux-tegra, Conor.Dooley,
	Thierry Reding, Alim Akhtar, linux-riscv, Karol Gugala,
	Qiang Zhao, Hitomi Hasegawa, Rob Herring, linux-samsung-soc,
	linux-aspeed, Ruan Jinjie, Yinbo Zhu, Jon Hunter, linux-rockchip,
	Gabriel Somlo, Andy Gross, Huisong Li, Joel Stanley, Sumit Gupta,
	zhang.songyi, Zev Weiss, linux-pm, linux-arm-msm, Yang Yingliang,
	Lubomir Rintel, Krzysztof Halasa, loongarch, Santosh Shilimkar,
	Matthias Brugger, Michal Simek, linux-arm-kernel,
	AngeloGioacchino Del Regno, Daire McNamara, linux-kernel,
	Shang XiaoJing, Leo Li, Konrad Dybcio, Andrew Jeffery,
	Krzysztof Kozlowski, Pengutronix Kernel Team, linux-mediatek,
	Nick Alcock, linuxppc-dev


[-- Attachment #1.1: Type: text/plain, Size: 2272 bytes --]

On Wed, Sep 27, 2023 at 04:01:58PM -0700, Bjorn Andersson wrote:
> On Wed, Sep 27, 2023 at 10:43:16AM +0200, Arnd Bergmann wrote:
> > On Wed, Sep 27, 2023, at 04:25, Joel Stanley wrote:
> > > On Mon, 25 Sept 2023 at 09:55, Uwe Kleine-König <u.kleine-koenig@pengutronix.de> wrote:
> > >>
> > >> this series converts all platform drivers below drivers/soc to use
> > >> .remove_new(). The motivation is to get rid of an integer return code
> > >> that is (mostly) ignored by the platform driver core and error prone on
> > >> the driver side.
> > >>
> > >> See commit 5c5a7680e67b ("platform: Provide a remove callback that
> > >> returns no value") for an extended explanation and the eventual goal.
> > >>
> > >> As there is no single maintainer team for drivers/soc, I suggest the
> > >> individual maintainers to pick up "their" patches.
> > >
> > > I'd be happy if Arnd merged the lot at once. Arnd, what do you think?
> > >
> > > If that will be too messy then I understand. I have queued the aspeed
> > > ones locally and will push that out if we decide that's the best way
> > > to go.
> > 
> > The main downside of merging it all at once through the soc tree
> > is that there may be patches that conflict with other work going on
> > in individual drivers.
> > 
> > What I'd suggest doing here is:
> > 
> > - have platform maintainers pick up patches for their drivers
> >   if that is their preference for any reason
> 
> I'd prefer this for the qcom drivers at least, please let me know if you
> would like me to proceed.

I can send a pull request as Arnd suggested. So iff you want the qcom
drivers not be a part of that PR, just make sure they appear in next
during the next week. :-)

(I'm not sure if "this" in your last quoted sentence is "platform
maintainers pick up" or "merging it all at once through the soc tree". I
think you mean the former. Still if you don't want me to pick up the
qcom patches and won't manage to make them appear in next via your tree,
I ask you to tell me explicitly to skip these in my PR.)

Best regards and thanks,
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

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

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

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

* Re: [PATCH 00/40] soc: Convert to platform remove callback returning void
@ 2023-09-28  6:14         ` Uwe Kleine-König
  0 siblings, 0 replies; 133+ messages in thread
From: Uwe Kleine-König @ 2023-09-28  6:14 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Nishanth Menon, Herve Codina, Heiko Stübner,
	Mateusz Holenko, Muhammad Usama Anjum, Matthias Brugger,
	Conor.Dooley, Thierry Reding, Alim Akhtar, linux-riscv,
	Karol Gugala, Qiang Zhao, Hitomi Hasegawa, Rob Herring,
	linux-samsung-soc, linux-aspeed, Ruan Jinjie, Yinbo Zhu,
	Jon Hunter, linux-rockchip, Gabriel Somlo, Andy Gross,
	Huisong Li, Joel Stanley, Yang Yingliang, Sumit Gupta

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

On Wed, Sep 27, 2023 at 04:01:58PM -0700, Bjorn Andersson wrote:
> On Wed, Sep 27, 2023 at 10:43:16AM +0200, Arnd Bergmann wrote:
> > On Wed, Sep 27, 2023, at 04:25, Joel Stanley wrote:
> > > On Mon, 25 Sept 2023 at 09:55, Uwe Kleine-König <u.kleine-koenig@pengutronix.de> wrote:
> > >>
> > >> this series converts all platform drivers below drivers/soc to use
> > >> .remove_new(). The motivation is to get rid of an integer return code
> > >> that is (mostly) ignored by the platform driver core and error prone on
> > >> the driver side.
> > >>
> > >> See commit 5c5a7680e67b ("platform: Provide a remove callback that
> > >> returns no value") for an extended explanation and the eventual goal.
> > >>
> > >> As there is no single maintainer team for drivers/soc, I suggest the
> > >> individual maintainers to pick up "their" patches.
> > >
> > > I'd be happy if Arnd merged the lot at once. Arnd, what do you think?
> > >
> > > If that will be too messy then I understand. I have queued the aspeed
> > > ones locally and will push that out if we decide that's the best way
> > > to go.
> > 
> > The main downside of merging it all at once through the soc tree
> > is that there may be patches that conflict with other work going on
> > in individual drivers.
> > 
> > What I'd suggest doing here is:
> > 
> > - have platform maintainers pick up patches for their drivers
> >   if that is their preference for any reason
> 
> I'd prefer this for the qcom drivers at least, please let me know if you
> would like me to proceed.

I can send a pull request as Arnd suggested. So iff you want the qcom
drivers not be a part of that PR, just make sure they appear in next
during the next week. :-)

(I'm not sure if "this" in your last quoted sentence is "platform
maintainers pick up" or "merging it all at once through the soc tree". I
think you mean the former. Still if you don't want me to pick up the
qcom patches and won't manage to make them appear in next via your tree,
I ask you to tell me explicitly to skip these in my PR.)

Best regards and thanks,
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

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

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

* Re: [PATCH 30/40] soc/rockchip: io-domain: Convert to platform remove callback returning void
  2023-09-25  9:55   ` Uwe Kleine-König
  (?)
@ 2023-10-01 22:58     ` Heiko Stuebner
  -1 siblings, 0 replies; 133+ messages in thread
From: Heiko Stuebner @ 2023-10-01 22:58 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: linux-arm-kernel, linux-rockchip, linux-kernel, kernel

Am Montag, 25. September 2023, 11:55:21 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 ignored (apart
> from emitting a warning) 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. Eventually after all drivers
> are converted, .remove_new() will be renamed to .remove().
> 
> 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>

applied for 6.7

Thanks
Heiko



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

* Re: [PATCH 30/40] soc/rockchip: io-domain: Convert to platform remove callback returning void
@ 2023-10-01 22:58     ` Heiko Stuebner
  0 siblings, 0 replies; 133+ messages in thread
From: Heiko Stuebner @ 2023-10-01 22:58 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: linux-arm-kernel, linux-rockchip, linux-kernel, kernel

Am Montag, 25. September 2023, 11:55:21 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 ignored (apart
> from emitting a warning) 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. Eventually after all drivers
> are converted, .remove_new() will be renamed to .remove().
> 
> 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>

applied for 6.7

Thanks
Heiko



_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

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

* Re: [PATCH 30/40] soc/rockchip: io-domain: Convert to platform remove callback returning void
@ 2023-10-01 22:58     ` Heiko Stuebner
  0 siblings, 0 replies; 133+ messages in thread
From: Heiko Stuebner @ 2023-10-01 22:58 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: linux-arm-kernel, linux-rockchip, linux-kernel, kernel

Am Montag, 25. September 2023, 11:55:21 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 ignored (apart
> from emitting a warning) 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. Eventually after all drivers
> are converted, .remove_new() will be renamed to .remove().
> 
> 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>

applied for 6.7

Thanks
Heiko



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 40/40] soc/xilinx: zynqmp_power: Convert to platform remove callback returning void
  2023-09-25  9:55   ` Uwe Kleine-König
@ 2023-10-02  9:13     ` Michal Simek
  -1 siblings, 0 replies; 133+ messages in thread
From: Michal Simek @ 2023-10-02  9:13 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Rob Herring, Ruan Jinjie, Arnd Bergmann, linux-arm-kernel,
	linux-kernel, kernel



On 9/25/23 11:55, 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 ignored (apart
> from emitting a warning) 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. Eventually after all drivers
> are converted, .remove_new() will be renamed to .remove().
> 
> 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/soc/xilinx/zynqmp_power.c | 6 ++----
>   1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/soc/xilinx/zynqmp_power.c b/drivers/soc/xilinx/zynqmp_power.c
> index c2c819701eec..9d27f850f491 100644
> --- a/drivers/soc/xilinx/zynqmp_power.c
> +++ b/drivers/soc/xilinx/zynqmp_power.c
> @@ -275,7 +275,7 @@ static int zynqmp_pm_probe(struct platform_device *pdev)
>   	return 0;
>   }
>   
> -static int zynqmp_pm_remove(struct platform_device *pdev)
> +static void zynqmp_pm_remove(struct platform_device *pdev)
>   {
>   	sysfs_remove_file(&pdev->dev.kobj, &dev_attr_suspend_mode.attr);
>   	if (event_registered)
> @@ -283,8 +283,6 @@ static int zynqmp_pm_remove(struct platform_device *pdev)
>   
>   	if (!rx_chan)
>   		mbox_free_channel(rx_chan);
> -
> -	return 0;
>   }
>   
>   static const struct of_device_id pm_of_match[] = {
> @@ -295,7 +293,7 @@ MODULE_DEVICE_TABLE(of, pm_of_match);
>   
>   static struct platform_driver zynqmp_pm_platform_driver = {
>   	.probe = zynqmp_pm_probe,
> -	.remove = zynqmp_pm_remove,
> +	.remove_new = zynqmp_pm_remove,
>   	.driver = {
>   		.name = "zynqmp_power",
>   		.of_match_table = pm_of_match,

Applied only this patch.
Thanks,
Michal

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

* Re: [PATCH 40/40] soc/xilinx: zynqmp_power: Convert to platform remove callback returning void
@ 2023-10-02  9:13     ` Michal Simek
  0 siblings, 0 replies; 133+ messages in thread
From: Michal Simek @ 2023-10-02  9:13 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Rob Herring, Ruan Jinjie, Arnd Bergmann, linux-arm-kernel,
	linux-kernel, kernel



On 9/25/23 11:55, 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 ignored (apart
> from emitting a warning) 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. Eventually after all drivers
> are converted, .remove_new() will be renamed to .remove().
> 
> 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/soc/xilinx/zynqmp_power.c | 6 ++----
>   1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/soc/xilinx/zynqmp_power.c b/drivers/soc/xilinx/zynqmp_power.c
> index c2c819701eec..9d27f850f491 100644
> --- a/drivers/soc/xilinx/zynqmp_power.c
> +++ b/drivers/soc/xilinx/zynqmp_power.c
> @@ -275,7 +275,7 @@ static int zynqmp_pm_probe(struct platform_device *pdev)
>   	return 0;
>   }
>   
> -static int zynqmp_pm_remove(struct platform_device *pdev)
> +static void zynqmp_pm_remove(struct platform_device *pdev)
>   {
>   	sysfs_remove_file(&pdev->dev.kobj, &dev_attr_suspend_mode.attr);
>   	if (event_registered)
> @@ -283,8 +283,6 @@ static int zynqmp_pm_remove(struct platform_device *pdev)
>   
>   	if (!rx_chan)
>   		mbox_free_channel(rx_chan);
> -
> -	return 0;
>   }
>   
>   static const struct of_device_id pm_of_match[] = {
> @@ -295,7 +293,7 @@ MODULE_DEVICE_TABLE(of, pm_of_match);
>   
>   static struct platform_driver zynqmp_pm_platform_driver = {
>   	.probe = zynqmp_pm_probe,
> -	.remove = zynqmp_pm_remove,
> +	.remove_new = zynqmp_pm_remove,
>   	.driver = {
>   		.name = "zynqmp_power",
>   		.of_match_table = pm_of_match,

Applied only this patch.
Thanks,
Michal

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: (subset) [PATCH 00/40] soc: Convert to platform remove callback returning void
  2023-09-25  9:54 ` Uwe Kleine-König
  (?)
  (?)
@ 2023-10-02 14:13   ` Nishanth Menon
  -1 siblings, 0 replies; 133+ messages in thread
From: Nishanth Menon @ 2023-10-02 14:13 UTC (permalink / raw)
  To: Joel Stanley, Li Yang, Herve Codina, Qiang Zhao, Hitomi Hasegawa,
	Huisong Li, Krzysztof Halasa, Karol Gugala, Mateusz Holenko,
	Gabriel Somlo, Yinbo Zhu, Matthias Brugger, Conor Dooley,
	Daire McNamara, Krzysztof Kozlowski, Andy Gross, Bjorn Andersson,
	Konrad Dybcio, Heiko Stuebner, Thierry Reding, Jonathan Hunter,
	Sumit Gupta, Shang XiaoJing, Muhammad Usama Anjum, Rob Herring,
	Santosh Shilimkar, Michal Simek, Uwe Kleine-König
  Cc: Nishanth Menon, Andrew Jeffery, linux-arm-kernel, linux-aspeed,
	linux-kernel, Arnd Bergmann, Zev Weiss, linuxppc-dev, loongarch,
	AngeloGioacchino Del Regno, linux-mediatek, linux-riscv,
	zhang songyi, Lubomir Rintel, linux-arm-msm, linux-rockchip,
	Alim Akhtar, linux-samsung-soc, Nick Alcock, Yang Yingliang,
	linux-tegra, linux-pm, Ruan Jinjie, kernel

Hi Uwe Kleine-König,

On Mon, 25 Sep 2023 11:54:51 +0200, Uwe Kleine-König wrote:
> this series converts all platform drivers below drivers/soc to use
> .remove_new(). The motivation is to get rid of an integer return code
> that is (mostly) ignored by the platform driver core and error prone on
> the driver side.
> 
> See commit 5c5a7680e67b ("platform: Provide a remove callback that
> returns no value") for an extended explanation and the eventual goal.
> 
> [...]

I have applied the following to branch ti-drivers-soc-next on [1].
Thank you!

[33/40] soc/ti: k3-ringacc: Convert to platform remove callback returning void
        commit: f34b902c5ba67841902cd7f0e24e64bb82f69cb4
[34/40] soc/ti: knav_dma: Convert to platform remove callback returning void
        commit: 3af4ec7c7dd39a2c4618f6536b2e7b73a19be169
[35/40] soc/ti: knav_qmss_queue: Convert to platform remove callback returning void
        commit: af97160a0c5f1908c6f2830023fb93baac4451d3
[36/40] soc/ti: pm33xx: Convert to platform remove callback returning void
        commit: 9eb950e9fffc5337bfe1798cf89ce4d97a4f1221
[37/40] soc/ti: pruss: Convert to platform remove callback returning void
        commit: d183b20d340b7c098f44cb5c02f4ced01cfd0b16
[38/40] soc/ti: smartreflex: Convert to platform remove callback returning void
        commit: ba03aab9bfb4c9d456419da3891375d45c6bfe15
[39/40] soc/ti: wkup_m3_ipc: Convert to platform remove callback returning void
        commit: 82e83cb51c87b5bf3ab83f7c7b150c19400056c2

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent up the chain during
the next merge window (or sooner if it is a relevant bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux.git
-- 
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* Re: (subset) [PATCH 00/40] soc: Convert to platform remove callback returning void
@ 2023-10-02 14:13   ` Nishanth Menon
  0 siblings, 0 replies; 133+ messages in thread
From: Nishanth Menon @ 2023-10-02 14:13 UTC (permalink / raw)
  To: Joel Stanley, Li Yang, Herve Codina, Qiang Zhao, Hitomi Hasegawa,
	Huisong Li, Krzysztof Halasa, Karol Gugala, Mateusz Holenko,
	Gabriel Somlo, Yinbo Zhu, Matthias Brugger, Conor Dooley,
	Daire McNamara, Krzysztof Kozlowski, Andy Gross, Bjorn Andersson,
	Konrad Dybcio, Heiko Stuebner, Thierry Reding, Jonathan Hunter,
	Sumit Gupta, Shang XiaoJing, Muhammad Usama Anjum, Rob Herring,
	Santosh Shilimkar, Michal Simek, Uwe Kleine-König
  Cc: Nishanth Menon, Andrew Jeffery, linux-arm-kernel, linux-aspeed,
	linux-kernel, Arnd Bergmann, Zev Weiss, linuxppc-dev, loongarch,
	AngeloGioacchino Del Regno, linux-mediatek, linux-riscv,
	zhang songyi, Lubomir Rintel, linux-arm-msm, linux-rockchip,
	Alim Akhtar, linux-samsung-soc, Nick Alcock, Yang Yingliang,
	linux-tegra, linux-pm, Ruan Jinjie, kernel

Hi Uwe Kleine-König,

On Mon, 25 Sep 2023 11:54:51 +0200, Uwe Kleine-König wrote:
> this series converts all platform drivers below drivers/soc to use
> .remove_new(). The motivation is to get rid of an integer return code
> that is (mostly) ignored by the platform driver core and error prone on
> the driver side.
> 
> See commit 5c5a7680e67b ("platform: Provide a remove callback that
> returns no value") for an extended explanation and the eventual goal.
> 
> [...]

I have applied the following to branch ti-drivers-soc-next on [1].
Thank you!

[33/40] soc/ti: k3-ringacc: Convert to platform remove callback returning void
        commit: f34b902c5ba67841902cd7f0e24e64bb82f69cb4
[34/40] soc/ti: knav_dma: Convert to platform remove callback returning void
        commit: 3af4ec7c7dd39a2c4618f6536b2e7b73a19be169
[35/40] soc/ti: knav_qmss_queue: Convert to platform remove callback returning void
        commit: af97160a0c5f1908c6f2830023fb93baac4451d3
[36/40] soc/ti: pm33xx: Convert to platform remove callback returning void
        commit: 9eb950e9fffc5337bfe1798cf89ce4d97a4f1221
[37/40] soc/ti: pruss: Convert to platform remove callback returning void
        commit: d183b20d340b7c098f44cb5c02f4ced01cfd0b16
[38/40] soc/ti: smartreflex: Convert to platform remove callback returning void
        commit: ba03aab9bfb4c9d456419da3891375d45c6bfe15
[39/40] soc/ti: wkup_m3_ipc: Convert to platform remove callback returning void
        commit: 82e83cb51c87b5bf3ab83f7c7b150c19400056c2

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent up the chain during
the next merge window (or sooner if it is a relevant bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux.git
-- 
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D


_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

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

* Re: (subset) [PATCH 00/40] soc: Convert to platform remove callback returning void
@ 2023-10-02 14:13   ` Nishanth Menon
  0 siblings, 0 replies; 133+ messages in thread
From: Nishanth Menon @ 2023-10-02 14:13 UTC (permalink / raw)
  To: Joel Stanley, Li Yang, Herve Codina, Qiang Zhao, Hitomi Hasegawa,
	Huisong Li, Krzysztof Halasa, Karol Gugala, Mateusz Holenko,
	Gabriel Somlo, Yinbo Zhu, Matthias Brugger, Conor Dooley,
	Daire McNamara, Krzysztof Kozlowski, Andy Gross, Bjorn Andersson,
	Konrad Dybcio, Heiko Stuebner, Thierry Reding, Jonathan Hunter,
	Sumit Gupta, Shang XiaoJing, Muhammad Usama Anjum, Rob Herring,
	Santosh Shilimkar, Michal Simek, Uwe Kleine-König
  Cc: Nishanth Menon, Andrew Jeffery, linux-arm-kernel, linux-aspeed,
	linux-kernel, Arnd Bergmann, Zev Weiss, linuxppc-dev, loongarch,
	AngeloGioacchino Del Regno, linux-mediatek, linux-riscv,
	zhang songyi, Lubomir Rintel, linux-arm-msm, linux-rockchip,
	Alim Akhtar, linux-samsung-soc, Nick Alcock, Yang Yingliang,
	linux-tegra, linux-pm, Ruan Jinjie, kernel

Hi Uwe Kleine-König,

On Mon, 25 Sep 2023 11:54:51 +0200, Uwe Kleine-König wrote:
> this series converts all platform drivers below drivers/soc to use
> .remove_new(). The motivation is to get rid of an integer return code
> that is (mostly) ignored by the platform driver core and error prone on
> the driver side.
> 
> See commit 5c5a7680e67b ("platform: Provide a remove callback that
> returns no value") for an extended explanation and the eventual goal.
> 
> [...]

I have applied the following to branch ti-drivers-soc-next on [1].
Thank you!

[33/40] soc/ti: k3-ringacc: Convert to platform remove callback returning void
        commit: f34b902c5ba67841902cd7f0e24e64bb82f69cb4
[34/40] soc/ti: knav_dma: Convert to platform remove callback returning void
        commit: 3af4ec7c7dd39a2c4618f6536b2e7b73a19be169
[35/40] soc/ti: knav_qmss_queue: Convert to platform remove callback returning void
        commit: af97160a0c5f1908c6f2830023fb93baac4451d3
[36/40] soc/ti: pm33xx: Convert to platform remove callback returning void
        commit: 9eb950e9fffc5337bfe1798cf89ce4d97a4f1221
[37/40] soc/ti: pruss: Convert to platform remove callback returning void
        commit: d183b20d340b7c098f44cb5c02f4ced01cfd0b16
[38/40] soc/ti: smartreflex: Convert to platform remove callback returning void
        commit: ba03aab9bfb4c9d456419da3891375d45c6bfe15
[39/40] soc/ti: wkup_m3_ipc: Convert to platform remove callback returning void
        commit: 82e83cb51c87b5bf3ab83f7c7b150c19400056c2

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent up the chain during
the next merge window (or sooner if it is a relevant bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux.git
-- 
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D


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

* Re: (subset) [PATCH 00/40] soc: Convert to platform remove callback returning void
@ 2023-10-02 14:13   ` Nishanth Menon
  0 siblings, 0 replies; 133+ messages in thread
From: Nishanth Menon @ 2023-10-02 14:13 UTC (permalink / raw)
  To: Joel Stanley, Li Yang, Herve Codina, Qiang Zhao, Hitomi Hasegawa,
	Huisong Li, Krzysztof Halasa, Karol Gugala, Mateusz Holenko,
	Gabriel Somlo, Yinbo Zhu, Matthias Brugger, Conor Dooley,
	Daire McNamara, Krzysztof Kozlowski, Andy Gross, Bjorn Andersson,
	Konrad Dybcio, Heiko Stuebner, Thierry Reding, Jonathan Hunter,
	Sumit Gupta, Shang XiaoJing, Muhammad Usama Anjum, Rob Herring,
	Santosh Shilimkar, Michal Simek, Uwe Kleine-König
  Cc: Nishanth Menon, Zev Weiss, Alim Akhtar, linux-riscv,
	linux-samsung-soc, linux-aspeed, Ruan Jinjie, linux-rockchip,
	Yang Yingliang, Nick Alcock, Arnd Bergmann, linux-pm,
	linux-arm-msm, Lubomir Rintel, linux-mediatek, loongarch,
	linux-tegra, linux-arm-kernel, AngeloGioacchino Del Regno,
	Andrew Jeffery, linux-kernel, kernel, zhang songyi, linuxppc-dev

Hi Uwe Kleine-König,

On Mon, 25 Sep 2023 11:54:51 +0200, Uwe Kleine-König wrote:
> this series converts all platform drivers below drivers/soc to use
> .remove_new(). The motivation is to get rid of an integer return code
> that is (mostly) ignored by the platform driver core and error prone on
> the driver side.
> 
> See commit 5c5a7680e67b ("platform: Provide a remove callback that
> returns no value") for an extended explanation and the eventual goal.
> 
> [...]

I have applied the following to branch ti-drivers-soc-next on [1].
Thank you!

[33/40] soc/ti: k3-ringacc: Convert to platform remove callback returning void
        commit: f34b902c5ba67841902cd7f0e24e64bb82f69cb4
[34/40] soc/ti: knav_dma: Convert to platform remove callback returning void
        commit: 3af4ec7c7dd39a2c4618f6536b2e7b73a19be169
[35/40] soc/ti: knav_qmss_queue: Convert to platform remove callback returning void
        commit: af97160a0c5f1908c6f2830023fb93baac4451d3
[36/40] soc/ti: pm33xx: Convert to platform remove callback returning void
        commit: 9eb950e9fffc5337bfe1798cf89ce4d97a4f1221
[37/40] soc/ti: pruss: Convert to platform remove callback returning void
        commit: d183b20d340b7c098f44cb5c02f4ced01cfd0b16
[38/40] soc/ti: smartreflex: Convert to platform remove callback returning void
        commit: ba03aab9bfb4c9d456419da3891375d45c6bfe15
[39/40] soc/ti: wkup_m3_ipc: Convert to platform remove callback returning void
        commit: 82e83cb51c87b5bf3ab83f7c7b150c19400056c2

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent up the chain during
the next merge window (or sooner if it is a relevant bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux.git
-- 
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D


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

* Re: (subset) [PATCH 00/40] soc: Convert to platform remove callback returning void
  2023-09-25  9:54 ` Uwe Kleine-König
  (?)
  (?)
@ 2023-10-03  1:10   ` Bjorn Andersson
  -1 siblings, 0 replies; 133+ messages in thread
From: Bjorn Andersson @ 2023-10-03  1:10 UTC (permalink / raw)
  To: Joel Stanley, Li Yang, Herve Codina, Qiang Zhao, Hitomi Hasegawa,
	Huisong Li, Krzysztof Halasa, Karol Gugala, Mateusz Holenko,
	Gabriel Somlo, Yinbo Zhu, Matthias Brugger, Conor Dooley,
	Daire McNamara, Krzysztof Kozlowski, Andy Gross, Konrad Dybcio,
	Heiko Stuebner, Thierry Reding, Jonathan Hunter, Sumit Gupta,
	Shang XiaoJing, Muhammad Usama Anjum, Rob Herring,
	Nishanth Menon, Santosh Shilimkar, Michal Simek,
	Uwe Kleine-König
  Cc: Andrew Jeffery, linux-arm-kernel, linux-aspeed, linux-kernel,
	Arnd Bergmann, Zev Weiss, linuxppc-dev, loongarch,
	AngeloGioacchino Del Regno, linux-mediatek, linux-riscv,
	zhang songyi, Lubomir Rintel, linux-arm-msm, linux-rockchip,
	Alim Akhtar, linux-samsung-soc, Nick Alcock, Yang Yingliang,
	linux-tegra, linux-pm, Ruan Jinjie, kernel


On Mon, 25 Sep 2023 11:54:51 +0200, Uwe Kleine-König wrote:
> this series converts all platform drivers below drivers/soc to use
> .remove_new(). The motivation is to get rid of an integer return code
> that is (mostly) ignored by the platform driver core and error prone on
> the driver side.
> 
> See commit 5c5a7680e67b ("platform: Provide a remove callback that
> returns no value") for an extended explanation and the eventual goal.
> 
> [...]

Applied, thanks!

[18/40] soc/qcom: icc-bwmon: Convert to platform remove callback returning void
        commit: dd714c568ed4e6f79017be45077de71e9908af03
[19/40] soc/qcom: llcc-qcom: Convert to platform remove callback returning void
        commit: d85a9d18a58156fc8b5ab185e00e078adaaeefde
[20/40] soc/qcom: ocmem: Convert to platform remove callback returning void
        commit: 0b742c498bcd7d215501b10fe9df72a16237735a
[21/40] soc/qcom: pmic_glink: Convert to platform remove callback returning void
        commit: 4b3373e42dc2caa34394ac090c8c70bed49badd6
[22/40] soc/qcom: qcom_aoss: Convert to platform remove callback returning void
        commit: ffbe84a514f863a46a85c1e47b2b6d930b1b463e
[23/40] soc/qcom: qcom_gsbi: Convert to platform remove callback returning void
        commit: 57b31729bd2c72b00d400106e18db91e9d95d3c3
[24/40] soc/qcom: qcom_stats: Convert to platform remove callback returning void
        commit: a47ff90bf2f93ce4ca99858948a74a0c10a2bc45
[25/40] soc/qcom: rmtfs_mem: Convert to platform remove callback returning void
        commit: 7c93da5b8b69d4e4e7270c33ba3206af43930e1d
[26/40] soc/qcom: smem: Convert to platform remove callback returning void
        commit: 4b8dee9a34d51a61f60add996fae6a7140a20ae5
[27/40] soc/qcom: smp2p: Convert to platform remove callback returning void
        commit: 1cd966c2dc19654ed08c843e5c933db8c1349636
[28/40] soc/qcom: smsm: Convert to platform remove callback returning void
        commit: bdd7cc62cf69fe989557445d65d6c8cb2f956518
[29/40] soc/qcom: socinfo: Convert to platform remove callback returning void
        commit: c0989f7d1264b2b1885345a28a32fd5e1e61f9c7

Best regards,
-- 
Bjorn Andersson <andersson@kernel.org>

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

* Re: (subset) [PATCH 00/40] soc: Convert to platform remove callback returning void
@ 2023-10-03  1:10   ` Bjorn Andersson
  0 siblings, 0 replies; 133+ messages in thread
From: Bjorn Andersson @ 2023-10-03  1:10 UTC (permalink / raw)
  To: Joel Stanley, Li Yang, Herve Codina, Qiang Zhao, Hitomi Hasegawa,
	Huisong Li, Krzysztof Halasa, Karol Gugala, Mateusz Holenko,
	Gabriel Somlo, Yinbo Zhu, Matthias Brugger, Conor Dooley,
	Daire McNamara, Krzysztof Kozlowski, Andy Gross, Konrad Dybcio,
	Heiko Stuebner, Thierry Reding, Jonathan Hunter, Sumit Gupta,
	Shang XiaoJing, Muhammad Usama Anjum, Rob Herring,
	Nishanth Menon, Santosh Shilimkar, Michal Simek,
	Uwe Kleine-König
  Cc: Andrew Jeffery, linux-arm-kernel, linux-aspeed, linux-kernel,
	Arnd Bergmann, Zev Weiss, linuxppc-dev, loongarch,
	AngeloGioacchino Del Regno, linux-mediatek, linux-riscv,
	zhang songyi, Lubomir Rintel, linux-arm-msm, linux-rockchip,
	Alim Akhtar, linux-samsung-soc, Nick Alcock, Yang Yingliang,
	linux-tegra, linux-pm, Ruan Jinjie, kernel


On Mon, 25 Sep 2023 11:54:51 +0200, Uwe Kleine-König wrote:
> this series converts all platform drivers below drivers/soc to use
> .remove_new(). The motivation is to get rid of an integer return code
> that is (mostly) ignored by the platform driver core and error prone on
> the driver side.
> 
> See commit 5c5a7680e67b ("platform: Provide a remove callback that
> returns no value") for an extended explanation and the eventual goal.
> 
> [...]

Applied, thanks!

[18/40] soc/qcom: icc-bwmon: Convert to platform remove callback returning void
        commit: dd714c568ed4e6f79017be45077de71e9908af03
[19/40] soc/qcom: llcc-qcom: Convert to platform remove callback returning void
        commit: d85a9d18a58156fc8b5ab185e00e078adaaeefde
[20/40] soc/qcom: ocmem: Convert to platform remove callback returning void
        commit: 0b742c498bcd7d215501b10fe9df72a16237735a
[21/40] soc/qcom: pmic_glink: Convert to platform remove callback returning void
        commit: 4b3373e42dc2caa34394ac090c8c70bed49badd6
[22/40] soc/qcom: qcom_aoss: Convert to platform remove callback returning void
        commit: ffbe84a514f863a46a85c1e47b2b6d930b1b463e
[23/40] soc/qcom: qcom_gsbi: Convert to platform remove callback returning void
        commit: 57b31729bd2c72b00d400106e18db91e9d95d3c3
[24/40] soc/qcom: qcom_stats: Convert to platform remove callback returning void
        commit: a47ff90bf2f93ce4ca99858948a74a0c10a2bc45
[25/40] soc/qcom: rmtfs_mem: Convert to platform remove callback returning void
        commit: 7c93da5b8b69d4e4e7270c33ba3206af43930e1d
[26/40] soc/qcom: smem: Convert to platform remove callback returning void
        commit: 4b8dee9a34d51a61f60add996fae6a7140a20ae5
[27/40] soc/qcom: smp2p: Convert to platform remove callback returning void
        commit: 1cd966c2dc19654ed08c843e5c933db8c1349636
[28/40] soc/qcom: smsm: Convert to platform remove callback returning void
        commit: bdd7cc62cf69fe989557445d65d6c8cb2f956518
[29/40] soc/qcom: socinfo: Convert to platform remove callback returning void
        commit: c0989f7d1264b2b1885345a28a32fd5e1e61f9c7

Best regards,
-- 
Bjorn Andersson <andersson@kernel.org>

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* Re: (subset) [PATCH 00/40] soc: Convert to platform remove callback returning void
@ 2023-10-03  1:10   ` Bjorn Andersson
  0 siblings, 0 replies; 133+ messages in thread
From: Bjorn Andersson @ 2023-10-03  1:10 UTC (permalink / raw)
  To: Joel Stanley, Li Yang, Herve Codina, Qiang Zhao, Hitomi Hasegawa,
	Huisong Li, Krzysztof Halasa, Karol Gugala, Mateusz Holenko,
	Gabriel Somlo, Yinbo Zhu, Matthias Brugger, Conor Dooley,
	Daire McNamara, Krzysztof Kozlowski, Andy Gross, Konrad Dybcio,
	Heiko Stuebner, Thierry Reding, Jonathan Hunter, Sumit Gupta,
	Shang XiaoJing, Muhammad Usama Anjum, Rob Herring,
	Nishanth Menon, Santosh Shilimkar, Michal Simek,
	Uwe Kleine-König
  Cc: Zev Weiss, Alim Akhtar, linux-riscv, linux-samsung-soc,
	linux-aspeed, Ruan Jinjie, linux-rockchip, Yang Yingliang,
	Nick Alcock, Arnd Bergmann, linux-pm, linux-arm-msm,
	Lubomir Rintel, linux-mediatek, loongarch, linux-tegra,
	linux-arm-kernel, AngeloGioacchino Del Regno, Andrew Jeffery,
	linux-kernel, kernel, zhang songyi, linuxppc-dev


On Mon, 25 Sep 2023 11:54:51 +0200, Uwe Kleine-König wrote:
> this series converts all platform drivers below drivers/soc to use
> .remove_new(). The motivation is to get rid of an integer return code
> that is (mostly) ignored by the platform driver core and error prone on
> the driver side.
> 
> See commit 5c5a7680e67b ("platform: Provide a remove callback that
> returns no value") for an extended explanation and the eventual goal.
> 
> [...]

Applied, thanks!

[18/40] soc/qcom: icc-bwmon: Convert to platform remove callback returning void
        commit: dd714c568ed4e6f79017be45077de71e9908af03
[19/40] soc/qcom: llcc-qcom: Convert to platform remove callback returning void
        commit: d85a9d18a58156fc8b5ab185e00e078adaaeefde
[20/40] soc/qcom: ocmem: Convert to platform remove callback returning void
        commit: 0b742c498bcd7d215501b10fe9df72a16237735a
[21/40] soc/qcom: pmic_glink: Convert to platform remove callback returning void
        commit: 4b3373e42dc2caa34394ac090c8c70bed49badd6
[22/40] soc/qcom: qcom_aoss: Convert to platform remove callback returning void
        commit: ffbe84a514f863a46a85c1e47b2b6d930b1b463e
[23/40] soc/qcom: qcom_gsbi: Convert to platform remove callback returning void
        commit: 57b31729bd2c72b00d400106e18db91e9d95d3c3
[24/40] soc/qcom: qcom_stats: Convert to platform remove callback returning void
        commit: a47ff90bf2f93ce4ca99858948a74a0c10a2bc45
[25/40] soc/qcom: rmtfs_mem: Convert to platform remove callback returning void
        commit: 7c93da5b8b69d4e4e7270c33ba3206af43930e1d
[26/40] soc/qcom: smem: Convert to platform remove callback returning void
        commit: 4b8dee9a34d51a61f60add996fae6a7140a20ae5
[27/40] soc/qcom: smp2p: Convert to platform remove callback returning void
        commit: 1cd966c2dc19654ed08c843e5c933db8c1349636
[28/40] soc/qcom: smsm: Convert to platform remove callback returning void
        commit: bdd7cc62cf69fe989557445d65d6c8cb2f956518
[29/40] soc/qcom: socinfo: Convert to platform remove callback returning void
        commit: c0989f7d1264b2b1885345a28a32fd5e1e61f9c7

Best regards,
-- 
Bjorn Andersson <andersson@kernel.org>

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

* Re: (subset) [PATCH 00/40] soc: Convert to platform remove callback returning void
@ 2023-10-03  1:10   ` Bjorn Andersson
  0 siblings, 0 replies; 133+ messages in thread
From: Bjorn Andersson @ 2023-10-03  1:10 UTC (permalink / raw)
  To: Joel Stanley, Li Yang, Herve Codina, Qiang Zhao, Hitomi Hasegawa,
	Huisong Li, Krzysztof Halasa, Karol Gugala, Mateusz Holenko,
	Gabriel Somlo, Yinbo Zhu, Matthias Brugger, Conor Dooley,
	Daire McNamara, Krzysztof Kozlowski, Andy Gross, Konrad Dybcio,
	Heiko Stuebner, Thierry Reding, Jonathan Hunter, Sumit Gupta,
	Shang XiaoJing, Muhammad Usama Anjum, Rob Herring,
	Nishanth Menon, Santosh Shilimkar, Michal Simek,
	Uwe Kleine-König
  Cc: Andrew Jeffery, linux-arm-kernel, linux-aspeed, linux-kernel,
	Arnd Bergmann, Zev Weiss, linuxppc-dev, loongarch,
	AngeloGioacchino Del Regno, linux-mediatek, linux-riscv,
	zhang songyi, Lubomir Rintel, linux-arm-msm, linux-rockchip,
	Alim Akhtar, linux-samsung-soc, Nick Alcock, Yang Yingliang,
	linux-tegra, linux-pm, Ruan Jinjie, kernel


On Mon, 25 Sep 2023 11:54:51 +0200, Uwe Kleine-König wrote:
> this series converts all platform drivers below drivers/soc to use
> .remove_new(). The motivation is to get rid of an integer return code
> that is (mostly) ignored by the platform driver core and error prone on
> the driver side.
> 
> See commit 5c5a7680e67b ("platform: Provide a remove callback that
> returns no value") for an extended explanation and the eventual goal.
> 
> [...]

Applied, thanks!

[18/40] soc/qcom: icc-bwmon: Convert to platform remove callback returning void
        commit: dd714c568ed4e6f79017be45077de71e9908af03
[19/40] soc/qcom: llcc-qcom: Convert to platform remove callback returning void
        commit: d85a9d18a58156fc8b5ab185e00e078adaaeefde
[20/40] soc/qcom: ocmem: Convert to platform remove callback returning void
        commit: 0b742c498bcd7d215501b10fe9df72a16237735a
[21/40] soc/qcom: pmic_glink: Convert to platform remove callback returning void
        commit: 4b3373e42dc2caa34394ac090c8c70bed49badd6
[22/40] soc/qcom: qcom_aoss: Convert to platform remove callback returning void
        commit: ffbe84a514f863a46a85c1e47b2b6d930b1b463e
[23/40] soc/qcom: qcom_gsbi: Convert to platform remove callback returning void
        commit: 57b31729bd2c72b00d400106e18db91e9d95d3c3
[24/40] soc/qcom: qcom_stats: Convert to platform remove callback returning void
        commit: a47ff90bf2f93ce4ca99858948a74a0c10a2bc45
[25/40] soc/qcom: rmtfs_mem: Convert to platform remove callback returning void
        commit: 7c93da5b8b69d4e4e7270c33ba3206af43930e1d
[26/40] soc/qcom: smem: Convert to platform remove callback returning void
        commit: 4b8dee9a34d51a61f60add996fae6a7140a20ae5
[27/40] soc/qcom: smp2p: Convert to platform remove callback returning void
        commit: 1cd966c2dc19654ed08c843e5c933db8c1349636
[28/40] soc/qcom: smsm: Convert to platform remove callback returning void
        commit: bdd7cc62cf69fe989557445d65d6c8cb2f956518
[29/40] soc/qcom: socinfo: Convert to platform remove callback returning void
        commit: c0989f7d1264b2b1885345a28a32fd5e1e61f9c7

Best regards,
-- 
Bjorn Andersson <andersson@kernel.org>

_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

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

* [GIT PULL] Convert drivers/soc to struct platform_driver::remove_new()
  2023-09-28  6:14         ` Uwe Kleine-König
  (?)
  (?)
@ 2023-10-14 21:59           ` Uwe Kleine-König
  -1 siblings, 0 replies; 133+ messages in thread
From: Uwe Kleine-König @ 2023-10-14 21:59 UTC (permalink / raw)
  To: soc
  Cc: Nishanth Menon, Herve Codina, Bjorn Andersson,
	Heiko Stübner, Mateusz Holenko, Muhammad Usama Anjum,
	Matthias Brugger, Conor.Dooley, Thierry Reding, Alim Akhtar,
	linux-riscv, Karol Gugala, Qiang Zhao, Hitomi Hasegawa,
	Rob Herring, linux-samsung-soc, linux-aspeed, Ruan Jinjie,
	Yinbo Zhu, Jon Hunter, linux-rockchip, Gabriel Somlo, Andy Gross,
	Huisong Li, Joel Stanley, Yang Yingliang, Sumit Gupta,
	zhang.songyi, Zev Weiss, Arnd Bergmann, linux-pm, linux-arm-msm,
	Lubomir Rintel, Krzysztof Halasa, loongarch, Santosh Shilimkar,
	linux-tegra, Michal Simek, linux-arm-kernel,
	AngeloGioacchino Del Regno, Daire McNamara, linux-kernel,
	Shang XiaoJing, Leo Li, Konrad Dybcio, Andrew Jeffery,
	Krzysztof Kozlowski, Pengutronix Kernel Team, linux-mediatek,
	Nick Alcock, linuxppc-dev

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

Hello Arnd,

the following changes since commit 0bb80ecc33a8fb5a682236443c1e740d5c917d1d:

  Linux 6.6-rc1 (2023-09-10 16:28:41 -0700)

are available in the Git repository at:

  https://git.pengutronix.de/git/ukl/linux tags/platform-remove-void-soc-for-6.7-rc

for you to fetch changes up to e77e6e3e909d33361c58af848a96e1f7f71ba7e4:

  soc/pxa: ssp: Convert to platform remove callback returning void (2023-10-14 23:27:34 +0200)

----------------------------------------------------------------
Convert drivers/soc to struct platform_driver::remove_new()

This PR contains the patches I sent in the series available at
https://lore.kernel.org/all/20230925095532.1984344-1-u.kleine-koenig@pengutronix.de
that were not yet picked up in next as of next-20231013.

It converts all drivers below drivers/soc to let their remove callback
return void. See commit 5c5a7680e67b ("platform: Provide a remove
callback that returns no value") for the rationale.

----------------------------------------------------------------

On Thu, Sep 28, 2023 at 08:14:49AM +0200, Uwe Kleine-König wrote:
> On Wed, Sep 27, 2023 at 04:01:58PM -0700, Bjorn Andersson wrote:
> > On Wed, Sep 27, 2023 at 10:43:16AM +0200, Arnd Bergmann wrote:
> > > On Wed, Sep 27, 2023, at 04:25, Joel Stanley wrote:
> > > > On Mon, 25 Sept 2023 at 09:55, Uwe Kleine-König <u.kleine-koenig@pengutronix.de> wrote:
> > > >>
> > > >> this series converts all platform drivers below drivers/soc to use
> > > >> .remove_new(). The motivation is to get rid of an integer return code
> > > >> that is (mostly) ignored by the platform driver core and error prone on
> > > >> the driver side.
> > > >>
> > > >> See commit 5c5a7680e67b ("platform: Provide a remove callback that
> > > >> returns no value") for an extended explanation and the eventual goal.
> > > >>
> > > >> As there is no single maintainer team for drivers/soc, I suggest the
> > > >> individual maintainers to pick up "their" patches.
> > > >
> > > > I'd be happy if Arnd merged the lot at once. Arnd, what do you think?
> > > >
> > > > If that will be too messy then I understand. I have queued the aspeed
> > > > ones locally and will push that out if we decide that's the best way
> > > > to go.
> > > 
> > > The main downside of merging it all at once through the soc tree
> > > is that there may be patches that conflict with other work going on
> > > in individual drivers.
> > > 
> > > What I'd suggest doing here is:
> > > 
> > > - have platform maintainers pick up patches for their drivers
> > >   if that is their preference for any reason
> > 
> > I'd prefer this for the qcom drivers at least, please let me know if you
> > would like me to proceed.
>
> I can send a pull request as Arnd suggested. So iff you want the qcom
> drivers not be a part of that PR, just make sure they appear in next
> during the next week. :-)
>
> > > - get a pull request from Uwe for the soc tree for anything that has
> > >  not been picked up in one or two weeks from now

Here comes the promised PR. The qcom patches are among the set of
patches dropped here as they are already in next.

To state the obvious: This is merge window material and the idea is that
it's pulled into armsoc and then included in the armsoc v6.7-rc1 PR to
Linus Torvalds. I hope it's not too late for that already.

Best regards and thanks
Uwe

Uwe Kleine-König (12):
      soc/fsl: dpaa2-console: Convert to platform remove callback returning void
      soc/fsl: cpm: qmc: Convert to platform remove callback returning void
      soc/fsl: cpm: tsa: Convert to platform remove callback returning void
      soc/fujitsu: a64fx-diag: Convert to platform remove callback returning void
      soc/hisilicon: kunpeng_hccs: Convert to platform remove callback returning void
      soc/ixp4xx: ixp4xx-npe: Convert to platform remove callback returning void
      soc/ixp4xx: ixp4xx-qmgr: Convert to platform remove callback returning void
      soc/litex: litex_soc_ctrl: Convert to platform remove callback returning void
      soc/loongson: loongson2_guts: Convert to platform remove callback returning void
      soc/mediatek: mtk-devapc: Convert to platform remove callback returning void
      soc/mediatek: mtk-mmsys: Convert to platform remove callback returning void
      soc/pxa: ssp: Convert to platform remove callback returning void

 drivers/soc/fsl/dpaa2-console.c       | 6 ++----
 drivers/soc/fsl/qe/qmc.c              | 6 ++----
 drivers/soc/fsl/qe/tsa.c              | 5 ++---
 drivers/soc/fujitsu/a64fx-diag.c      | 6 ++----
 drivers/soc/hisilicon/kunpeng_hccs.c  | 6 ++----
 drivers/soc/ixp4xx/ixp4xx-npe.c       | 6 ++----
 drivers/soc/ixp4xx/ixp4xx-qmgr.c      | 5 ++---
 drivers/soc/litex/litex_soc_ctrl.c    | 5 ++---
 drivers/soc/loongson/loongson2_guts.c | 6 ++----
 drivers/soc/mediatek/mtk-devapc.c     | 6 ++----
 drivers/soc/mediatek/mtk-mmsys.c      | 6 ++----
 drivers/soc/pxa/ssp.c                 | 6 ++----
 12 files changed, 24 insertions(+), 45 deletions(-)

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

* [GIT PULL] Convert drivers/soc to struct platform_driver::remove_new()
@ 2023-10-14 21:59           ` Uwe Kleine-König
  0 siblings, 0 replies; 133+ messages in thread
From: Uwe Kleine-König @ 2023-10-14 21:59 UTC (permalink / raw)
  To: soc
  Cc: Nishanth Menon, Herve Codina, Bjorn Andersson,
	Heiko Stübner, Mateusz Holenko, Muhammad Usama Anjum,
	Matthias Brugger, Conor.Dooley, Thierry Reding, Alim Akhtar,
	linux-riscv, Karol Gugala, Qiang Zhao, Hitomi Hasegawa,
	Rob Herring, linux-samsung-soc, linux-aspeed, Ruan Jinjie,
	Yinbo Zhu, Jon Hunter, linux-rockchip, Gabriel Somlo, Andy Gross,
	Huisong Li, Joel Stanley, Yang Yingliang, Sumit Gupta,
	zhang.songyi, Zev Weiss, Arnd Bergmann, linux-pm, linux-arm-msm,
	Lubomir Rintel, Krzysztof Halasa, loongarch, Santosh Shilimkar,
	linux-tegra, Michal Simek, linux-arm-kernel,
	AngeloGioacchino Del Regno, Daire McNamara, linux-kernel,
	Shang XiaoJing, Leo Li, Konrad Dybcio, Andrew Jeffery,
	Krzysztof Kozlowski, Pengutronix Kernel Team, linux-mediatek,
	Nick Alcock, linuxppc-dev


[-- Attachment #1.1: Type: text/plain, Size: 5249 bytes --]

Hello Arnd,

the following changes since commit 0bb80ecc33a8fb5a682236443c1e740d5c917d1d:

  Linux 6.6-rc1 (2023-09-10 16:28:41 -0700)

are available in the Git repository at:

  https://git.pengutronix.de/git/ukl/linux tags/platform-remove-void-soc-for-6.7-rc

for you to fetch changes up to e77e6e3e909d33361c58af848a96e1f7f71ba7e4:

  soc/pxa: ssp: Convert to platform remove callback returning void (2023-10-14 23:27:34 +0200)

----------------------------------------------------------------
Convert drivers/soc to struct platform_driver::remove_new()

This PR contains the patches I sent in the series available at
https://lore.kernel.org/all/20230925095532.1984344-1-u.kleine-koenig@pengutronix.de
that were not yet picked up in next as of next-20231013.

It converts all drivers below drivers/soc to let their remove callback
return void. See commit 5c5a7680e67b ("platform: Provide a remove
callback that returns no value") for the rationale.

----------------------------------------------------------------

On Thu, Sep 28, 2023 at 08:14:49AM +0200, Uwe Kleine-König wrote:
> On Wed, Sep 27, 2023 at 04:01:58PM -0700, Bjorn Andersson wrote:
> > On Wed, Sep 27, 2023 at 10:43:16AM +0200, Arnd Bergmann wrote:
> > > On Wed, Sep 27, 2023, at 04:25, Joel Stanley wrote:
> > > > On Mon, 25 Sept 2023 at 09:55, Uwe Kleine-König <u.kleine-koenig@pengutronix.de> wrote:
> > > >>
> > > >> this series converts all platform drivers below drivers/soc to use
> > > >> .remove_new(). The motivation is to get rid of an integer return code
> > > >> that is (mostly) ignored by the platform driver core and error prone on
> > > >> the driver side.
> > > >>
> > > >> See commit 5c5a7680e67b ("platform: Provide a remove callback that
> > > >> returns no value") for an extended explanation and the eventual goal.
> > > >>
> > > >> As there is no single maintainer team for drivers/soc, I suggest the
> > > >> individual maintainers to pick up "their" patches.
> > > >
> > > > I'd be happy if Arnd merged the lot at once. Arnd, what do you think?
> > > >
> > > > If that will be too messy then I understand. I have queued the aspeed
> > > > ones locally and will push that out if we decide that's the best way
> > > > to go.
> > > 
> > > The main downside of merging it all at once through the soc tree
> > > is that there may be patches that conflict with other work going on
> > > in individual drivers.
> > > 
> > > What I'd suggest doing here is:
> > > 
> > > - have platform maintainers pick up patches for their drivers
> > >   if that is their preference for any reason
> > 
> > I'd prefer this for the qcom drivers at least, please let me know if you
> > would like me to proceed.
>
> I can send a pull request as Arnd suggested. So iff you want the qcom
> drivers not be a part of that PR, just make sure they appear in next
> during the next week. :-)
>
> > > - get a pull request from Uwe for the soc tree for anything that has
> > >  not been picked up in one or two weeks from now

Here comes the promised PR. The qcom patches are among the set of
patches dropped here as they are already in next.

To state the obvious: This is merge window material and the idea is that
it's pulled into armsoc and then included in the armsoc v6.7-rc1 PR to
Linus Torvalds. I hope it's not too late for that already.

Best regards and thanks
Uwe

Uwe Kleine-König (12):
      soc/fsl: dpaa2-console: Convert to platform remove callback returning void
      soc/fsl: cpm: qmc: Convert to platform remove callback returning void
      soc/fsl: cpm: tsa: Convert to platform remove callback returning void
      soc/fujitsu: a64fx-diag: Convert to platform remove callback returning void
      soc/hisilicon: kunpeng_hccs: Convert to platform remove callback returning void
      soc/ixp4xx: ixp4xx-npe: Convert to platform remove callback returning void
      soc/ixp4xx: ixp4xx-qmgr: Convert to platform remove callback returning void
      soc/litex: litex_soc_ctrl: Convert to platform remove callback returning void
      soc/loongson: loongson2_guts: Convert to platform remove callback returning void
      soc/mediatek: mtk-devapc: Convert to platform remove callback returning void
      soc/mediatek: mtk-mmsys: Convert to platform remove callback returning void
      soc/pxa: ssp: Convert to platform remove callback returning void

 drivers/soc/fsl/dpaa2-console.c       | 6 ++----
 drivers/soc/fsl/qe/qmc.c              | 6 ++----
 drivers/soc/fsl/qe/tsa.c              | 5 ++---
 drivers/soc/fujitsu/a64fx-diag.c      | 6 ++----
 drivers/soc/hisilicon/kunpeng_hccs.c  | 6 ++----
 drivers/soc/ixp4xx/ixp4xx-npe.c       | 6 ++----
 drivers/soc/ixp4xx/ixp4xx-qmgr.c      | 5 ++---
 drivers/soc/litex/litex_soc_ctrl.c    | 5 ++---
 drivers/soc/loongson/loongson2_guts.c | 6 ++----
 drivers/soc/mediatek/mtk-devapc.c     | 6 ++----
 drivers/soc/mediatek/mtk-mmsys.c      | 6 ++----
 drivers/soc/pxa/ssp.c                 | 6 ++----
 12 files changed, 24 insertions(+), 45 deletions(-)

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

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

[-- Attachment #2: Type: text/plain, Size: 161 bytes --]

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* [GIT PULL] Convert drivers/soc to struct platform_driver::remove_new()
@ 2023-10-14 21:59           ` Uwe Kleine-König
  0 siblings, 0 replies; 133+ messages in thread
From: Uwe Kleine-König @ 2023-10-14 21:59 UTC (permalink / raw)
  To: soc
  Cc: Nishanth Menon, Herve Codina, Bjorn Andersson,
	Heiko Stübner, Mateusz Holenko, Muhammad Usama Anjum,
	Matthias Brugger, Conor.Dooley, Thierry Reding, Alim Akhtar,
	linux-riscv, Karol Gugala, Qiang Zhao, Hitomi Hasegawa,
	Rob Herring, linux-samsung-soc, linux-aspeed, Ruan Jinjie,
	Yinbo Zhu, Jon Hunter, linux-rockchip, Gabriel Somlo, Andy Gross,
	Huisong Li, Joel Stanley, Yang Yingliang, Sumit Gupta,
	zhang.songyi, Zev Weiss, Arnd Bergmann, linux-pm, linux-arm-msm,
	Lubomir Rintel, Krzysztof Halasa, loongarch, Santosh Shilimkar,
	linux-tegra, Michal Simek, linux-arm-kernel,
	AngeloGioacchino Del Regno, Daire McNamara, linux-kernel,
	Shang XiaoJing, Leo Li, Konrad Dybcio, Andrew Jeffery,
	Krzysztof Kozlowski, Pengutronix Kernel Team, linux-mediatek,
	Nick Alcock, linuxppc-dev


[-- Attachment #1.1: Type: text/plain, Size: 5249 bytes --]

Hello Arnd,

the following changes since commit 0bb80ecc33a8fb5a682236443c1e740d5c917d1d:

  Linux 6.6-rc1 (2023-09-10 16:28:41 -0700)

are available in the Git repository at:

  https://git.pengutronix.de/git/ukl/linux tags/platform-remove-void-soc-for-6.7-rc

for you to fetch changes up to e77e6e3e909d33361c58af848a96e1f7f71ba7e4:

  soc/pxa: ssp: Convert to platform remove callback returning void (2023-10-14 23:27:34 +0200)

----------------------------------------------------------------
Convert drivers/soc to struct platform_driver::remove_new()

This PR contains the patches I sent in the series available at
https://lore.kernel.org/all/20230925095532.1984344-1-u.kleine-koenig@pengutronix.de
that were not yet picked up in next as of next-20231013.

It converts all drivers below drivers/soc to let their remove callback
return void. See commit 5c5a7680e67b ("platform: Provide a remove
callback that returns no value") for the rationale.

----------------------------------------------------------------

On Thu, Sep 28, 2023 at 08:14:49AM +0200, Uwe Kleine-König wrote:
> On Wed, Sep 27, 2023 at 04:01:58PM -0700, Bjorn Andersson wrote:
> > On Wed, Sep 27, 2023 at 10:43:16AM +0200, Arnd Bergmann wrote:
> > > On Wed, Sep 27, 2023, at 04:25, Joel Stanley wrote:
> > > > On Mon, 25 Sept 2023 at 09:55, Uwe Kleine-König <u.kleine-koenig@pengutronix.de> wrote:
> > > >>
> > > >> this series converts all platform drivers below drivers/soc to use
> > > >> .remove_new(). The motivation is to get rid of an integer return code
> > > >> that is (mostly) ignored by the platform driver core and error prone on
> > > >> the driver side.
> > > >>
> > > >> See commit 5c5a7680e67b ("platform: Provide a remove callback that
> > > >> returns no value") for an extended explanation and the eventual goal.
> > > >>
> > > >> As there is no single maintainer team for drivers/soc, I suggest the
> > > >> individual maintainers to pick up "their" patches.
> > > >
> > > > I'd be happy if Arnd merged the lot at once. Arnd, what do you think?
> > > >
> > > > If that will be too messy then I understand. I have queued the aspeed
> > > > ones locally and will push that out if we decide that's the best way
> > > > to go.
> > > 
> > > The main downside of merging it all at once through the soc tree
> > > is that there may be patches that conflict with other work going on
> > > in individual drivers.
> > > 
> > > What I'd suggest doing here is:
> > > 
> > > - have platform maintainers pick up patches for their drivers
> > >   if that is their preference for any reason
> > 
> > I'd prefer this for the qcom drivers at least, please let me know if you
> > would like me to proceed.
>
> I can send a pull request as Arnd suggested. So iff you want the qcom
> drivers not be a part of that PR, just make sure they appear in next
> during the next week. :-)
>
> > > - get a pull request from Uwe for the soc tree for anything that has
> > >  not been picked up in one or two weeks from now

Here comes the promised PR. The qcom patches are among the set of
patches dropped here as they are already in next.

To state the obvious: This is merge window material and the idea is that
it's pulled into armsoc and then included in the armsoc v6.7-rc1 PR to
Linus Torvalds. I hope it's not too late for that already.

Best regards and thanks
Uwe

Uwe Kleine-König (12):
      soc/fsl: dpaa2-console: Convert to platform remove callback returning void
      soc/fsl: cpm: qmc: Convert to platform remove callback returning void
      soc/fsl: cpm: tsa: Convert to platform remove callback returning void
      soc/fujitsu: a64fx-diag: Convert to platform remove callback returning void
      soc/hisilicon: kunpeng_hccs: Convert to platform remove callback returning void
      soc/ixp4xx: ixp4xx-npe: Convert to platform remove callback returning void
      soc/ixp4xx: ixp4xx-qmgr: Convert to platform remove callback returning void
      soc/litex: litex_soc_ctrl: Convert to platform remove callback returning void
      soc/loongson: loongson2_guts: Convert to platform remove callback returning void
      soc/mediatek: mtk-devapc: Convert to platform remove callback returning void
      soc/mediatek: mtk-mmsys: Convert to platform remove callback returning void
      soc/pxa: ssp: Convert to platform remove callback returning void

 drivers/soc/fsl/dpaa2-console.c       | 6 ++----
 drivers/soc/fsl/qe/qmc.c              | 6 ++----
 drivers/soc/fsl/qe/tsa.c              | 5 ++---
 drivers/soc/fujitsu/a64fx-diag.c      | 6 ++----
 drivers/soc/hisilicon/kunpeng_hccs.c  | 6 ++----
 drivers/soc/ixp4xx/ixp4xx-npe.c       | 6 ++----
 drivers/soc/ixp4xx/ixp4xx-qmgr.c      | 5 ++---
 drivers/soc/litex/litex_soc_ctrl.c    | 5 ++---
 drivers/soc/loongson/loongson2_guts.c | 6 ++----
 drivers/soc/mediatek/mtk-devapc.c     | 6 ++----
 drivers/soc/mediatek/mtk-mmsys.c      | 6 ++----
 drivers/soc/pxa/ssp.c                 | 6 ++----
 12 files changed, 24 insertions(+), 45 deletions(-)

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

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

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

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

* [GIT PULL] Convert drivers/soc to struct platform_driver::remove_new()
@ 2023-10-14 21:59           ` Uwe Kleine-König
  0 siblings, 0 replies; 133+ messages in thread
From: Uwe Kleine-König @ 2023-10-14 21:59 UTC (permalink / raw)
  To: soc
  Cc: Nishanth Menon, Herve Codina, Heiko Stübner,
	Mateusz Holenko, Muhammad Usama Anjum, linux-tegra, Conor.Dooley,
	Thierry Reding, Alim Akhtar, linux-riscv, Karol Gugala,
	Qiang Zhao, Hitomi Hasegawa, Rob Herring, linux-samsung-soc,
	linux-aspeed, Ruan Jinjie, Yinbo Zhu, Jon Hunter, linux-rockchip,
	Gabriel Somlo, Andy Gross, Huisong Li, Joel Stanley,
	Yang Yingliang, Sumit Gupta, zhang.songyi

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

Hello Arnd,

the following changes since commit 0bb80ecc33a8fb5a682236443c1e740d5c917d1d:

  Linux 6.6-rc1 (2023-09-10 16:28:41 -0700)

are available in the Git repository at:

  https://git.pengutronix.de/git/ukl/linux tags/platform-remove-void-soc-for-6.7-rc

for you to fetch changes up to e77e6e3e909d33361c58af848a96e1f7f71ba7e4:

  soc/pxa: ssp: Convert to platform remove callback returning void (2023-10-14 23:27:34 +0200)

----------------------------------------------------------------
Convert drivers/soc to struct platform_driver::remove_new()

This PR contains the patches I sent in the series available at
https://lore.kernel.org/all/20230925095532.1984344-1-u.kleine-koenig@pengutronix.de
that were not yet picked up in next as of next-20231013.

It converts all drivers below drivers/soc to let their remove callback
return void. See commit 5c5a7680e67b ("platform: Provide a remove
callback that returns no value") for the rationale.

----------------------------------------------------------------

On Thu, Sep 28, 2023 at 08:14:49AM +0200, Uwe Kleine-König wrote:
> On Wed, Sep 27, 2023 at 04:01:58PM -0700, Bjorn Andersson wrote:
> > On Wed, Sep 27, 2023 at 10:43:16AM +0200, Arnd Bergmann wrote:
> > > On Wed, Sep 27, 2023, at 04:25, Joel Stanley wrote:
> > > > On Mon, 25 Sept 2023 at 09:55, Uwe Kleine-König <u.kleine-koenig@pengutronix.de> wrote:
> > > >>
> > > >> this series converts all platform drivers below drivers/soc to use
> > > >> .remove_new(). The motivation is to get rid of an integer return code
> > > >> that is (mostly) ignored by the platform driver core and error prone on
> > > >> the driver side.
> > > >>
> > > >> See commit 5c5a7680e67b ("platform: Provide a remove callback that
> > > >> returns no value") for an extended explanation and the eventual goal.
> > > >>
> > > >> As there is no single maintainer team for drivers/soc, I suggest the
> > > >> individual maintainers to pick up "their" patches.
> > > >
> > > > I'd be happy if Arnd merged the lot at once. Arnd, what do you think?
> > > >
> > > > If that will be too messy then I understand. I have queued the aspeed
> > > > ones locally and will push that out if we decide that's the best way
> > > > to go.
> > > 
> > > The main downside of merging it all at once through the soc tree
> > > is that there may be patches that conflict with other work going on
> > > in individual drivers.
> > > 
> > > What I'd suggest doing here is:
> > > 
> > > - have platform maintainers pick up patches for their drivers
> > >   if that is their preference for any reason
> > 
> > I'd prefer this for the qcom drivers at least, please let me know if you
> > would like me to proceed.
>
> I can send a pull request as Arnd suggested. So iff you want the qcom
> drivers not be a part of that PR, just make sure they appear in next
> during the next week. :-)
>
> > > - get a pull request from Uwe for the soc tree for anything that has
> > >  not been picked up in one or two weeks from now

Here comes the promised PR. The qcom patches are among the set of
patches dropped here as they are already in next.

To state the obvious: This is merge window material and the idea is that
it's pulled into armsoc and then included in the armsoc v6.7-rc1 PR to
Linus Torvalds. I hope it's not too late for that already.

Best regards and thanks
Uwe

Uwe Kleine-König (12):
      soc/fsl: dpaa2-console: Convert to platform remove callback returning void
      soc/fsl: cpm: qmc: Convert to platform remove callback returning void
      soc/fsl: cpm: tsa: Convert to platform remove callback returning void
      soc/fujitsu: a64fx-diag: Convert to platform remove callback returning void
      soc/hisilicon: kunpeng_hccs: Convert to platform remove callback returning void
      soc/ixp4xx: ixp4xx-npe: Convert to platform remove callback returning void
      soc/ixp4xx: ixp4xx-qmgr: Convert to platform remove callback returning void
      soc/litex: litex_soc_ctrl: Convert to platform remove callback returning void
      soc/loongson: loongson2_guts: Convert to platform remove callback returning void
      soc/mediatek: mtk-devapc: Convert to platform remove callback returning void
      soc/mediatek: mtk-mmsys: Convert to platform remove callback returning void
      soc/pxa: ssp: Convert to platform remove callback returning void

 drivers/soc/fsl/dpaa2-console.c       | 6 ++----
 drivers/soc/fsl/qe/qmc.c              | 6 ++----
 drivers/soc/fsl/qe/tsa.c              | 5 ++---
 drivers/soc/fujitsu/a64fx-diag.c      | 6 ++----
 drivers/soc/hisilicon/kunpeng_hccs.c  | 6 ++----
 drivers/soc/ixp4xx/ixp4xx-npe.c       | 6 ++----
 drivers/soc/ixp4xx/ixp4xx-qmgr.c      | 5 ++---
 drivers/soc/litex/litex_soc_ctrl.c    | 5 ++---
 drivers/soc/loongson/loongson2_guts.c | 6 ++----
 drivers/soc/mediatek/mtk-devapc.c     | 6 ++----
 drivers/soc/mediatek/mtk-mmsys.c      | 6 ++----
 drivers/soc/pxa/ssp.c                 | 6 ++----
 12 files changed, 24 insertions(+), 45 deletions(-)

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

* Re: [GIT PULL] Convert drivers/soc to struct platform_driver::remove_new()
  2023-10-14 21:59           ` Uwe Kleine-König
                             ` (2 preceding siblings ...)
  (?)
@ 2023-10-16 21:31           ` patchwork-bot+linux-soc
  -1 siblings, 0 replies; 133+ messages in thread
From: patchwork-bot+linux-soc @ 2023-10-16 21:31 UTC (permalink / raw)
  To: =?utf-8?q?Uwe_Kleine-K=C3=B6nig_=3Cu=2Ekleine-koenig=40pengutronix=2Ede=3E?=
  Cc: soc

Hello:

This pull request was applied to soc/soc.git (for-next)
by Arnd Bergmann <arnd@arndb.de>:

On Sat, 14 Oct 2023 23:59:18 +0200 you wrote:
> Hello Arnd,
> 
> the following changes since commit 0bb80ecc33a8fb5a682236443c1e740d5c917d1d:
> 
>   Linux 6.6-rc1 (2023-09-10 16:28:41 -0700)
> 
> are available in the Git repository at:
> 
> [...]

Here is the summary with links:
  - [GIT,PULL] Convert drivers/soc to struct platform_driver::remove_new()
    https://git.kernel.org/soc/soc/c/4d8220323f60

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2023-10-16 21:31 UTC | newest]

Thread overview: 133+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-25  9:54 [PATCH 00/40] soc: Convert to platform remove callback returning void Uwe Kleine-König
2023-09-25  9:54 ` Uwe Kleine-König
2023-09-25  9:54 ` Uwe Kleine-König
2023-09-25  9:54 ` Uwe Kleine-König
2023-09-25  9:54 ` [PATCH 01/40] soc/aspeed: aspeed-lpc-ctrl: " Uwe Kleine-König
2023-09-25  9:54   ` Uwe Kleine-König
2023-09-26  1:33   ` Andrew Jeffery
2023-09-26  1:33     ` Andrew Jeffery
2023-09-25  9:54 ` [PATCH 02/40] soc/aspeed: aspeed-lpc-snoop: " Uwe Kleine-König
2023-09-25  9:54   ` Uwe Kleine-König
2023-09-26  1:30   ` Andrew Jeffery
2023-09-26  1:30     ` Andrew Jeffery
2023-09-25  9:54 ` [PATCH 03/40] soc/aspeed: aspeed-p2a-ctrl: " Uwe Kleine-König
2023-09-25  9:54   ` Uwe Kleine-König
2023-09-26  1:32   ` Andrew Jeffery
2023-09-26  1:32     ` Andrew Jeffery
2023-09-25  9:54 ` [PATCH 04/40] soc/aspeed: aspeed-uart-routing: " Uwe Kleine-König
2023-09-25  9:54   ` Uwe Kleine-König
2023-09-26  1:31   ` Andrew Jeffery
2023-09-26  1:31     ` Andrew Jeffery
2023-09-25  9:54 ` [PATCH 05/40] soc/fsl: dpaa2-console: " Uwe Kleine-König
2023-09-25  9:54   ` Uwe Kleine-König
2023-09-25  9:54   ` Uwe Kleine-König
2023-09-25  9:54 ` [PATCH 06/40] soc/fsl: cpm: qmc: " Uwe Kleine-König
2023-09-25  9:54   ` Uwe Kleine-König
2023-09-25  9:54   ` Uwe Kleine-König
2023-09-27  6:44   ` Herve Codina
2023-09-27  6:44     ` Herve Codina
2023-09-27  6:44     ` Herve Codina
2023-09-25  9:54 ` [PATCH 07/40] soc/fsl: cpm: tsa: " Uwe Kleine-König
2023-09-25  9:54   ` Uwe Kleine-König
2023-09-25  9:54   ` Uwe Kleine-König
2023-09-27  6:44   ` Herve Codina
2023-09-27  6:44     ` Herve Codina
2023-09-27  6:44     ` Herve Codina
2023-09-25  9:54 ` [PATCH 08/40] soc/fujitsu: a64fx-diag: " Uwe Kleine-König
2023-09-25  9:55 ` [PATCH 09/40] soc/hisilicon: kunpeng_hccs: " Uwe Kleine-König
2023-09-25  9:55 ` [PATCH 10/40] soc/ixp4xx: ixp4xx-npe: " Uwe Kleine-König
2023-09-25  9:55 ` [PATCH 11/40] soc/ixp4xx: ixp4xx-qmgr: " Uwe Kleine-König
2023-09-25  9:55 ` [PATCH 12/40] soc/litex: litex_soc_ctrl: " Uwe Kleine-König
2023-09-25 13:03   ` Gabriel L. Somlo
2023-09-25  9:55 ` [PATCH 13/40] soc/loongson: loongson2_guts: " Uwe Kleine-König
2023-09-25  9:55 ` [PATCH 14/40] soc/mediatek: mtk-devapc: " Uwe Kleine-König
2023-09-25  9:55   ` Uwe Kleine-König
2023-09-26  9:23   ` AngeloGioacchino Del Regno
2023-09-26  9:23     ` AngeloGioacchino Del Regno
2023-09-25  9:55 ` [PATCH 15/40] soc/mediatek: mtk-mmsys: " Uwe Kleine-König
2023-09-25  9:55   ` Uwe Kleine-König
2023-09-26  9:23   ` AngeloGioacchino Del Regno
2023-09-26  9:23     ` AngeloGioacchino Del Regno
2023-09-25  9:55 ` [PATCH 16/40] soc/microchip: mpfs-sys-controller: " Uwe Kleine-König
2023-09-25  9:55   ` Uwe Kleine-König
2023-09-25 10:20   ` Conor Dooley
2023-09-25 10:20     ` Conor Dooley
2023-09-25  9:55 ` [PATCH 17/40] soc/pxa: ssp: " Uwe Kleine-König
2023-09-25  9:55 ` [PATCH 18/40] soc/qcom: icc-bwmon: " Uwe Kleine-König
2023-09-25  9:57   ` Konrad Dybcio
2023-09-25 10:39   ` Krzysztof Kozlowski
2023-09-25  9:55 ` [PATCH 19/40] soc/qcom: llcc-qcom: " Uwe Kleine-König
2023-09-25  9:58   ` Konrad Dybcio
2023-09-25  9:55 ` [PATCH 20/40] soc/qcom: ocmem: " Uwe Kleine-König
2023-09-25  9:58   ` Konrad Dybcio
2023-09-25  9:55 ` [PATCH 21/40] soc/qcom: pmic_glink: " Uwe Kleine-König
2023-09-25  9:55 ` [PATCH 22/40] soc/qcom: qcom_aoss: " Uwe Kleine-König
2023-09-25  9:55 ` [PATCH 23/40] soc/qcom: qcom_gsbi: " Uwe Kleine-König
2023-09-25  9:55 ` [PATCH 24/40] soc/qcom: qcom_stats: " Uwe Kleine-König
2023-09-25  9:55 ` [PATCH 25/40] soc/qcom: rmtfs_mem: " Uwe Kleine-König
2023-09-25  9:55 ` [PATCH 26/40] soc/qcom: smem: " Uwe Kleine-König
2023-09-25  9:55 ` [PATCH 27/40] soc/qcom: smp2p: " Uwe Kleine-König
2023-09-25  9:55 ` [PATCH 28/40] soc/qcom: smsm: " Uwe Kleine-König
2023-09-25  9:55 ` [PATCH 29/40] soc/qcom: socinfo: " Uwe Kleine-König
2023-09-25  9:55 ` [PATCH 30/40] soc/rockchip: io-domain: " Uwe Kleine-König
2023-09-25  9:55   ` Uwe Kleine-König
2023-09-25  9:55   ` Uwe Kleine-König
2023-10-01 22:58   ` Heiko Stuebner
2023-10-01 22:58     ` Heiko Stuebner
2023-10-01 22:58     ` Heiko Stuebner
2023-09-25  9:55 ` [PATCH 31/40] soc/samsung: exynos-chipid: " Uwe Kleine-König
2023-09-25  9:55   ` Uwe Kleine-König
2023-09-28  5:52   ` (subset) " Krzysztof Kozlowski
2023-09-28  5:52     ` Krzysztof Kozlowski
2023-09-25  9:55 ` [PATCH 32/40] soc/tegra: cbb: tegra194-cbb: " Uwe Kleine-König
2023-09-25  9:55 ` [PATCH 33/40] soc/ti: k3-ringacc: " Uwe Kleine-König
2023-09-25  9:55   ` Uwe Kleine-König
2023-09-25  9:55 ` [PATCH 34/40] soc/ti: knav_dma: " Uwe Kleine-König
2023-09-25  9:55   ` Uwe Kleine-König
2023-09-25  9:55 ` [PATCH 35/40] soc/ti: knav_qmss_queue: " Uwe Kleine-König
2023-09-25  9:55   ` Uwe Kleine-König
2023-09-25  9:55 ` [PATCH 36/40] soc/ti: pm33xx: " Uwe Kleine-König
2023-09-25  9:55   ` Uwe Kleine-König
2023-09-25  9:55 ` [PATCH 37/40] soc/ti: pruss: " Uwe Kleine-König
2023-09-25  9:55   ` Uwe Kleine-König
2023-09-25  9:55 ` [PATCH 38/40] soc/ti: smartreflex: " Uwe Kleine-König
2023-09-25  9:55   ` Uwe Kleine-König
2023-09-25  9:55 ` [PATCH 39/40] soc/ti: wkup_m3_ipc: " Uwe Kleine-König
2023-09-25  9:55   ` Uwe Kleine-König
2023-09-25  9:55 ` [PATCH 40/40] soc/xilinx: zynqmp_power: " Uwe Kleine-König
2023-09-25  9:55   ` Uwe Kleine-König
2023-10-02  9:13   ` Michal Simek
2023-10-02  9:13     ` Michal Simek
2023-09-25  9:58 ` [PATCH 00/40] soc: " Konrad Dybcio
2023-09-25  9:58   ` Konrad Dybcio
2023-09-25  9:58   ` Konrad Dybcio
2023-09-25  9:58   ` Konrad Dybcio
2023-09-27  2:25 ` Joel Stanley
2023-09-27  2:25   ` Joel Stanley
2023-09-27  2:25   ` Joel Stanley
2023-09-27  2:25   ` Joel Stanley
2023-09-27  8:43   ` Arnd Bergmann
2023-09-27  8:43     ` Arnd Bergmann
2023-09-27  8:43     ` Arnd Bergmann
2023-09-27  8:43     ` Arnd Bergmann
2023-09-27 23:01     ` Bjorn Andersson
2023-09-27 23:01       ` Bjorn Andersson
2023-09-27 23:01       ` Bjorn Andersson
2023-09-27 23:01       ` Bjorn Andersson
2023-09-28  6:14       ` Uwe Kleine-König
2023-09-28  6:14         ` Uwe Kleine-König
2023-09-28  6:14         ` Uwe Kleine-König
2023-09-28  6:14         ` Uwe Kleine-König
2023-10-14 21:59         ` [GIT PULL] Convert drivers/soc to struct platform_driver::remove_new() Uwe Kleine-König
2023-10-14 21:59           ` Uwe Kleine-König
2023-10-14 21:59           ` Uwe Kleine-König
2023-10-14 21:59           ` Uwe Kleine-König
2023-10-16 21:31           ` patchwork-bot+linux-soc
2023-10-02 14:13 ` (subset) [PATCH 00/40] soc: Convert to platform remove callback returning void Nishanth Menon
2023-10-02 14:13   ` Nishanth Menon
2023-10-02 14:13   ` Nishanth Menon
2023-10-02 14:13   ` Nishanth Menon
2023-10-03  1:10 ` Bjorn Andersson
2023-10-03  1:10   ` Bjorn Andersson
2023-10-03  1:10   ` Bjorn Andersson
2023-10-03  1:10   ` Bjorn Andersson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.