linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/30] clk: Convert to platform remove callback returning void
@ 2023-03-12 16:14 Uwe Kleine-König
  2023-03-12 16:14 ` [PATCH 01/30] clk: mediatek: Make mtk_clk_simple_remove() return void Uwe Kleine-König
                   ` (11 more replies)
  0 siblings, 12 replies; 29+ messages in thread
From: Uwe Kleine-König @ 2023-03-12 16:14 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd, Matthias Brugger,
	Peter De Schrijver, Prashant Gaikwad, Thierry Reding,
	Jonathan Hunter, Michal Simek, Eugeniy Paltsev, Florian Fainelli,
	Krzysztof Kozlowski, Sudeep Holla, Maxime Coquelin,
	Alexandre Torgue, Nishanth Menon, Tero Kristo, Santosh Shilimkar,
	Bjorn Andersson, Andy Gross, Geert Uytterhoeven,
	Sylwester Nawrocki, Tomasz Figa, Chanwoo Choi, Kunihiko Hayashi,
	Masami Hiramatsu
  Cc: AngeloGioacchino Del Regno, linux-clk, linux-kernel,
	linux-arm-kernel, linux-mediatek, linux-tegra,
	Broadcom internal kernel review list, linux-rpi-kernel,
	linux-samsung-soc, Cristian Marussi, linux-stm32, Konrad Dybcio,
	linux-arm-msm, linux-renesas-soc, Alim Akhtar, linux-omap

Hello,

this patch series adapts the platform drivers below drivers/clk
to use the .remove_new() callback. Compared to the traditional .remove()
callback .remove_new() returns no value. This is a good thing because
the driver core doesn't (and cannot) cope for errors during remove. The
only effect of a non-zero return value in .remove() is that the driver
core emits a warning. The device is removed anyhow and an early return
from .remove() usually yields a resource leak.

There were three drivers that did such an early error return in their
remove callback. Two of them are fixed, the tegra one is more
complicated. I only converted it to return zero (which only suppresses
the duplicated warning by the driver core, but doesn't make the resource
leak better or worse.) This needs some more attention by someone who
understands the driver in question.

By changing the remove callback to return void driver authors cannot
reasonably assume any more that there is some kind of cleanup later
which prevents that such programming errors are introduced in the first
place.

Note that this series depends on commit 5c5a7680e67b ("platform: Provide
a remove callback that returns no value") which is included in v6.3-rc1.

Uwe Kleine-König (30):
  clk: mediatek: Make mtk_clk_simple_remove() return void
  clk: tegra: Don't warn three times about failure to unregister
  clk: xilinx: Drop if block with always false condition
  clk: axs10x: Convert to platform remove callback returning void
  clk: bcm: Convert to platform remove callback returning void
  clk: axi-clkgen: Convert to platform remove callback returning void
  clk: axm5516: Convert to platform remove callback returning void
  clk: fixed-factor: Convert to platform remove callback returning void
  clk: fixed-mmio: Convert to platform remove callback returning void
  clk: fixed-rate: Convert to platform remove callback returning void
  clk: hsdk-pll: Convert to platform remove callback returning void
  clk: palmas: Convert to platform remove callback returning void
  clk: pwm: Convert to platform remove callback returning void
  clk: s2mps11: Convert to platform remove callback returning void
  clk: scpi: Convert to platform remove callback returning void
  clk: stm32mp1: Convert to platform remove callback returning void
  clk: hisilicon: Convert to platform remove callback returning void
  clk: keystone: Convert to platform remove callback returning void
  clk: mediatek: Convert to platform remove callback returning void
  clk: mmp: Convert to platform remove callback returning void
  clk: mvebu: Convert to platform remove callback returning void
  clk: qcom: Convert to platform remove callback returning void
  clk: renesas: Convert to platform remove callback returning void
  clk: samsung: Convert to platform remove callback returning void
  clk: stm32: Convert to platform remove callback returning void
  clk: tegra: Convert to platform remove callback returning void
  clk: ti: Convert to platform remove callback returning void
  clk: uniphier: Convert to platform remove callback returning void
  clk: x86: Convert to platform remove callback returning void
  clk: xilinx: Convert to platform remove callback returning void

 drivers/clk/axs10x/i2s_pll_clock.c             |  5 ++---
 drivers/clk/axs10x/pll_clock.c                 |  5 ++---
 drivers/clk/bcm/clk-bcm2711-dvp.c              |  6 ++----
 drivers/clk/bcm/clk-bcm63xx-gate.c             |  6 ++----
 drivers/clk/bcm/clk-raspberrypi.c              |  6 ++----
 drivers/clk/clk-axi-clkgen.c                   |  6 ++----
 drivers/clk/clk-axm5516.c                      |  5 ++---
 drivers/clk/clk-fixed-factor.c                 |  6 ++----
 drivers/clk/clk-fixed-mmio.c                   |  6 ++----
 drivers/clk/clk-fixed-rate.c                   |  6 ++----
 drivers/clk/clk-hsdk-pll.c                     |  5 ++---
 drivers/clk/clk-palmas.c                       |  5 ++---
 drivers/clk/clk-pwm.c                          |  6 ++----
 drivers/clk/clk-s2mps11.c                      |  6 ++----
 drivers/clk/clk-scpi.c                         |  5 ++---
 drivers/clk/clk-stm32mp1.c                     |  6 ++----
 drivers/clk/hisilicon/clk-hi3519.c             |  5 ++---
 drivers/clk/hisilicon/clk-hi3559a.c            |  5 ++---
 drivers/clk/hisilicon/crg-hi3516cv300.c        |  5 ++---
 drivers/clk/hisilicon/crg-hi3798cv200.c        |  5 ++---
 drivers/clk/keystone/sci-clk.c                 |  6 ++----
 drivers/clk/mediatek/clk-mt2701-aud.c          |  6 +++---
 drivers/clk/mediatek/clk-mt2701-bdp.c          |  2 +-
 drivers/clk/mediatek/clk-mt2701-eth.c          |  2 +-
 drivers/clk/mediatek/clk-mt2701-g3d.c          |  2 +-
 drivers/clk/mediatek/clk-mt2701-hif.c          |  2 +-
 drivers/clk/mediatek/clk-mt2701-img.c          |  2 +-
 drivers/clk/mediatek/clk-mt2701-vdec.c         |  2 +-
 drivers/clk/mediatek/clk-mt2712-bdp.c          |  2 +-
 drivers/clk/mediatek/clk-mt2712-img.c          |  2 +-
 drivers/clk/mediatek/clk-mt2712-jpgdec.c       |  2 +-
 drivers/clk/mediatek/clk-mt2712-mfg.c          |  2 +-
 drivers/clk/mediatek/clk-mt2712-vdec.c         |  2 +-
 drivers/clk/mediatek/clk-mt2712-venc.c         |  2 +-
 drivers/clk/mediatek/clk-mt2712.c              |  2 +-
 drivers/clk/mediatek/clk-mt6765-audio.c        |  2 +-
 drivers/clk/mediatek/clk-mt6765-cam.c          |  2 +-
 drivers/clk/mediatek/clk-mt6765-img.c          |  2 +-
 drivers/clk/mediatek/clk-mt6765-mipi0a.c       |  2 +-
 drivers/clk/mediatek/clk-mt6765-mm.c           |  2 +-
 drivers/clk/mediatek/clk-mt6765-vcodec.c       |  2 +-
 drivers/clk/mediatek/clk-mt6779-aud.c          |  2 +-
 drivers/clk/mediatek/clk-mt6779-cam.c          |  2 +-
 drivers/clk/mediatek/clk-mt6779-img.c          |  2 +-
 drivers/clk/mediatek/clk-mt6779-ipe.c          |  2 +-
 drivers/clk/mediatek/clk-mt6779-mfg.c          |  2 +-
 drivers/clk/mediatek/clk-mt6779-vdec.c         |  2 +-
 drivers/clk/mediatek/clk-mt6779-venc.c         |  2 +-
 drivers/clk/mediatek/clk-mt6779.c              |  2 +-
 drivers/clk/mediatek/clk-mt6795-apmixedsys.c   |  6 ++----
 drivers/clk/mediatek/clk-mt6795-infracfg.c     |  6 ++----
 drivers/clk/mediatek/clk-mt6795-mfg.c          |  2 +-
 drivers/clk/mediatek/clk-mt6795-mm.c           |  6 ++----
 drivers/clk/mediatek/clk-mt6795-pericfg.c      |  6 ++----
 drivers/clk/mediatek/clk-mt6795-topckgen.c     |  2 +-
 drivers/clk/mediatek/clk-mt6795-vdecsys.c      |  2 +-
 drivers/clk/mediatek/clk-mt6795-vencsys.c      |  2 +-
 drivers/clk/mediatek/clk-mt6797-img.c          |  2 +-
 drivers/clk/mediatek/clk-mt6797-vdec.c         |  2 +-
 drivers/clk/mediatek/clk-mt6797-venc.c         |  2 +-
 drivers/clk/mediatek/clk-mt7622-aud.c          |  6 +++---
 drivers/clk/mediatek/clk-mt7622-eth.c          |  2 +-
 drivers/clk/mediatek/clk-mt7622-hif.c          |  2 +-
 drivers/clk/mediatek/clk-mt7629-hif.c          |  2 +-
 drivers/clk/mediatek/clk-mt7981-eth.c          |  2 +-
 drivers/clk/mediatek/clk-mt7981-infracfg.c     |  2 +-
 drivers/clk/mediatek/clk-mt7981-topckgen.c     |  2 +-
 drivers/clk/mediatek/clk-mt7986-topckgen.c     |  2 +-
 drivers/clk/mediatek/clk-mt8173-apmixedsys.c   |  6 ++----
 drivers/clk/mediatek/clk-mt8173-img.c          |  2 +-
 drivers/clk/mediatek/clk-mt8173-infracfg.c     |  6 ++----
 drivers/clk/mediatek/clk-mt8173-mm.c           |  6 ++----
 drivers/clk/mediatek/clk-mt8173-pericfg.c      |  2 +-
 drivers/clk/mediatek/clk-mt8173-topckgen.c     |  2 +-
 drivers/clk/mediatek/clk-mt8173-vdecsys.c      |  2 +-
 drivers/clk/mediatek/clk-mt8173-vencsys.c      |  2 +-
 drivers/clk/mediatek/clk-mt8183-audio.c        |  6 +++---
 drivers/clk/mediatek/clk-mt8183-cam.c          |  2 +-
 drivers/clk/mediatek/clk-mt8183-img.c          |  2 +-
 drivers/clk/mediatek/clk-mt8183-ipu0.c         |  2 +-
 drivers/clk/mediatek/clk-mt8183-ipu1.c         |  2 +-
 drivers/clk/mediatek/clk-mt8183-ipu_adl.c      |  2 +-
 drivers/clk/mediatek/clk-mt8183-ipu_conn.c     |  2 +-
 drivers/clk/mediatek/clk-mt8183-mfgcfg.c       |  2 +-
 drivers/clk/mediatek/clk-mt8183-vdec.c         |  2 +-
 drivers/clk/mediatek/clk-mt8183-venc.c         |  2 +-
 drivers/clk/mediatek/clk-mt8183.c              |  2 +-
 drivers/clk/mediatek/clk-mt8186-apmixedsys.c   |  6 ++----
 drivers/clk/mediatek/clk-mt8186-cam.c          |  2 +-
 drivers/clk/mediatek/clk-mt8186-img.c          |  2 +-
 drivers/clk/mediatek/clk-mt8186-imp_iic_wrap.c |  2 +-
 drivers/clk/mediatek/clk-mt8186-infra_ao.c     |  2 +-
 drivers/clk/mediatek/clk-mt8186-ipe.c          |  2 +-
 drivers/clk/mediatek/clk-mt8186-mcu.c          |  6 ++----
 drivers/clk/mediatek/clk-mt8186-mdp.c          |  2 +-
 drivers/clk/mediatek/clk-mt8186-mfg.c          |  2 +-
 drivers/clk/mediatek/clk-mt8186-mm.c           |  6 ++----
 drivers/clk/mediatek/clk-mt8186-topckgen.c     |  2 +-
 drivers/clk/mediatek/clk-mt8186-vdec.c         |  2 +-
 drivers/clk/mediatek/clk-mt8186-venc.c         |  2 +-
 drivers/clk/mediatek/clk-mt8186-wpe.c          |  2 +-
 drivers/clk/mediatek/clk-mt8192-aud.c          |  6 +++---
 drivers/clk/mediatek/clk-mt8192-cam.c          |  2 +-
 drivers/clk/mediatek/clk-mt8192-img.c          |  2 +-
 drivers/clk/mediatek/clk-mt8192-imp_iic_wrap.c |  2 +-
 drivers/clk/mediatek/clk-mt8192-ipe.c          |  2 +-
 drivers/clk/mediatek/clk-mt8192-mdp.c          |  2 +-
 drivers/clk/mediatek/clk-mt8192-mfg.c          |  2 +-
 drivers/clk/mediatek/clk-mt8192-msdc.c         |  2 +-
 drivers/clk/mediatek/clk-mt8192-scp_adsp.c     |  2 +-
 drivers/clk/mediatek/clk-mt8192-vdec.c         |  2 +-
 drivers/clk/mediatek/clk-mt8192-venc.c         |  2 +-
 drivers/clk/mediatek/clk-mt8192.c              |  2 +-
 drivers/clk/mediatek/clk-mt8195-apmixedsys.c   |  6 ++----
 drivers/clk/mediatek/clk-mt8195-apusys_pll.c   |  6 ++----
 drivers/clk/mediatek/clk-mt8195-cam.c          |  2 +-
 drivers/clk/mediatek/clk-mt8195-ccu.c          |  2 +-
 drivers/clk/mediatek/clk-mt8195-img.c          |  2 +-
 drivers/clk/mediatek/clk-mt8195-imp_iic_wrap.c |  2 +-
 drivers/clk/mediatek/clk-mt8195-infra_ao.c     |  2 +-
 drivers/clk/mediatek/clk-mt8195-ipe.c          |  2 +-
 drivers/clk/mediatek/clk-mt8195-mfg.c          |  2 +-
 drivers/clk/mediatek/clk-mt8195-peri_ao.c      |  2 +-
 drivers/clk/mediatek/clk-mt8195-scp_adsp.c     |  2 +-
 drivers/clk/mediatek/clk-mt8195-topckgen.c     |  6 ++----
 drivers/clk/mediatek/clk-mt8195-vdec.c         |  2 +-
 drivers/clk/mediatek/clk-mt8195-vdo0.c         |  6 ++----
 drivers/clk/mediatek/clk-mt8195-vdo1.c         |  6 ++----
 drivers/clk/mediatek/clk-mt8195-venc.c         |  2 +-
 drivers/clk/mediatek/clk-mt8195-vpp0.c         |  6 ++----
 drivers/clk/mediatek/clk-mt8195-vpp1.c         |  6 ++----
 drivers/clk/mediatek/clk-mt8195-wpe.c          |  2 +-
 drivers/clk/mediatek/clk-mt8365-apu.c          |  2 +-
 drivers/clk/mediatek/clk-mt8365-cam.c          |  2 +-
 drivers/clk/mediatek/clk-mt8365-mfg.c          |  2 +-
 drivers/clk/mediatek/clk-mt8365-vdec.c         |  2 +-
 drivers/clk/mediatek/clk-mt8365-venc.c         |  2 +-
 drivers/clk/mediatek/clk-mtk.c                 |  4 +---
 drivers/clk/mediatek/clk-mtk.h                 |  2 +-
 drivers/clk/mmp/clk-audio.c                    |  6 ++----
 drivers/clk/mvebu/armada-37xx-periph.c         |  6 ++----
 drivers/clk/mvebu/armada-37xx-tbg.c            |  6 ++----
 drivers/clk/mvebu/armada-37xx-xtal.c           |  6 ++----
 drivers/clk/qcom/apcs-msm8916.c                |  6 ++----
 drivers/clk/qcom/apcs-sdx55.c                  |  6 ++----
 drivers/clk/qcom/clk-rpm.c                     |  5 ++---
 drivers/clk/qcom/gcc-msm8960.c                 |  6 ++----
 drivers/clk/renesas/rcar-usb2-clock-sel.c      |  6 ++----
 drivers/clk/samsung/clk-exynos-audss.c         |  6 ++----
 drivers/clk/samsung/clk-exynos-clkout.c        |  6 ++----
 drivers/clk/stm32/clk-stm32mp13.c              |  6 ++----
 drivers/clk/tegra/clk-dfll.c                   |  5 ++++-
 drivers/clk/tegra/clk-tegra124-dfll-fcpu.c     | 17 ++++++++---------
 drivers/clk/ti/adpll.c                         |  6 ++----
 drivers/clk/uniphier/clk-uniphier-core.c       |  6 ++----
 drivers/clk/x86/clk-fch.c                      |  7 +++----
 drivers/clk/x86/clk-pmc-atom.c                 |  5 ++---
 drivers/clk/xilinx/clk-xlnx-clock-wizard.c     |  6 ++----
 drivers/clk/xilinx/xlnx_vcu.c                  |  8 ++------
 159 files changed, 234 insertions(+), 335 deletions(-)


base-commit: fe15c26ee26efa11741a7b632e9f23b01aca4cc6
-- 
2.39.1


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

* [PATCH 01/30] clk: mediatek: Make mtk_clk_simple_remove() return void
  2023-03-12 16:14 [PATCH 00/30] clk: Convert to platform remove callback returning void Uwe Kleine-König
@ 2023-03-12 16:14 ` Uwe Kleine-König
  2023-03-13  8:54   ` AngeloGioacchino Del Regno
  2023-03-12 16:14 ` [PATCH 03/30] clk: xilinx: Drop if block with always false condition Uwe Kleine-König
                   ` (10 subsequent siblings)
  11 siblings, 1 reply; 29+ messages in thread
From: Uwe Kleine-König @ 2023-03-12 16:14 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd, Matthias Brugger
  Cc: AngeloGioacchino Del Regno, linux-clk, linux-kernel,
	linux-arm-kernel, linux-mediatek

mtk_clk_simple_remove() returned zero unconditionally. Make it return no
value instead and convert the respective drivers to .remove_new.

This makes the semantics in the callers of mtk_clk_simple_remove() clearer
and prepares for the quest to make platform driver's remove function return
void.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/clk/mediatek/clk-mt2701-aud.c          | 6 +++---
 drivers/clk/mediatek/clk-mt2701-bdp.c          | 2 +-
 drivers/clk/mediatek/clk-mt2701-eth.c          | 2 +-
 drivers/clk/mediatek/clk-mt2701-g3d.c          | 2 +-
 drivers/clk/mediatek/clk-mt2701-hif.c          | 2 +-
 drivers/clk/mediatek/clk-mt2701-img.c          | 2 +-
 drivers/clk/mediatek/clk-mt2701-vdec.c         | 2 +-
 drivers/clk/mediatek/clk-mt2712-bdp.c          | 2 +-
 drivers/clk/mediatek/clk-mt2712-img.c          | 2 +-
 drivers/clk/mediatek/clk-mt2712-jpgdec.c       | 2 +-
 drivers/clk/mediatek/clk-mt2712-mfg.c          | 2 +-
 drivers/clk/mediatek/clk-mt2712-vdec.c         | 2 +-
 drivers/clk/mediatek/clk-mt2712-venc.c         | 2 +-
 drivers/clk/mediatek/clk-mt2712.c              | 2 +-
 drivers/clk/mediatek/clk-mt6765-audio.c        | 2 +-
 drivers/clk/mediatek/clk-mt6765-cam.c          | 2 +-
 drivers/clk/mediatek/clk-mt6765-img.c          | 2 +-
 drivers/clk/mediatek/clk-mt6765-mipi0a.c       | 2 +-
 drivers/clk/mediatek/clk-mt6765-mm.c           | 2 +-
 drivers/clk/mediatek/clk-mt6765-vcodec.c       | 2 +-
 drivers/clk/mediatek/clk-mt6779-aud.c          | 2 +-
 drivers/clk/mediatek/clk-mt6779-cam.c          | 2 +-
 drivers/clk/mediatek/clk-mt6779-img.c          | 2 +-
 drivers/clk/mediatek/clk-mt6779-ipe.c          | 2 +-
 drivers/clk/mediatek/clk-mt6779-mfg.c          | 2 +-
 drivers/clk/mediatek/clk-mt6779-vdec.c         | 2 +-
 drivers/clk/mediatek/clk-mt6779-venc.c         | 2 +-
 drivers/clk/mediatek/clk-mt6779.c              | 2 +-
 drivers/clk/mediatek/clk-mt6795-mfg.c          | 2 +-
 drivers/clk/mediatek/clk-mt6795-topckgen.c     | 2 +-
 drivers/clk/mediatek/clk-mt6795-vdecsys.c      | 2 +-
 drivers/clk/mediatek/clk-mt6795-vencsys.c      | 2 +-
 drivers/clk/mediatek/clk-mt6797-img.c          | 2 +-
 drivers/clk/mediatek/clk-mt6797-vdec.c         | 2 +-
 drivers/clk/mediatek/clk-mt6797-venc.c         | 2 +-
 drivers/clk/mediatek/clk-mt7622-aud.c          | 6 +++---
 drivers/clk/mediatek/clk-mt7622-eth.c          | 2 +-
 drivers/clk/mediatek/clk-mt7622-hif.c          | 2 +-
 drivers/clk/mediatek/clk-mt7629-hif.c          | 2 +-
 drivers/clk/mediatek/clk-mt7981-eth.c          | 2 +-
 drivers/clk/mediatek/clk-mt7981-infracfg.c     | 2 +-
 drivers/clk/mediatek/clk-mt7981-topckgen.c     | 2 +-
 drivers/clk/mediatek/clk-mt7986-topckgen.c     | 2 +-
 drivers/clk/mediatek/clk-mt8173-img.c          | 2 +-
 drivers/clk/mediatek/clk-mt8173-pericfg.c      | 2 +-
 drivers/clk/mediatek/clk-mt8173-topckgen.c     | 2 +-
 drivers/clk/mediatek/clk-mt8173-vdecsys.c      | 2 +-
 drivers/clk/mediatek/clk-mt8173-vencsys.c      | 2 +-
 drivers/clk/mediatek/clk-mt8183-audio.c        | 6 +++---
 drivers/clk/mediatek/clk-mt8183-cam.c          | 2 +-
 drivers/clk/mediatek/clk-mt8183-img.c          | 2 +-
 drivers/clk/mediatek/clk-mt8183-ipu0.c         | 2 +-
 drivers/clk/mediatek/clk-mt8183-ipu1.c         | 2 +-
 drivers/clk/mediatek/clk-mt8183-ipu_adl.c      | 2 +-
 drivers/clk/mediatek/clk-mt8183-ipu_conn.c     | 2 +-
 drivers/clk/mediatek/clk-mt8183-mfgcfg.c       | 2 +-
 drivers/clk/mediatek/clk-mt8183-vdec.c         | 2 +-
 drivers/clk/mediatek/clk-mt8183-venc.c         | 2 +-
 drivers/clk/mediatek/clk-mt8183.c              | 2 +-
 drivers/clk/mediatek/clk-mt8186-cam.c          | 2 +-
 drivers/clk/mediatek/clk-mt8186-img.c          | 2 +-
 drivers/clk/mediatek/clk-mt8186-imp_iic_wrap.c | 2 +-
 drivers/clk/mediatek/clk-mt8186-infra_ao.c     | 2 +-
 drivers/clk/mediatek/clk-mt8186-ipe.c          | 2 +-
 drivers/clk/mediatek/clk-mt8186-mdp.c          | 2 +-
 drivers/clk/mediatek/clk-mt8186-mfg.c          | 2 +-
 drivers/clk/mediatek/clk-mt8186-topckgen.c     | 2 +-
 drivers/clk/mediatek/clk-mt8186-vdec.c         | 2 +-
 drivers/clk/mediatek/clk-mt8186-venc.c         | 2 +-
 drivers/clk/mediatek/clk-mt8186-wpe.c          | 2 +-
 drivers/clk/mediatek/clk-mt8192-aud.c          | 6 +++---
 drivers/clk/mediatek/clk-mt8192-cam.c          | 2 +-
 drivers/clk/mediatek/clk-mt8192-img.c          | 2 +-
 drivers/clk/mediatek/clk-mt8192-imp_iic_wrap.c | 2 +-
 drivers/clk/mediatek/clk-mt8192-ipe.c          | 2 +-
 drivers/clk/mediatek/clk-mt8192-mdp.c          | 2 +-
 drivers/clk/mediatek/clk-mt8192-mfg.c          | 2 +-
 drivers/clk/mediatek/clk-mt8192-msdc.c         | 2 +-
 drivers/clk/mediatek/clk-mt8192-scp_adsp.c     | 2 +-
 drivers/clk/mediatek/clk-mt8192-vdec.c         | 2 +-
 drivers/clk/mediatek/clk-mt8192-venc.c         | 2 +-
 drivers/clk/mediatek/clk-mt8192.c              | 2 +-
 drivers/clk/mediatek/clk-mt8195-cam.c          | 2 +-
 drivers/clk/mediatek/clk-mt8195-ccu.c          | 2 +-
 drivers/clk/mediatek/clk-mt8195-img.c          | 2 +-
 drivers/clk/mediatek/clk-mt8195-imp_iic_wrap.c | 2 +-
 drivers/clk/mediatek/clk-mt8195-infra_ao.c     | 2 +-
 drivers/clk/mediatek/clk-mt8195-ipe.c          | 2 +-
 drivers/clk/mediatek/clk-mt8195-mfg.c          | 2 +-
 drivers/clk/mediatek/clk-mt8195-peri_ao.c      | 2 +-
 drivers/clk/mediatek/clk-mt8195-scp_adsp.c     | 2 +-
 drivers/clk/mediatek/clk-mt8195-vdec.c         | 2 +-
 drivers/clk/mediatek/clk-mt8195-venc.c         | 2 +-
 drivers/clk/mediatek/clk-mt8195-wpe.c          | 2 +-
 drivers/clk/mediatek/clk-mt8365-apu.c          | 2 +-
 drivers/clk/mediatek/clk-mt8365-cam.c          | 2 +-
 drivers/clk/mediatek/clk-mt8365-mfg.c          | 2 +-
 drivers/clk/mediatek/clk-mt8365-vdec.c         | 2 +-
 drivers/clk/mediatek/clk-mt8365-venc.c         | 2 +-
 drivers/clk/mediatek/clk-mtk.c                 | 4 +---
 drivers/clk/mediatek/clk-mtk.h                 | 2 +-
 101 files changed, 109 insertions(+), 111 deletions(-)

diff --git a/drivers/clk/mediatek/clk-mt2701-aud.c b/drivers/clk/mediatek/clk-mt2701-aud.c
index 1a32d8b7db84..218c7586983a 100644
--- a/drivers/clk/mediatek/clk-mt2701-aud.c
+++ b/drivers/clk/mediatek/clk-mt2701-aud.c
@@ -173,15 +173,15 @@ static int clk_mt2701_aud_probe(struct platform_device *pdev)
 	return r;
 }
 
-static int clk_mt2701_aud_remove(struct platform_device *pdev)
+static void clk_mt2701_aud_remove(struct platform_device *pdev)
 {
 	of_platform_depopulate(&pdev->dev);
-	return mtk_clk_simple_remove(pdev);
+	mtk_clk_simple_remove(pdev);
 }
 
 static struct platform_driver clk_mt2701_aud_drv = {
 	.probe = clk_mt2701_aud_probe,
-	.remove = clk_mt2701_aud_remove,
+	.remove_new = clk_mt2701_aud_remove,
 	.driver = {
 		.name = "clk-mt2701-aud",
 		.of_match_table = of_match_clk_mt2701_aud,
diff --git a/drivers/clk/mediatek/clk-mt2701-bdp.c b/drivers/clk/mediatek/clk-mt2701-bdp.c
index 435ed4819d56..cf6a07de5dcb 100644
--- a/drivers/clk/mediatek/clk-mt2701-bdp.c
+++ b/drivers/clk/mediatek/clk-mt2701-bdp.c
@@ -110,7 +110,7 @@ static const struct of_device_id of_match_clk_mt2701_bdp[] = {
 
 static struct platform_driver clk_mt2701_bdp_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt2701-bdp",
 		.of_match_table = of_match_clk_mt2701_bdp,
diff --git a/drivers/clk/mediatek/clk-mt2701-eth.c b/drivers/clk/mediatek/clk-mt2701-eth.c
index f3cb78e7f6e9..92576bdb8a5b 100644
--- a/drivers/clk/mediatek/clk-mt2701-eth.c
+++ b/drivers/clk/mediatek/clk-mt2701-eth.c
@@ -58,7 +58,7 @@ static const struct of_device_id of_match_clk_mt2701_eth[] = {
 
 static struct platform_driver clk_mt2701_eth_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt2701-eth",
 		.of_match_table = of_match_clk_mt2701_eth,
diff --git a/drivers/clk/mediatek/clk-mt2701-g3d.c b/drivers/clk/mediatek/clk-mt2701-g3d.c
index 499a170ba5f9..e5ba06c1b6c4 100644
--- a/drivers/clk/mediatek/clk-mt2701-g3d.c
+++ b/drivers/clk/mediatek/clk-mt2701-g3d.c
@@ -57,7 +57,7 @@ static const struct of_device_id of_match_clk_mt2701_g3d[] = {
 
 static struct platform_driver clk_mt2701_g3d_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt2701-g3d",
 		.of_match_table = of_match_clk_mt2701_g3d,
diff --git a/drivers/clk/mediatek/clk-mt2701-hif.c b/drivers/clk/mediatek/clk-mt2701-hif.c
index d5465d782993..466829edd490 100644
--- a/drivers/clk/mediatek/clk-mt2701-hif.c
+++ b/drivers/clk/mediatek/clk-mt2701-hif.c
@@ -55,7 +55,7 @@ static const struct of_device_id of_match_clk_mt2701_hif[] = {
 
 static struct platform_driver clk_mt2701_hif_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt2701-hif",
 		.of_match_table = of_match_clk_mt2701_hif,
diff --git a/drivers/clk/mediatek/clk-mt2701-img.c b/drivers/clk/mediatek/clk-mt2701-img.c
index 7e53deb7f990..44df1addc9f5 100644
--- a/drivers/clk/mediatek/clk-mt2701-img.c
+++ b/drivers/clk/mediatek/clk-mt2701-img.c
@@ -52,7 +52,7 @@ static const struct of_device_id of_match_clk_mt2701_img[] = {
 
 static struct platform_driver clk_mt2701_img_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt2701-img",
 		.of_match_table = of_match_clk_mt2701_img,
diff --git a/drivers/clk/mediatek/clk-mt2701-vdec.c b/drivers/clk/mediatek/clk-mt2701-vdec.c
index d3089da0ab62..923c43ddee30 100644
--- a/drivers/clk/mediatek/clk-mt2701-vdec.c
+++ b/drivers/clk/mediatek/clk-mt2701-vdec.c
@@ -63,7 +63,7 @@ static const struct of_device_id of_match_clk_mt2701_vdec[] = {
 
 static struct platform_driver clk_mt2701_vdec_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt2701-vdec",
 		.of_match_table = of_match_clk_mt2701_vdec,
diff --git a/drivers/clk/mediatek/clk-mt2712-bdp.c b/drivers/clk/mediatek/clk-mt2712-bdp.c
index 684d03e9f6de..3c42427c765a 100644
--- a/drivers/clk/mediatek/clk-mt2712-bdp.c
+++ b/drivers/clk/mediatek/clk-mt2712-bdp.c
@@ -74,7 +74,7 @@ static const struct of_device_id of_match_clk_mt2712_bdp[] = {
 
 static struct platform_driver clk_mt2712_bdp_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt2712-bdp",
 		.of_match_table = of_match_clk_mt2712_bdp,
diff --git a/drivers/clk/mediatek/clk-mt2712-img.c b/drivers/clk/mediatek/clk-mt2712-img.c
index 335049cdc856..41c928024e75 100644
--- a/drivers/clk/mediatek/clk-mt2712-img.c
+++ b/drivers/clk/mediatek/clk-mt2712-img.c
@@ -52,7 +52,7 @@ static const struct of_device_id of_match_clk_mt2712_img[] = {
 
 static struct platform_driver clk_mt2712_img_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt2712-img",
 		.of_match_table = of_match_clk_mt2712_img,
diff --git a/drivers/clk/mediatek/clk-mt2712-jpgdec.c b/drivers/clk/mediatek/clk-mt2712-jpgdec.c
index 07ba7c5e80af..af133ab42296 100644
--- a/drivers/clk/mediatek/clk-mt2712-jpgdec.c
+++ b/drivers/clk/mediatek/clk-mt2712-jpgdec.c
@@ -48,7 +48,7 @@ static const struct of_device_id of_match_clk_mt2712_jpgdec[] = {
 
 static struct platform_driver clk_mt2712_jpgdec_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt2712-jpgdec",
 		.of_match_table = of_match_clk_mt2712_jpgdec,
diff --git a/drivers/clk/mediatek/clk-mt2712-mfg.c b/drivers/clk/mediatek/clk-mt2712-mfg.c
index 42f8cf3ecf4c..d20b7d025e47 100644
--- a/drivers/clk/mediatek/clk-mt2712-mfg.c
+++ b/drivers/clk/mediatek/clk-mt2712-mfg.c
@@ -47,7 +47,7 @@ static const struct of_device_id of_match_clk_mt2712_mfg[] = {
 
 static struct platform_driver clk_mt2712_mfg_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt2712-mfg",
 		.of_match_table = of_match_clk_mt2712_mfg,
diff --git a/drivers/clk/mediatek/clk-mt2712-vdec.c b/drivers/clk/mediatek/clk-mt2712-vdec.c
index 6296ed5c5b55..74ebe298c52e 100644
--- a/drivers/clk/mediatek/clk-mt2712-vdec.c
+++ b/drivers/clk/mediatek/clk-mt2712-vdec.c
@@ -66,7 +66,7 @@ static const struct of_device_id of_match_clk_mt2712_vdec[] = {
 
 static struct platform_driver clk_mt2712_vdec_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt2712-vdec",
 		.of_match_table = of_match_clk_mt2712_vdec,
diff --git a/drivers/clk/mediatek/clk-mt2712-venc.c b/drivers/clk/mediatek/clk-mt2712-venc.c
index b9bfc35de629..64cda87875ce 100644
--- a/drivers/clk/mediatek/clk-mt2712-venc.c
+++ b/drivers/clk/mediatek/clk-mt2712-venc.c
@@ -49,7 +49,7 @@ static const struct of_device_id of_match_clk_mt2712_venc[] = {
 
 static struct platform_driver clk_mt2712_venc_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt2712-venc",
 		.of_match_table = of_match_clk_mt2712_venc,
diff --git a/drivers/clk/mediatek/clk-mt2712.c b/drivers/clk/mediatek/clk-mt2712.c
index 94f8fc2a4f7b..07f5cf8b0040 100644
--- a/drivers/clk/mediatek/clk-mt2712.c
+++ b/drivers/clk/mediatek/clk-mt2712.c
@@ -1446,7 +1446,7 @@ static const struct of_device_id of_match_clk_mt2712_simple[] = {
 
 static struct platform_driver clk_mt2712_simple_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt2712-simple",
 		.of_match_table = of_match_clk_mt2712_simple,
diff --git a/drivers/clk/mediatek/clk-mt6765-audio.c b/drivers/clk/mediatek/clk-mt6765-audio.c
index 0aa6c0d352ca..504812cf4647 100644
--- a/drivers/clk/mediatek/clk-mt6765-audio.c
+++ b/drivers/clk/mediatek/clk-mt6765-audio.c
@@ -80,7 +80,7 @@ static const struct of_device_id of_match_clk_mt6765_audio[] = {
 
 static struct platform_driver clk_mt6765_audio_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt6765-audio",
 		.of_match_table = of_match_clk_mt6765_audio,
diff --git a/drivers/clk/mediatek/clk-mt6765-cam.c b/drivers/clk/mediatek/clk-mt6765-cam.c
index 25f2bef38126..1e0de9422aaa 100644
--- a/drivers/clk/mediatek/clk-mt6765-cam.c
+++ b/drivers/clk/mediatek/clk-mt6765-cam.c
@@ -55,7 +55,7 @@ static const struct of_device_id of_match_clk_mt6765_cam[] = {
 
 static struct platform_driver clk_mt6765_cam_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt6765-cam",
 		.of_match_table = of_match_clk_mt6765_cam,
diff --git a/drivers/clk/mediatek/clk-mt6765-img.c b/drivers/clk/mediatek/clk-mt6765-img.c
index a62303ef4f41..284133aac909 100644
--- a/drivers/clk/mediatek/clk-mt6765-img.c
+++ b/drivers/clk/mediatek/clk-mt6765-img.c
@@ -51,7 +51,7 @@ static const struct of_device_id of_match_clk_mt6765_img[] = {
 
 static struct platform_driver clk_mt6765_img_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt6765-img",
 		.of_match_table = of_match_clk_mt6765_img,
diff --git a/drivers/clk/mediatek/clk-mt6765-mipi0a.c b/drivers/clk/mediatek/clk-mt6765-mipi0a.c
index 25c829fc3866..ad543b601023 100644
--- a/drivers/clk/mediatek/clk-mt6765-mipi0a.c
+++ b/drivers/clk/mediatek/clk-mt6765-mipi0a.c
@@ -48,7 +48,7 @@ static const struct of_device_id of_match_clk_mt6765_mipi0a[] = {
 
 static struct platform_driver clk_mt6765_mipi0a_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt6765-mipi0a",
 		.of_match_table = of_match_clk_mt6765_mipi0a,
diff --git a/drivers/clk/mediatek/clk-mt6765-mm.c b/drivers/clk/mediatek/clk-mt6765-mm.c
index bda774668a36..ef05a7283b4d 100644
--- a/drivers/clk/mediatek/clk-mt6765-mm.c
+++ b/drivers/clk/mediatek/clk-mt6765-mm.c
@@ -77,7 +77,7 @@ static const struct of_device_id of_match_clk_mt6765_mm[] = {
 
 static struct platform_driver clk_mt6765_mm_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt6765-mm",
 		.of_match_table = of_match_clk_mt6765_mm,
diff --git a/drivers/clk/mediatek/clk-mt6765-vcodec.c b/drivers/clk/mediatek/clk-mt6765-vcodec.c
index 2bc1fbde87da..87ddfdafaa7a 100644
--- a/drivers/clk/mediatek/clk-mt6765-vcodec.c
+++ b/drivers/clk/mediatek/clk-mt6765-vcodec.c
@@ -50,7 +50,7 @@ static const struct of_device_id of_match_clk_mt6765_vcodec[] = {
 
 static struct platform_driver clk_mt6765_vcodec_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt6765-vcodec",
 		.of_match_table = of_match_clk_mt6765_vcodec,
diff --git a/drivers/clk/mediatek/clk-mt6779-aud.c b/drivers/clk/mediatek/clk-mt6779-aud.c
index 6e473ae1fd90..03a258682ff7 100644
--- a/drivers/clk/mediatek/clk-mt6779-aud.c
+++ b/drivers/clk/mediatek/clk-mt6779-aud.c
@@ -105,7 +105,7 @@ static const struct of_device_id of_match_clk_mt6779_aud[] = {
 
 static struct platform_driver clk_mt6779_aud_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt6779-aud",
 		.of_match_table = of_match_clk_mt6779_aud,
diff --git a/drivers/clk/mediatek/clk-mt6779-cam.c b/drivers/clk/mediatek/clk-mt6779-cam.c
index 7be3db90fa4a..b57f577e28dd 100644
--- a/drivers/clk/mediatek/clk-mt6779-cam.c
+++ b/drivers/clk/mediatek/clk-mt6779-cam.c
@@ -54,7 +54,7 @@ static const struct of_device_id of_match_clk_mt6779_cam[] = {
 
 static struct platform_driver clk_mt6779_cam_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt6779-cam",
 		.of_match_table = of_match_clk_mt6779_cam,
diff --git a/drivers/clk/mediatek/clk-mt6779-img.c b/drivers/clk/mediatek/clk-mt6779-img.c
index 9bc51fc82dbd..468c254be1cc 100644
--- a/drivers/clk/mediatek/clk-mt6779-img.c
+++ b/drivers/clk/mediatek/clk-mt6779-img.c
@@ -46,7 +46,7 @@ static const struct of_device_id of_match_clk_mt6779_img[] = {
 
 static struct platform_driver clk_mt6779_img_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt6779-img",
 		.of_match_table = of_match_clk_mt6779_img,
diff --git a/drivers/clk/mediatek/clk-mt6779-ipe.c b/drivers/clk/mediatek/clk-mt6779-ipe.c
index 92e9d1ade422..b7d3c25f6f8e 100644
--- a/drivers/clk/mediatek/clk-mt6779-ipe.c
+++ b/drivers/clk/mediatek/clk-mt6779-ipe.c
@@ -48,7 +48,7 @@ static const struct of_device_id of_match_clk_mt6779_ipe[] = {
 
 static struct platform_driver clk_mt6779_ipe_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt6779-ipe",
 		.of_match_table = of_match_clk_mt6779_ipe,
diff --git a/drivers/clk/mediatek/clk-mt6779-mfg.c b/drivers/clk/mediatek/clk-mt6779-mfg.c
index efc793a1969a..b60868e03d63 100644
--- a/drivers/clk/mediatek/clk-mt6779-mfg.c
+++ b/drivers/clk/mediatek/clk-mt6779-mfg.c
@@ -43,7 +43,7 @@ static const struct of_device_id of_match_clk_mt6779_mfg[] = {
 
 static struct platform_driver clk_mt6779_mfg_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt6779-mfg",
 		.of_match_table = of_match_clk_mt6779_mfg,
diff --git a/drivers/clk/mediatek/clk-mt6779-vdec.c b/drivers/clk/mediatek/clk-mt6779-vdec.c
index 3209a6518d5b..24e8064795bd 100644
--- a/drivers/clk/mediatek/clk-mt6779-vdec.c
+++ b/drivers/clk/mediatek/clk-mt6779-vdec.c
@@ -55,7 +55,7 @@ static const struct of_device_id of_match_clk_mt6779_vdec[] = {
 
 static struct platform_driver clk_mt6779_vdec_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt6779-vdec",
 		.of_match_table = of_match_clk_mt6779_vdec,
diff --git a/drivers/clk/mediatek/clk-mt6779-venc.c b/drivers/clk/mediatek/clk-mt6779-venc.c
index c25035c0f334..f51e1299ce26 100644
--- a/drivers/clk/mediatek/clk-mt6779-venc.c
+++ b/drivers/clk/mediatek/clk-mt6779-venc.c
@@ -46,7 +46,7 @@ static const struct of_device_id of_match_clk_mt6779_venc[] = {
 
 static struct platform_driver clk_mt6779_venc_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt6779-venc",
 		.of_match_table = of_match_clk_mt6779_venc,
diff --git a/drivers/clk/mediatek/clk-mt6779.c b/drivers/clk/mediatek/clk-mt6779.c
index 827025d127d9..63b7d68de13b 100644
--- a/drivers/clk/mediatek/clk-mt6779.c
+++ b/drivers/clk/mediatek/clk-mt6779.c
@@ -1302,7 +1302,7 @@ static const struct of_device_id of_match_clk_mt6779_infra[] = {
 
 static struct platform_driver clk_mt6779_infra_drv  = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt6779-infra",
 		.of_match_table = of_match_clk_mt6779_infra,
diff --git a/drivers/clk/mediatek/clk-mt6795-mfg.c b/drivers/clk/mediatek/clk-mt6795-mfg.c
index ee7aab24eb24..239c2a286cc4 100644
--- a/drivers/clk/mediatek/clk-mt6795-mfg.c
+++ b/drivers/clk/mediatek/clk-mt6795-mfg.c
@@ -42,7 +42,7 @@ static struct platform_driver clk_mt6795_mfg_drv = {
 		.of_match_table = of_match_clk_mt6795_mfg,
 	},
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 };
 module_platform_driver(clk_mt6795_mfg_drv);
 
diff --git a/drivers/clk/mediatek/clk-mt6795-topckgen.c b/drivers/clk/mediatek/clk-mt6795-topckgen.c
index e80fa588e309..7e54233e7b19 100644
--- a/drivers/clk/mediatek/clk-mt6795-topckgen.c
+++ b/drivers/clk/mediatek/clk-mt6795-topckgen.c
@@ -546,7 +546,7 @@ static struct platform_driver clk_mt6795_topckgen_drv = {
 		.of_match_table = of_match_clk_mt6795_topckgen,
 	},
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 };
 module_platform_driver(clk_mt6795_topckgen_drv);
 
diff --git a/drivers/clk/mediatek/clk-mt6795-vdecsys.c b/drivers/clk/mediatek/clk-mt6795-vdecsys.c
index d85d04e0d016..bbc800512ac5 100644
--- a/drivers/clk/mediatek/clk-mt6795-vdecsys.c
+++ b/drivers/clk/mediatek/clk-mt6795-vdecsys.c
@@ -43,7 +43,7 @@ static const struct of_device_id of_match_clk_mt6795_vdecsys[] = {
 
 static struct platform_driver clk_mt6795_vdecsys_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt6795-vdecsys",
 		.of_match_table = of_match_clk_mt6795_vdecsys,
diff --git a/drivers/clk/mediatek/clk-mt6795-vencsys.c b/drivers/clk/mediatek/clk-mt6795-vencsys.c
index de40a982ca96..5eb6fd540d13 100644
--- a/drivers/clk/mediatek/clk-mt6795-vencsys.c
+++ b/drivers/clk/mediatek/clk-mt6795-vencsys.c
@@ -42,7 +42,7 @@ static struct platform_driver clk_mt6795_vencsys_drv = {
 		.of_match_table = of_match_clk_mt6795_vencsys,
 	},
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 };
 module_platform_driver(clk_mt6795_vencsys_drv);
 
diff --git a/drivers/clk/mediatek/clk-mt6797-img.c b/drivers/clk/mediatek/clk-mt6797-img.c
index 7c6a53fbb8be..eddf9ab1d443 100644
--- a/drivers/clk/mediatek/clk-mt6797-img.c
+++ b/drivers/clk/mediatek/clk-mt6797-img.c
@@ -48,7 +48,7 @@ static const struct of_device_id of_match_clk_mt6797_img[] = {
 
 static struct platform_driver clk_mt6797_img_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt6797-img",
 		.of_match_table = of_match_clk_mt6797_img,
diff --git a/drivers/clk/mediatek/clk-mt6797-vdec.c b/drivers/clk/mediatek/clk-mt6797-vdec.c
index 6120fccc859f..983471d71d0e 100644
--- a/drivers/clk/mediatek/clk-mt6797-vdec.c
+++ b/drivers/clk/mediatek/clk-mt6797-vdec.c
@@ -65,7 +65,7 @@ static const struct of_device_id of_match_clk_mt6797_vdec[] = {
 
 static struct platform_driver clk_mt6797_vdec_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt6797-vdec",
 		.of_match_table = of_match_clk_mt6797_vdec,
diff --git a/drivers/clk/mediatek/clk-mt6797-venc.c b/drivers/clk/mediatek/clk-mt6797-venc.c
index 834d3834d2bb..1120e25ef10f 100644
--- a/drivers/clk/mediatek/clk-mt6797-venc.c
+++ b/drivers/clk/mediatek/clk-mt6797-venc.c
@@ -50,7 +50,7 @@ static const struct of_device_id of_match_clk_mt6797_venc[] = {
 
 static struct platform_driver clk_mt6797_venc_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt6797-venc",
 		.of_match_table = of_match_clk_mt6797_venc,
diff --git a/drivers/clk/mediatek/clk-mt7622-aud.c b/drivers/clk/mediatek/clk-mt7622-aud.c
index b8aabfeb1cba..663680f6f1cd 100644
--- a/drivers/clk/mediatek/clk-mt7622-aud.c
+++ b/drivers/clk/mediatek/clk-mt7622-aud.c
@@ -159,10 +159,10 @@ static int clk_mt7622_aud_probe(struct platform_device *pdev)
 	return r;
 }
 
-static int clk_mt7622_aud_remove(struct platform_device *pdev)
+static void clk_mt7622_aud_remove(struct platform_device *pdev)
 {
 	of_platform_depopulate(&pdev->dev);
-	return mtk_clk_simple_remove(pdev);
+	mtk_clk_simple_remove(pdev);
 }
 
 static const struct of_device_id of_match_clk_mt7622_aud[] = {
@@ -172,7 +172,7 @@ static const struct of_device_id of_match_clk_mt7622_aud[] = {
 
 static struct platform_driver clk_mt7622_aud_drv = {
 	.probe = clk_mt7622_aud_probe,
-	.remove = clk_mt7622_aud_remove,
+	.remove_new = clk_mt7622_aud_remove,
 	.driver = {
 		.name = "clk-mt7622-aud",
 		.of_match_table = of_match_clk_mt7622_aud,
diff --git a/drivers/clk/mediatek/clk-mt7622-eth.c b/drivers/clk/mediatek/clk-mt7622-eth.c
index aee583fa77d0..bb98c3d21968 100644
--- a/drivers/clk/mediatek/clk-mt7622-eth.c
+++ b/drivers/clk/mediatek/clk-mt7622-eth.c
@@ -92,7 +92,7 @@ static const struct of_device_id of_match_clk_mt7622_eth[] = {
 
 static struct platform_driver clk_mt7622_eth_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt7622-eth",
 		.of_match_table = of_match_clk_mt7622_eth,
diff --git a/drivers/clk/mediatek/clk-mt7622-hif.c b/drivers/clk/mediatek/clk-mt7622-hif.c
index ab5cad0c2b1c..b3673838b04b 100644
--- a/drivers/clk/mediatek/clk-mt7622-hif.c
+++ b/drivers/clk/mediatek/clk-mt7622-hif.c
@@ -104,7 +104,7 @@ static const struct of_device_id of_match_clk_mt7622_hif[] = {
 
 static struct platform_driver clk_mt7622_hif_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt7622-hif",
 		.of_match_table = of_match_clk_mt7622_hif,
diff --git a/drivers/clk/mediatek/clk-mt7629-hif.c b/drivers/clk/mediatek/clk-mt7629-hif.c
index c3eb09ea6036..879c449be122 100644
--- a/drivers/clk/mediatek/clk-mt7629-hif.c
+++ b/drivers/clk/mediatek/clk-mt7629-hif.c
@@ -99,7 +99,7 @@ static const struct of_device_id of_match_clk_mt7629_hif[] = {
 
 static struct platform_driver clk_mt7629_hif_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt7629-hif",
 		.of_match_table = of_match_clk_mt7629_hif,
diff --git a/drivers/clk/mediatek/clk-mt7981-eth.c b/drivers/clk/mediatek/clk-mt7981-eth.c
index 773350911be2..8c95713e0e32 100644
--- a/drivers/clk/mediatek/clk-mt7981-eth.c
+++ b/drivers/clk/mediatek/clk-mt7981-eth.c
@@ -108,7 +108,7 @@ static const struct of_device_id of_match_clk_mt7981_eth[] = {
 
 static struct platform_driver clk_mt7981_eth_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt7981-eth",
 		.of_match_table = of_match_clk_mt7981_eth,
diff --git a/drivers/clk/mediatek/clk-mt7981-infracfg.c b/drivers/clk/mediatek/clk-mt7981-infracfg.c
index 8cf5057419e8..15b84919afe0 100644
--- a/drivers/clk/mediatek/clk-mt7981-infracfg.c
+++ b/drivers/clk/mediatek/clk-mt7981-infracfg.c
@@ -198,7 +198,7 @@ static const struct of_device_id of_match_clk_mt7981_infracfg[] = {
 
 static struct platform_driver clk_mt7981_infracfg_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt7981-infracfg",
 		.of_match_table = of_match_clk_mt7981_infracfg,
diff --git a/drivers/clk/mediatek/clk-mt7981-topckgen.c b/drivers/clk/mediatek/clk-mt7981-topckgen.c
index 74634d65f5f6..7ed7d8bff245 100644
--- a/drivers/clk/mediatek/clk-mt7981-topckgen.c
+++ b/drivers/clk/mediatek/clk-mt7981-topckgen.c
@@ -413,7 +413,7 @@ static const struct of_device_id of_match_clk_mt7981_topckgen[] = {
 
 static struct platform_driver clk_mt7981_topckgen_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt7981-topckgen",
 		.of_match_table = of_match_clk_mt7981_topckgen,
diff --git a/drivers/clk/mediatek/clk-mt7986-topckgen.c b/drivers/clk/mediatek/clk-mt7986-topckgen.c
index dff9976fa689..ac793027c903 100644
--- a/drivers/clk/mediatek/clk-mt7986-topckgen.c
+++ b/drivers/clk/mediatek/clk-mt7986-topckgen.c
@@ -307,7 +307,7 @@ static const struct of_device_id of_match_clk_mt7986_topckgen[] = {
 
 static struct platform_driver clk_mt7986_topckgen_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt7986-topckgen",
 		.of_match_table = of_match_clk_mt7986_topckgen,
diff --git a/drivers/clk/mediatek/clk-mt8173-img.c b/drivers/clk/mediatek/clk-mt8173-img.c
index 7b50ffb7a8a5..f5fe7b6bd066 100644
--- a/drivers/clk/mediatek/clk-mt8173-img.c
+++ b/drivers/clk/mediatek/clk-mt8173-img.c
@@ -43,7 +43,7 @@ static const struct of_device_id of_match_clk_mt8173_imgsys[] = {
 
 static struct platform_driver clk_mt8173_vdecsys_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt8173-imgsys",
 		.of_match_table = of_match_clk_mt8173_imgsys,
diff --git a/drivers/clk/mediatek/clk-mt8173-pericfg.c b/drivers/clk/mediatek/clk-mt8173-pericfg.c
index e87294b72c2c..a8f7b744af60 100644
--- a/drivers/clk/mediatek/clk-mt8173-pericfg.c
+++ b/drivers/clk/mediatek/clk-mt8173-pericfg.c
@@ -114,7 +114,7 @@ static struct platform_driver clk_mt8173_pericfg_drv = {
 		.of_match_table = of_match_clk_mt8173_pericfg,
 	},
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 };
 module_platform_driver(clk_mt8173_pericfg_drv);
 
diff --git a/drivers/clk/mediatek/clk-mt8173-topckgen.c b/drivers/clk/mediatek/clk-mt8173-topckgen.c
index 257961528fe2..32d5d8a822f5 100644
--- a/drivers/clk/mediatek/clk-mt8173-topckgen.c
+++ b/drivers/clk/mediatek/clk-mt8173-topckgen.c
@@ -645,7 +645,7 @@ static struct platform_driver clk_mt8173_topckgen_drv = {
 		.of_match_table = of_match_clk_mt8173_topckgen,
 	},
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 };
 module_platform_driver(clk_mt8173_topckgen_drv);
 
diff --git a/drivers/clk/mediatek/clk-mt8173-vdecsys.c b/drivers/clk/mediatek/clk-mt8173-vdecsys.c
index 5105b8e0969d..0d3f1eb1c3d1 100644
--- a/drivers/clk/mediatek/clk-mt8173-vdecsys.c
+++ b/drivers/clk/mediatek/clk-mt8173-vdecsys.c
@@ -45,7 +45,7 @@ static const struct of_device_id of_match_clk_mt8173_vdecsys[] = {
 
 static struct platform_driver clk_mt8173_vdecsys_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt8173-vdecsys",
 		.of_match_table = of_match_clk_mt8173_vdecsys,
diff --git a/drivers/clk/mediatek/clk-mt8173-vencsys.c b/drivers/clk/mediatek/clk-mt8173-vencsys.c
index ff4f1cb735de..aefd9a46e991 100644
--- a/drivers/clk/mediatek/clk-mt8173-vencsys.c
+++ b/drivers/clk/mediatek/clk-mt8173-vencsys.c
@@ -56,7 +56,7 @@ static struct platform_driver clk_mt8173_vencsys_drv = {
 		.of_match_table = of_match_clk_mt8173_vencsys,
 	},
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 };
 module_platform_driver(clk_mt8173_vencsys_drv);
 
diff --git a/drivers/clk/mediatek/clk-mt8183-audio.c b/drivers/clk/mediatek/clk-mt8183-audio.c
index 3f1630290b93..b53ec528bf8f 100644
--- a/drivers/clk/mediatek/clk-mt8183-audio.c
+++ b/drivers/clk/mediatek/clk-mt8183-audio.c
@@ -87,10 +87,10 @@ static int clk_mt8183_audio_probe(struct platform_device *pdev)
 	return r;
 }
 
-static int clk_mt8183_audio_remove(struct platform_device *pdev)
+static void clk_mt8183_audio_remove(struct platform_device *pdev)
 {
 	of_platform_depopulate(&pdev->dev);
-	return mtk_clk_simple_remove(pdev);
+	mtk_clk_simple_remove(pdev);
 }
 
 static const struct of_device_id of_match_clk_mt8183_audio[] = {
@@ -100,7 +100,7 @@ static const struct of_device_id of_match_clk_mt8183_audio[] = {
 
 static struct platform_driver clk_mt8183_audio_drv = {
 	.probe = clk_mt8183_audio_probe,
-	.remove = clk_mt8183_audio_remove,
+	.remove_new = clk_mt8183_audio_remove,
 	.driver = {
 		.name = "clk-mt8183-audio",
 		.of_match_table = of_match_clk_mt8183_audio,
diff --git a/drivers/clk/mediatek/clk-mt8183-cam.c b/drivers/clk/mediatek/clk-mt8183-cam.c
index 6907b1a6a824..d3f41f7017e2 100644
--- a/drivers/clk/mediatek/clk-mt8183-cam.c
+++ b/drivers/clk/mediatek/clk-mt8183-cam.c
@@ -50,7 +50,7 @@ static const struct of_device_id of_match_clk_mt8183_cam[] = {
 
 static struct platform_driver clk_mt8183_cam_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt8183-cam",
 		.of_match_table = of_match_clk_mt8183_cam,
diff --git a/drivers/clk/mediatek/clk-mt8183-img.c b/drivers/clk/mediatek/clk-mt8183-img.c
index 8d884425d79f..8561c8c46481 100644
--- a/drivers/clk/mediatek/clk-mt8183-img.c
+++ b/drivers/clk/mediatek/clk-mt8183-img.c
@@ -50,7 +50,7 @@ static const struct of_device_id of_match_clk_mt8183_img[] = {
 
 static struct platform_driver clk_mt8183_img_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt8183-img",
 		.of_match_table = of_match_clk_mt8183_img,
diff --git a/drivers/clk/mediatek/clk-mt8183-ipu0.c b/drivers/clk/mediatek/clk-mt8183-ipu0.c
index 953a8a33d048..0076998307b7 100644
--- a/drivers/clk/mediatek/clk-mt8183-ipu0.c
+++ b/drivers/clk/mediatek/clk-mt8183-ipu0.c
@@ -43,7 +43,7 @@ static const struct of_device_id of_match_clk_mt8183_ipu_core0[] = {
 
 static struct platform_driver clk_mt8183_ipu_core0_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt8183-ipu_core0",
 		.of_match_table = of_match_clk_mt8183_ipu_core0,
diff --git a/drivers/clk/mediatek/clk-mt8183-ipu1.c b/drivers/clk/mediatek/clk-mt8183-ipu1.c
index 221d12265974..b92d177d9473 100644
--- a/drivers/clk/mediatek/clk-mt8183-ipu1.c
+++ b/drivers/clk/mediatek/clk-mt8183-ipu1.c
@@ -43,7 +43,7 @@ static const struct of_device_id of_match_clk_mt8183_ipu_core1[] = {
 
 static struct platform_driver clk_mt8183_ipu_core1_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt8183-ipu_core1",
 		.of_match_table = of_match_clk_mt8183_ipu_core1,
diff --git a/drivers/clk/mediatek/clk-mt8183-ipu_adl.c b/drivers/clk/mediatek/clk-mt8183-ipu_adl.c
index 8c4fd96df821..ac12b4febddd 100644
--- a/drivers/clk/mediatek/clk-mt8183-ipu_adl.c
+++ b/drivers/clk/mediatek/clk-mt8183-ipu_adl.c
@@ -41,7 +41,7 @@ static const struct of_device_id of_match_clk_mt8183_ipu_adl[] = {
 
 static struct platform_driver clk_mt8183_ipu_adl_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt8183-ipu_adl",
 		.of_match_table = of_match_clk_mt8183_ipu_adl,
diff --git a/drivers/clk/mediatek/clk-mt8183-ipu_conn.c b/drivers/clk/mediatek/clk-mt8183-ipu_conn.c
index 14a4c3ff82a1..528729fa62e2 100644
--- a/drivers/clk/mediatek/clk-mt8183-ipu_conn.c
+++ b/drivers/clk/mediatek/clk-mt8183-ipu_conn.c
@@ -110,7 +110,7 @@ static const struct of_device_id of_match_clk_mt8183_ipu_conn[] = {
 
 static struct platform_driver clk_mt8183_ipu_conn_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt8183-ipu_conn",
 		.of_match_table = of_match_clk_mt8183_ipu_conn,
diff --git a/drivers/clk/mediatek/clk-mt8183-mfgcfg.c b/drivers/clk/mediatek/clk-mt8183-mfgcfg.c
index 730c9ae5ea12..fc23ac2b2d17 100644
--- a/drivers/clk/mediatek/clk-mt8183-mfgcfg.c
+++ b/drivers/clk/mediatek/clk-mt8183-mfgcfg.c
@@ -42,7 +42,7 @@ static const struct of_device_id of_match_clk_mt8183_mfg[] = {
 
 static struct platform_driver clk_mt8183_mfg_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt8183-mfg",
 		.of_match_table = of_match_clk_mt8183_mfg,
diff --git a/drivers/clk/mediatek/clk-mt8183-vdec.c b/drivers/clk/mediatek/clk-mt8183-vdec.c
index c294e50b96b7..9c1c325ee513 100644
--- a/drivers/clk/mediatek/clk-mt8183-vdec.c
+++ b/drivers/clk/mediatek/clk-mt8183-vdec.c
@@ -54,7 +54,7 @@ static const struct of_device_id of_match_clk_mt8183_vdec[] = {
 
 static struct platform_driver clk_mt8183_vdec_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt8183-vdec",
 		.of_match_table = of_match_clk_mt8183_vdec,
diff --git a/drivers/clk/mediatek/clk-mt8183-venc.c b/drivers/clk/mediatek/clk-mt8183-venc.c
index 0051c5d92fc5..da883ed74ea6 100644
--- a/drivers/clk/mediatek/clk-mt8183-venc.c
+++ b/drivers/clk/mediatek/clk-mt8183-venc.c
@@ -46,7 +46,7 @@ static const struct of_device_id of_match_clk_mt8183_venc[] = {
 
 static struct platform_driver clk_mt8183_venc_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt8183-venc",
 		.of_match_table = of_match_clk_mt8183_venc,
diff --git a/drivers/clk/mediatek/clk-mt8183.c b/drivers/clk/mediatek/clk-mt8183.c
index 722d913f0b4d..41581715a951 100644
--- a/drivers/clk/mediatek/clk-mt8183.c
+++ b/drivers/clk/mediatek/clk-mt8183.c
@@ -1254,7 +1254,7 @@ static const struct of_device_id of_match_clk_mt8183_simple[] = {
 
 static struct platform_driver clk_mt8183_simple_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt8183-simple",
 		.of_match_table = of_match_clk_mt8183_simple,
diff --git a/drivers/clk/mediatek/clk-mt8186-cam.c b/drivers/clk/mediatek/clk-mt8186-cam.c
index 9ec345a2ce66..7b1b9455b2c8 100644
--- a/drivers/clk/mediatek/clk-mt8186-cam.c
+++ b/drivers/clk/mediatek/clk-mt8186-cam.c
@@ -81,7 +81,7 @@ static const struct of_device_id of_match_clk_mt8186_cam[] = {
 
 static struct platform_driver clk_mt8186_cam_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt8186-cam",
 		.of_match_table = of_match_clk_mt8186_cam,
diff --git a/drivers/clk/mediatek/clk-mt8186-img.c b/drivers/clk/mediatek/clk-mt8186-img.c
index 08a625475aee..dd9ae2891556 100644
--- a/drivers/clk/mediatek/clk-mt8186-img.c
+++ b/drivers/clk/mediatek/clk-mt8186-img.c
@@ -59,7 +59,7 @@ static const struct of_device_id of_match_clk_mt8186_img[] = {
 
 static struct platform_driver clk_mt8186_img_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt8186-img",
 		.of_match_table = of_match_clk_mt8186_img,
diff --git a/drivers/clk/mediatek/clk-mt8186-imp_iic_wrap.c b/drivers/clk/mediatek/clk-mt8186-imp_iic_wrap.c
index 47f2e480a05e..d2933d69cc1c 100644
--- a/drivers/clk/mediatek/clk-mt8186-imp_iic_wrap.c
+++ b/drivers/clk/mediatek/clk-mt8186-imp_iic_wrap.c
@@ -58,7 +58,7 @@ static const struct of_device_id of_match_clk_mt8186_imp_iic_wrap[] = {
 
 static struct platform_driver clk_mt8186_imp_iic_wrap_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt8186-imp_iic_wrap",
 		.of_match_table = of_match_clk_mt8186_imp_iic_wrap,
diff --git a/drivers/clk/mediatek/clk-mt8186-infra_ao.c b/drivers/clk/mediatek/clk-mt8186-infra_ao.c
index df2a6bd1aefa..49a7fb24ac1b 100644
--- a/drivers/clk/mediatek/clk-mt8186-infra_ao.c
+++ b/drivers/clk/mediatek/clk-mt8186-infra_ao.c
@@ -230,7 +230,7 @@ static const struct of_device_id of_match_clk_mt8186_infra_ao[] = {
 
 static struct platform_driver clk_mt8186_infra_ao_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt8186-infra-ao",
 		.of_match_table = of_match_clk_mt8186_infra_ao,
diff --git a/drivers/clk/mediatek/clk-mt8186-ipe.c b/drivers/clk/mediatek/clk-mt8186-ipe.c
index 8fca148effa6..1530614c0668 100644
--- a/drivers/clk/mediatek/clk-mt8186-ipe.c
+++ b/drivers/clk/mediatek/clk-mt8186-ipe.c
@@ -46,7 +46,7 @@ static const struct of_device_id of_match_clk_mt8186_ipe[] = {
 
 static struct platform_driver clk_mt8186_ipe_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt8186-ipe",
 		.of_match_table = of_match_clk_mt8186_ipe,
diff --git a/drivers/clk/mediatek/clk-mt8186-mdp.c b/drivers/clk/mediatek/clk-mt8186-mdp.c
index 05174088ef20..32b5a69cd310 100644
--- a/drivers/clk/mediatek/clk-mt8186-mdp.c
+++ b/drivers/clk/mediatek/clk-mt8186-mdp.c
@@ -71,7 +71,7 @@ static const struct of_device_id of_match_clk_mt8186_mdp[] = {
 
 static struct platform_driver clk_mt8186_mdp_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt8186-mdp",
 		.of_match_table = of_match_clk_mt8186_mdp,
diff --git a/drivers/clk/mediatek/clk-mt8186-mfg.c b/drivers/clk/mediatek/clk-mt8186-mfg.c
index 0142d741053a..f58919bd47ac 100644
--- a/drivers/clk/mediatek/clk-mt8186-mfg.c
+++ b/drivers/clk/mediatek/clk-mt8186-mfg.c
@@ -40,7 +40,7 @@ static const struct of_device_id of_match_clk_mt8186_mfg[] = {
 
 static struct platform_driver clk_mt8186_mfg_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt8186-mfg",
 		.of_match_table = of_match_clk_mt8186_mfg,
diff --git a/drivers/clk/mediatek/clk-mt8186-topckgen.c b/drivers/clk/mediatek/clk-mt8186-topckgen.c
index c6786c8b315f..632d54bcb1b3 100644
--- a/drivers/clk/mediatek/clk-mt8186-topckgen.c
+++ b/drivers/clk/mediatek/clk-mt8186-topckgen.c
@@ -724,7 +724,7 @@ static const struct of_device_id of_match_clk_mt8186_topck[] = {
 
 static struct platform_driver clk_mt8186_topck_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt8186-topck",
 		.of_match_table = of_match_clk_mt8186_topck,
diff --git a/drivers/clk/mediatek/clk-mt8186-vdec.c b/drivers/clk/mediatek/clk-mt8186-vdec.c
index 5ad7e1ae0bac..4379fc958408 100644
--- a/drivers/clk/mediatek/clk-mt8186-vdec.c
+++ b/drivers/clk/mediatek/clk-mt8186-vdec.c
@@ -79,7 +79,7 @@ static const struct of_device_id of_match_clk_mt8186_vdec[] = {
 
 static struct platform_driver clk_mt8186_vdec_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt8186-vdec",
 		.of_match_table = of_match_clk_mt8186_vdec,
diff --git a/drivers/clk/mediatek/clk-mt8186-venc.c b/drivers/clk/mediatek/clk-mt8186-venc.c
index f5519f794c45..ec502adfadad 100644
--- a/drivers/clk/mediatek/clk-mt8186-venc.c
+++ b/drivers/clk/mediatek/clk-mt8186-venc.c
@@ -42,7 +42,7 @@ static const struct of_device_id of_match_clk_mt8186_venc[] = {
 
 static struct platform_driver clk_mt8186_venc_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt8186-venc",
 		.of_match_table = of_match_clk_mt8186_venc,
diff --git a/drivers/clk/mediatek/clk-mt8186-wpe.c b/drivers/clk/mediatek/clk-mt8186-wpe.c
index 8db3e9178a1e..23a47fcb2782 100644
--- a/drivers/clk/mediatek/clk-mt8186-wpe.c
+++ b/drivers/clk/mediatek/clk-mt8186-wpe.c
@@ -42,7 +42,7 @@ static const struct of_device_id of_match_clk_mt8186_wpe[] = {
 
 static struct platform_driver clk_mt8186_wpe_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt8186-wpe",
 		.of_match_table = of_match_clk_mt8186_wpe,
diff --git a/drivers/clk/mediatek/clk-mt8192-aud.c b/drivers/clk/mediatek/clk-mt8192-aud.c
index 29affb68e854..8b8c4057c82f 100644
--- a/drivers/clk/mediatek/clk-mt8192-aud.c
+++ b/drivers/clk/mediatek/clk-mt8192-aud.c
@@ -97,10 +97,10 @@ static int clk_mt8192_aud_probe(struct platform_device *pdev)
 	return r;
 }
 
-static int clk_mt8192_aud_remove(struct platform_device *pdev)
+static void clk_mt8192_aud_remove(struct platform_device *pdev)
 {
 	of_platform_depopulate(&pdev->dev);
-	return mtk_clk_simple_remove(pdev);
+	mtk_clk_simple_remove(pdev);
 }
 
 static const struct of_device_id of_match_clk_mt8192_aud[] = {
@@ -110,7 +110,7 @@ static const struct of_device_id of_match_clk_mt8192_aud[] = {
 
 static struct platform_driver clk_mt8192_aud_drv = {
 	.probe = clk_mt8192_aud_probe,
-	.remove = clk_mt8192_aud_remove,
+	.remove_new = clk_mt8192_aud_remove,
 	.driver = {
 		.name = "clk-mt8192-aud",
 		.of_match_table = of_match_clk_mt8192_aud,
diff --git a/drivers/clk/mediatek/clk-mt8192-cam.c b/drivers/clk/mediatek/clk-mt8192-cam.c
index 90b57d46eef7..eb5052a9b149 100644
--- a/drivers/clk/mediatek/clk-mt8192-cam.c
+++ b/drivers/clk/mediatek/clk-mt8192-cam.c
@@ -98,7 +98,7 @@ static const struct of_device_id of_match_clk_mt8192_cam[] = {
 
 static struct platform_driver clk_mt8192_cam_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt8192-cam",
 		.of_match_table = of_match_clk_mt8192_cam,
diff --git a/drivers/clk/mediatek/clk-mt8192-img.c b/drivers/clk/mediatek/clk-mt8192-img.c
index da82d65a7650..de69711ad09d 100644
--- a/drivers/clk/mediatek/clk-mt8192-img.c
+++ b/drivers/clk/mediatek/clk-mt8192-img.c
@@ -61,7 +61,7 @@ static const struct of_device_id of_match_clk_mt8192_img[] = {
 
 static struct platform_driver clk_mt8192_img_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt8192-img",
 		.of_match_table = of_match_clk_mt8192_img,
diff --git a/drivers/clk/mediatek/clk-mt8192-imp_iic_wrap.c b/drivers/clk/mediatek/clk-mt8192-imp_iic_wrap.c
index ff8e20bb44bb..f9473d6c4c14 100644
--- a/drivers/clk/mediatek/clk-mt8192-imp_iic_wrap.c
+++ b/drivers/clk/mediatek/clk-mt8192-imp_iic_wrap.c
@@ -110,7 +110,7 @@ static const struct of_device_id of_match_clk_mt8192_imp_iic_wrap[] = {
 
 static struct platform_driver clk_mt8192_imp_iic_wrap_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt8192-imp_iic_wrap",
 		.of_match_table = of_match_clk_mt8192_imp_iic_wrap,
diff --git a/drivers/clk/mediatek/clk-mt8192-ipe.c b/drivers/clk/mediatek/clk-mt8192-ipe.c
index 0225abe4170a..823bdf49735e 100644
--- a/drivers/clk/mediatek/clk-mt8192-ipe.c
+++ b/drivers/clk/mediatek/clk-mt8192-ipe.c
@@ -48,7 +48,7 @@ static const struct of_device_id of_match_clk_mt8192_ipe[] = {
 
 static struct platform_driver clk_mt8192_ipe_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt8192-ipe",
 		.of_match_table = of_match_clk_mt8192_ipe,
diff --git a/drivers/clk/mediatek/clk-mt8192-mdp.c b/drivers/clk/mediatek/clk-mt8192-mdp.c
index 4675788d7816..50ee62829bd7 100644
--- a/drivers/clk/mediatek/clk-mt8192-mdp.c
+++ b/drivers/clk/mediatek/clk-mt8192-mdp.c
@@ -73,7 +73,7 @@ static const struct of_device_id of_match_clk_mt8192_mdp[] = {
 
 static struct platform_driver clk_mt8192_mdp_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt8192-mdp",
 		.of_match_table = of_match_clk_mt8192_mdp,
diff --git a/drivers/clk/mediatek/clk-mt8192-mfg.c b/drivers/clk/mediatek/clk-mt8192-mfg.c
index ec5b44ffa458..3f4274e25103 100644
--- a/drivers/clk/mediatek/clk-mt8192-mfg.c
+++ b/drivers/clk/mediatek/clk-mt8192-mfg.c
@@ -43,7 +43,7 @@ static const struct of_device_id of_match_clk_mt8192_mfg[] = {
 
 static struct platform_driver clk_mt8192_mfg_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt8192-mfg",
 		.of_match_table = of_match_clk_mt8192_mfg,
diff --git a/drivers/clk/mediatek/clk-mt8192-msdc.c b/drivers/clk/mediatek/clk-mt8192-msdc.c
index a72e1b73fce8..971c7259857a 100644
--- a/drivers/clk/mediatek/clk-mt8192-msdc.c
+++ b/drivers/clk/mediatek/clk-mt8192-msdc.c
@@ -55,7 +55,7 @@ static const struct of_device_id of_match_clk_mt8192_msdc[] = {
 
 static struct platform_driver clk_mt8192_msdc_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt8192-msdc",
 		.of_match_table = of_match_clk_mt8192_msdc,
diff --git a/drivers/clk/mediatek/clk-mt8192-scp_adsp.c b/drivers/clk/mediatek/clk-mt8192-scp_adsp.c
index 18a8679108b8..60cb7f64f8b5 100644
--- a/drivers/clk/mediatek/clk-mt8192-scp_adsp.c
+++ b/drivers/clk/mediatek/clk-mt8192-scp_adsp.c
@@ -41,7 +41,7 @@ static const struct of_device_id of_match_clk_mt8192_scp_adsp[] = {
 
 static struct platform_driver clk_mt8192_scp_adsp_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt8192-scp_adsp",
 		.of_match_table = of_match_clk_mt8192_scp_adsp,
diff --git a/drivers/clk/mediatek/clk-mt8192-vdec.c b/drivers/clk/mediatek/clk-mt8192-vdec.c
index e149962dbbf9..5aaf31f24483 100644
--- a/drivers/clk/mediatek/clk-mt8192-vdec.c
+++ b/drivers/clk/mediatek/clk-mt8192-vdec.c
@@ -85,7 +85,7 @@ static const struct of_device_id of_match_clk_mt8192_vdec[] = {
 
 static struct platform_driver clk_mt8192_vdec_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt8192-vdec",
 		.of_match_table = of_match_clk_mt8192_vdec,
diff --git a/drivers/clk/mediatek/clk-mt8192-venc.c b/drivers/clk/mediatek/clk-mt8192-venc.c
index 80b8bb170996..be301abad23c 100644
--- a/drivers/clk/mediatek/clk-mt8192-venc.c
+++ b/drivers/clk/mediatek/clk-mt8192-venc.c
@@ -44,7 +44,7 @@ static const struct of_device_id of_match_clk_mt8192_venc[] = {
 
 static struct platform_driver clk_mt8192_venc_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt8192-venc",
 		.of_match_table = of_match_clk_mt8192_venc,
diff --git a/drivers/clk/mediatek/clk-mt8192.c b/drivers/clk/mediatek/clk-mt8192.c
index 61299960d28a..d370bcb69be0 100644
--- a/drivers/clk/mediatek/clk-mt8192.c
+++ b/drivers/clk/mediatek/clk-mt8192.c
@@ -1154,7 +1154,7 @@ static const struct of_device_id of_match_clk_mt8192_simple[] = {
 
 static struct platform_driver clk_mt8192_simple_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt8192-simple",
 		.of_match_table = of_match_clk_mt8192_simple,
diff --git a/drivers/clk/mediatek/clk-mt8195-cam.c b/drivers/clk/mediatek/clk-mt8195-cam.c
index e4d00fe6e757..a105e0ca6c12 100644
--- a/drivers/clk/mediatek/clk-mt8195-cam.c
+++ b/drivers/clk/mediatek/clk-mt8195-cam.c
@@ -134,7 +134,7 @@ static const struct of_device_id of_match_clk_mt8195_cam[] = {
 
 static struct platform_driver clk_mt8195_cam_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt8195-cam",
 		.of_match_table = of_match_clk_mt8195_cam,
diff --git a/drivers/clk/mediatek/clk-mt8195-ccu.c b/drivers/clk/mediatek/clk-mt8195-ccu.c
index 4e326b6301ba..b378e1d89bde 100644
--- a/drivers/clk/mediatek/clk-mt8195-ccu.c
+++ b/drivers/clk/mediatek/clk-mt8195-ccu.c
@@ -42,7 +42,7 @@ static const struct of_device_id of_match_clk_mt8195_ccu[] = {
 
 static struct platform_driver clk_mt8195_ccu_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt8195-ccu",
 		.of_match_table = of_match_clk_mt8195_ccu,
diff --git a/drivers/clk/mediatek/clk-mt8195-img.c b/drivers/clk/mediatek/clk-mt8195-img.c
index 12f5c436d075..f09719a4275b 100644
--- a/drivers/clk/mediatek/clk-mt8195-img.c
+++ b/drivers/clk/mediatek/clk-mt8195-img.c
@@ -88,7 +88,7 @@ static const struct of_device_id of_match_clk_mt8195_img[] = {
 
 static struct platform_driver clk_mt8195_img_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt8195-img",
 		.of_match_table = of_match_clk_mt8195_img,
diff --git a/drivers/clk/mediatek/clk-mt8195-imp_iic_wrap.c b/drivers/clk/mediatek/clk-mt8195-imp_iic_wrap.c
index fbc809d05072..e1f86d7d1495 100644
--- a/drivers/clk/mediatek/clk-mt8195-imp_iic_wrap.c
+++ b/drivers/clk/mediatek/clk-mt8195-imp_iic_wrap.c
@@ -58,7 +58,7 @@ static const struct of_device_id of_match_clk_mt8195_imp_iic_wrap[] = {
 
 static struct platform_driver clk_mt8195_imp_iic_wrap_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt8195-imp_iic_wrap",
 		.of_match_table = of_match_clk_mt8195_imp_iic_wrap,
diff --git a/drivers/clk/mediatek/clk-mt8195-infra_ao.c b/drivers/clk/mediatek/clk-mt8195-infra_ao.c
index fcd410461d3b..e62e8f5f446a 100644
--- a/drivers/clk/mediatek/clk-mt8195-infra_ao.c
+++ b/drivers/clk/mediatek/clk-mt8195-infra_ao.c
@@ -232,7 +232,7 @@ static const struct of_device_id of_match_clk_mt8195_infra_ao[] = {
 
 static struct platform_driver clk_mt8195_infra_ao_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt8195-infra_ao",
 		.of_match_table = of_match_clk_mt8195_infra_ao,
diff --git a/drivers/clk/mediatek/clk-mt8195-ipe.c b/drivers/clk/mediatek/clk-mt8195-ipe.c
index b0d745cf7752..13a81353438c 100644
--- a/drivers/clk/mediatek/clk-mt8195-ipe.c
+++ b/drivers/clk/mediatek/clk-mt8195-ipe.c
@@ -43,7 +43,7 @@ static const struct of_device_id of_match_clk_mt8195_ipe[] = {
 
 static struct platform_driver clk_mt8195_ipe_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt8195-ipe",
 		.of_match_table = of_match_clk_mt8195_ipe,
diff --git a/drivers/clk/mediatek/clk-mt8195-mfg.c b/drivers/clk/mediatek/clk-mt8195-mfg.c
index c94cb71bd9b9..4a696e86083a 100644
--- a/drivers/clk/mediatek/clk-mt8195-mfg.c
+++ b/drivers/clk/mediatek/clk-mt8195-mfg.c
@@ -41,7 +41,7 @@ static const struct of_device_id of_match_clk_mt8195_mfg[] = {
 
 static struct platform_driver clk_mt8195_mfg_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt8195-mfg",
 		.of_match_table = of_match_clk_mt8195_mfg,
diff --git a/drivers/clk/mediatek/clk-mt8195-peri_ao.c b/drivers/clk/mediatek/clk-mt8195-peri_ao.c
index 2f6b3bb657db..140d0fad8342 100644
--- a/drivers/clk/mediatek/clk-mt8195-peri_ao.c
+++ b/drivers/clk/mediatek/clk-mt8195-peri_ao.c
@@ -54,7 +54,7 @@ static const struct of_device_id of_match_clk_mt8195_peri_ao[] = {
 
 static struct platform_driver clk_mt8195_peri_ao_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt8195-peri_ao",
 		.of_match_table = of_match_clk_mt8195_peri_ao,
diff --git a/drivers/clk/mediatek/clk-mt8195-scp_adsp.c b/drivers/clk/mediatek/clk-mt8195-scp_adsp.c
index e16c383f631b..dfd9e159150a 100644
--- a/drivers/clk/mediatek/clk-mt8195-scp_adsp.c
+++ b/drivers/clk/mediatek/clk-mt8195-scp_adsp.c
@@ -39,7 +39,7 @@ static const struct of_device_id of_match_clk_mt8195_scp_adsp[] = {
 
 static struct platform_driver clk_mt8195_scp_adsp_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt8195-scp_adsp",
 		.of_match_table = of_match_clk_mt8195_scp_adsp,
diff --git a/drivers/clk/mediatek/clk-mt8195-vdec.c b/drivers/clk/mediatek/clk-mt8195-vdec.c
index a1446b666385..224c479f5cf9 100644
--- a/drivers/clk/mediatek/clk-mt8195-vdec.c
+++ b/drivers/clk/mediatek/clk-mt8195-vdec.c
@@ -96,7 +96,7 @@ static const struct of_device_id of_match_clk_mt8195_vdec[] = {
 
 static struct platform_driver clk_mt8195_vdec_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt8195-vdec",
 		.of_match_table = of_match_clk_mt8195_vdec,
diff --git a/drivers/clk/mediatek/clk-mt8195-venc.c b/drivers/clk/mediatek/clk-mt8195-venc.c
index 622f57804f96..d489e419ad87 100644
--- a/drivers/clk/mediatek/clk-mt8195-venc.c
+++ b/drivers/clk/mediatek/clk-mt8195-venc.c
@@ -61,7 +61,7 @@ static const struct of_device_id of_match_clk_mt8195_venc[] = {
 
 static struct platform_driver clk_mt8195_venc_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt8195-venc",
 		.of_match_table = of_match_clk_mt8195_venc,
diff --git a/drivers/clk/mediatek/clk-mt8195-wpe.c b/drivers/clk/mediatek/clk-mt8195-wpe.c
index b483fab10e18..ec4efe542566 100644
--- a/drivers/clk/mediatek/clk-mt8195-wpe.c
+++ b/drivers/clk/mediatek/clk-mt8195-wpe.c
@@ -135,7 +135,7 @@ static const struct of_device_id of_match_clk_mt8195_wpe[] = {
 
 static struct platform_driver clk_mt8195_wpe_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt8195-wpe",
 		.of_match_table = of_match_clk_mt8195_wpe,
diff --git a/drivers/clk/mediatek/clk-mt8365-apu.c b/drivers/clk/mediatek/clk-mt8365-apu.c
index 91ffe89d9721..dd785668c241 100644
--- a/drivers/clk/mediatek/clk-mt8365-apu.c
+++ b/drivers/clk/mediatek/clk-mt8365-apu.c
@@ -45,7 +45,7 @@ static const struct of_device_id of_match_clk_mt8365_apu[] = {
 
 static struct platform_driver clk_mt8365_apu_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt8365-apu",
 		.of_match_table = of_match_clk_mt8365_apu,
diff --git a/drivers/clk/mediatek/clk-mt8365-cam.c b/drivers/clk/mediatek/clk-mt8365-cam.c
index 31d5b5cd6de1..3757ef43bbf0 100644
--- a/drivers/clk/mediatek/clk-mt8365-cam.c
+++ b/drivers/clk/mediatek/clk-mt8365-cam.c
@@ -47,7 +47,7 @@ static const struct of_device_id of_match_clk_mt8365_cam[] = {
 
 static struct platform_driver clk_mt8365_cam_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt8365-cam",
 		.of_match_table = of_match_clk_mt8365_cam,
diff --git a/drivers/clk/mediatek/clk-mt8365-mfg.c b/drivers/clk/mediatek/clk-mt8365-mfg.c
index 587b49128b03..a63e289ddfa6 100644
--- a/drivers/clk/mediatek/clk-mt8365-mfg.c
+++ b/drivers/clk/mediatek/clk-mt8365-mfg.c
@@ -53,7 +53,7 @@ static const struct of_device_id of_match_clk_mt8365_mfg[] = {
 
 static struct platform_driver clk_mt8365_mfg_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt8365-mfg",
 		.of_match_table = of_match_clk_mt8365_mfg,
diff --git a/drivers/clk/mediatek/clk-mt8365-vdec.c b/drivers/clk/mediatek/clk-mt8365-vdec.c
index cdc678e8941c..780c4c6887c7 100644
--- a/drivers/clk/mediatek/clk-mt8365-vdec.c
+++ b/drivers/clk/mediatek/clk-mt8365-vdec.c
@@ -53,7 +53,7 @@ static const struct of_device_id of_match_clk_mt8365_vdec[] = {
 
 static struct platform_driver clk_mt8365_vdec_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt8365-vdec",
 		.of_match_table = of_match_clk_mt8365_vdec,
diff --git a/drivers/clk/mediatek/clk-mt8365-venc.c b/drivers/clk/mediatek/clk-mt8365-venc.c
index 0e080c22119d..5bc81f5468c1 100644
--- a/drivers/clk/mediatek/clk-mt8365-venc.c
+++ b/drivers/clk/mediatek/clk-mt8365-venc.c
@@ -42,7 +42,7 @@ static const struct of_device_id of_match_clk_mt8365_venc[] = {
 
 static struct platform_driver clk_mt8365_venc_drv = {
 	.probe = mtk_clk_simple_probe,
-	.remove = mtk_clk_simple_remove,
+	.remove_new = mtk_clk_simple_remove,
 	.driver = {
 		.name = "clk-mt8365-venc",
 		.of_match_table = of_match_clk_mt8365_venc,
diff --git a/drivers/clk/mediatek/clk-mtk.c b/drivers/clk/mediatek/clk-mtk.c
index 14e8b64a32a3..388bd0843930 100644
--- a/drivers/clk/mediatek/clk-mtk.c
+++ b/drivers/clk/mediatek/clk-mtk.c
@@ -584,7 +584,7 @@ int mtk_clk_simple_probe(struct platform_device *pdev)
 }
 EXPORT_SYMBOL_GPL(mtk_clk_simple_probe);
 
-int mtk_clk_simple_remove(struct platform_device *pdev)
+void mtk_clk_simple_remove(struct platform_device *pdev)
 {
 	const struct mtk_clk_desc *mcd = of_device_get_match_data(&pdev->dev);
 	struct clk_hw_onecell_data *clk_data = platform_get_drvdata(pdev);
@@ -606,8 +606,6 @@ int mtk_clk_simple_remove(struct platform_device *pdev)
 		mtk_clk_unregister_fixed_clks(mcd->fixed_clks,
 					      mcd->num_fixed_clks, clk_data);
 	mtk_free_clk_data(clk_data);
-
-	return 0;
 }
 EXPORT_SYMBOL_GPL(mtk_clk_simple_remove);
 
diff --git a/drivers/clk/mediatek/clk-mtk.h b/drivers/clk/mediatek/clk-mtk.h
index 41f4fa3b0c21..3c14dc1030e1 100644
--- a/drivers/clk/mediatek/clk-mtk.h
+++ b/drivers/clk/mediatek/clk-mtk.h
@@ -237,6 +237,6 @@ struct mtk_clk_desc {
 };
 
 int mtk_clk_simple_probe(struct platform_device *pdev);
-int mtk_clk_simple_remove(struct platform_device *pdev);
+void mtk_clk_simple_remove(struct platform_device *pdev);
 
 #endif /* __DRV_CLK_MTK_H */
-- 
2.39.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] 29+ messages in thread

* [PATCH 03/30] clk: xilinx: Drop if block with always false condition
  2023-03-12 16:14 [PATCH 00/30] clk: Convert to platform remove callback returning void Uwe Kleine-König
  2023-03-12 16:14 ` [PATCH 01/30] clk: mediatek: Make mtk_clk_simple_remove() return void Uwe Kleine-König
@ 2023-03-12 16:14 ` Uwe Kleine-König
  2023-03-29  2:35   ` Stephen Boyd
  2023-03-12 16:14 ` [PATCH 05/30] clk: bcm: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (9 subsequent siblings)
  11 siblings, 1 reply; 29+ messages in thread
From: Uwe Kleine-König @ 2023-03-12 16:14 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd, Michal Simek
  Cc: linux-clk, linux-arm-kernel, linux-kernel

xvcu_remove() is only called for a device after after xvcu_probe()
completed successfully. In that case dev_set_drvdata() was called for
that device with a non-NULL parameter, so platform_get_drvdata() won't
return NULL and the if condition is never true.

Drop the if, preparing a conversion to make platform driver's remove
callback return void.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/clk/xilinx/xlnx_vcu.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/clk/xilinx/xlnx_vcu.c b/drivers/clk/xilinx/xlnx_vcu.c
index d66b1315114e..54b44debfd3e 100644
--- a/drivers/clk/xilinx/xlnx_vcu.c
+++ b/drivers/clk/xilinx/xlnx_vcu.c
@@ -707,8 +707,6 @@ static int xvcu_remove(struct platform_device *pdev)
 	struct xvcu_device *xvcu;
 
 	xvcu = platform_get_drvdata(pdev);
-	if (!xvcu)
-		return -ENODEV;
 
 	xvcu_unregister_clock_provider(xvcu);
 
-- 
2.39.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] 29+ messages in thread

* [PATCH 05/30] clk: bcm: Convert to platform remove callback returning void
  2023-03-12 16:14 [PATCH 00/30] clk: Convert to platform remove callback returning void Uwe Kleine-König
  2023-03-12 16:14 ` [PATCH 01/30] clk: mediatek: Make mtk_clk_simple_remove() return void Uwe Kleine-König
  2023-03-12 16:14 ` [PATCH 03/30] clk: xilinx: Drop if block with always false condition Uwe Kleine-König
@ 2023-03-12 16:14 ` Uwe Kleine-König
  2023-03-14 21:28   ` Florian Fainelli
  2023-03-29  2:35   ` Stephen Boyd
  2023-03-12 16:14 ` [PATCH 15/30] clk: scpi: " Uwe Kleine-König
                   ` (8 subsequent siblings)
  11 siblings, 2 replies; 29+ messages in thread
From: Uwe Kleine-König @ 2023-03-12 16:14 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd, Florian Fainelli
  Cc: Broadcom internal kernel review list, linux-clk, linux-rpi-kernel,
	linux-arm-kernel, linux-kernel

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

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

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/clk/bcm/clk-bcm2711-dvp.c  | 6 ++----
 drivers/clk/bcm/clk-bcm63xx-gate.c | 6 ++----
 drivers/clk/bcm/clk-raspberrypi.c  | 6 ++----
 3 files changed, 6 insertions(+), 12 deletions(-)

diff --git a/drivers/clk/bcm/clk-bcm2711-dvp.c b/drivers/clk/bcm/clk-bcm2711-dvp.c
index e63a42618ac2..e4fbbf3c40fe 100644
--- a/drivers/clk/bcm/clk-bcm2711-dvp.c
+++ b/drivers/clk/bcm/clk-bcm2711-dvp.c
@@ -92,15 +92,13 @@ static int clk_dvp_probe(struct platform_device *pdev)
 	return ret;
 };
 
-static int clk_dvp_remove(struct platform_device *pdev)
+static void clk_dvp_remove(struct platform_device *pdev)
 {
 	struct clk_dvp *dvp = platform_get_drvdata(pdev);
 	struct clk_hw_onecell_data *data = dvp->data;
 
 	clk_hw_unregister_gate(data->hws[1]);
 	clk_hw_unregister_gate(data->hws[0]);
-
-	return 0;
 }
 
 static const struct of_device_id clk_dvp_dt_ids[] = {
@@ -111,7 +109,7 @@ MODULE_DEVICE_TABLE(of, clk_dvp_dt_ids);
 
 static struct platform_driver clk_dvp_driver = {
 	.probe	= clk_dvp_probe,
-	.remove	= clk_dvp_remove,
+	.remove_new = clk_dvp_remove,
 	.driver	= {
 		.name		= "brcm2711-dvp",
 		.of_match_table	= clk_dvp_dt_ids,
diff --git a/drivers/clk/bcm/clk-bcm63xx-gate.c b/drivers/clk/bcm/clk-bcm63xx-gate.c
index 89297c57881e..0769f98767da 100644
--- a/drivers/clk/bcm/clk-bcm63xx-gate.c
+++ b/drivers/clk/bcm/clk-bcm63xx-gate.c
@@ -541,7 +541,7 @@ static int clk_bcm63xx_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int clk_bcm63xx_remove(struct platform_device *pdev)
+static void clk_bcm63xx_remove(struct platform_device *pdev)
 {
 	struct clk_bcm63xx_hw *hw = platform_get_drvdata(pdev);
 	int i;
@@ -552,8 +552,6 @@ static int clk_bcm63xx_remove(struct platform_device *pdev)
 		if (!IS_ERR(hw->data.hws[i]))
 			clk_hw_unregister_gate(hw->data.hws[i]);
 	}
-
-	return 0;
 }
 
 static const struct of_device_id clk_bcm63xx_dt_ids[] = {
@@ -570,7 +568,7 @@ static const struct of_device_id clk_bcm63xx_dt_ids[] = {
 
 static struct platform_driver clk_bcm63xx = {
 	.probe = clk_bcm63xx_probe,
-	.remove = clk_bcm63xx_remove,
+	.remove_new = clk_bcm63xx_remove,
 	.driver = {
 		.name = "bcm63xx-clock",
 		.of_match_table = clk_bcm63xx_dt_ids,
diff --git a/drivers/clk/bcm/clk-raspberrypi.c b/drivers/clk/bcm/clk-raspberrypi.c
index ce2f93479736..eb399a4d141b 100644
--- a/drivers/clk/bcm/clk-raspberrypi.c
+++ b/drivers/clk/bcm/clk-raspberrypi.c
@@ -439,13 +439,11 @@ static int raspberrypi_clk_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int raspberrypi_clk_remove(struct platform_device *pdev)
+static void raspberrypi_clk_remove(struct platform_device *pdev)
 {
 	struct raspberrypi_clk *rpi = platform_get_drvdata(pdev);
 
 	platform_device_unregister(rpi->cpufreq);
-
-	return 0;
 }
 
 static const struct of_device_id raspberrypi_clk_match[] = {
@@ -460,7 +458,7 @@ static struct platform_driver raspberrypi_clk_driver = {
 		.of_match_table = raspberrypi_clk_match,
 	},
 	.probe          = raspberrypi_clk_probe,
-	.remove		= raspberrypi_clk_remove,
+	.remove_new	= raspberrypi_clk_remove,
 };
 module_platform_driver(raspberrypi_clk_driver);
 
-- 
2.39.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] 29+ messages in thread

* [PATCH 15/30] clk: scpi: Convert to platform remove callback returning void
  2023-03-12 16:14 [PATCH 00/30] clk: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (2 preceding siblings ...)
  2023-03-12 16:14 ` [PATCH 05/30] clk: bcm: Convert to platform remove callback returning void Uwe Kleine-König
@ 2023-03-12 16:14 ` Uwe Kleine-König
  2023-03-16 15:01   ` Sudeep Holla
  2023-03-29  2:38   ` Stephen Boyd
  2023-03-12 16:14 ` [PATCH 16/30] clk: stm32mp1: " Uwe Kleine-König
                   ` (7 subsequent siblings)
  11 siblings, 2 replies; 29+ messages in thread
From: Uwe Kleine-König @ 2023-03-12 16:14 UTC (permalink / raw)
  To: Sudeep Holla, Michael Turquette, Stephen Boyd
  Cc: Cristian Marussi, linux-arm-kernel, linux-clk, linux-kernel

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

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

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

diff --git a/drivers/clk/clk-scpi.c b/drivers/clk/clk-scpi.c
index a39af7616b13..3fb4003453ee 100644
--- a/drivers/clk/clk-scpi.c
+++ b/drivers/clk/clk-scpi.c
@@ -246,7 +246,7 @@ static int scpi_clk_add(struct device *dev, struct device_node *np,
 	return of_clk_add_hw_provider(np, scpi_of_clk_src_get, clk_data);
 }
 
-static int scpi_clocks_remove(struct platform_device *pdev)
+static void scpi_clocks_remove(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
 	struct device_node *child, *np = dev->of_node;
@@ -258,7 +258,6 @@ static int scpi_clocks_remove(struct platform_device *pdev)
 
 	for_each_available_child_of_node(np, child)
 		of_clk_del_provider(np);
-	return 0;
 }
 
 static int scpi_clocks_probe(struct platform_device *pdev)
@@ -305,7 +304,7 @@ static struct platform_driver scpi_clocks_driver = {
 		.of_match_table = scpi_clocks_ids,
 	},
 	.probe = scpi_clocks_probe,
-	.remove = scpi_clocks_remove,
+	.remove_new = scpi_clocks_remove,
 };
 module_platform_driver(scpi_clocks_driver);
 
-- 
2.39.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] 29+ messages in thread

* [PATCH 16/30] clk: stm32mp1: Convert to platform remove callback returning void
  2023-03-12 16:14 [PATCH 00/30] clk: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (3 preceding siblings ...)
  2023-03-12 16:14 ` [PATCH 15/30] clk: scpi: " Uwe Kleine-König
@ 2023-03-12 16:14 ` Uwe Kleine-König
  2023-03-29  2:38   ` Stephen Boyd
  2023-03-12 16:15 ` [PATCH 18/30] clk: keystone: " Uwe Kleine-König
                   ` (6 subsequent siblings)
  11 siblings, 1 reply; 29+ messages in thread
From: Uwe Kleine-König @ 2023-03-12 16:14 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd, Maxime Coquelin,
	Alexandre Torgue
  Cc: linux-clk, linux-stm32, linux-arm-kernel, linux-kernel

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

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

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

diff --git a/drivers/clk/clk-stm32mp1.c b/drivers/clk/clk-stm32mp1.c
index 01e5a466897f..939779f66867 100644
--- a/drivers/clk/clk-stm32mp1.c
+++ b/drivers/clk/clk-stm32mp1.c
@@ -2434,15 +2434,13 @@ static int stm32mp1_rcc_clocks_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int stm32mp1_rcc_clocks_remove(struct platform_device *pdev)
+static void stm32mp1_rcc_clocks_remove(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
 	struct device_node *child, *np = dev_of_node(dev);
 
 	for_each_available_child_of_node(np, child)
 		of_clk_del_provider(child);
-
-	return 0;
 }
 
 static struct platform_driver stm32mp1_rcc_clocks_driver = {
@@ -2451,7 +2449,7 @@ static struct platform_driver stm32mp1_rcc_clocks_driver = {
 		.of_match_table = stm32mp1_match_data,
 	},
 	.probe = stm32mp1_rcc_clocks_probe,
-	.remove = stm32mp1_rcc_clocks_remove,
+	.remove_new = stm32mp1_rcc_clocks_remove,
 };
 
 static int __init stm32mp1_clocks_init(void)
-- 
2.39.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] 29+ messages in thread

* [PATCH 18/30] clk: keystone: Convert to platform remove callback returning void
  2023-03-12 16:14 [PATCH 00/30] clk: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (4 preceding siblings ...)
  2023-03-12 16:14 ` [PATCH 16/30] clk: stm32mp1: " Uwe Kleine-König
@ 2023-03-12 16:15 ` Uwe Kleine-König
  2023-03-29  2:39   ` Stephen Boyd
  2023-03-12 16:15 ` [PATCH 19/30] clk: mediatek: " Uwe Kleine-König
                   ` (5 subsequent siblings)
  11 siblings, 1 reply; 29+ messages in thread
From: Uwe Kleine-König @ 2023-03-12 16:15 UTC (permalink / raw)
  To: Nishanth Menon, Tero Kristo, Santosh Shilimkar, Michael Turquette,
	Stephen Boyd
  Cc: linux-arm-kernel, linux-kernel, linux-clk

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

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

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

diff --git a/drivers/clk/keystone/sci-clk.c b/drivers/clk/keystone/sci-clk.c
index d4b4e74e22da..910ecd58c4ca 100644
--- a/drivers/clk/keystone/sci-clk.c
+++ b/drivers/clk/keystone/sci-clk.c
@@ -689,16 +689,14 @@ static int ti_sci_clk_probe(struct platform_device *pdev)
  * via common clock framework. Any memory allocated for the device will
  * be free'd silently via the devm framework. Returns 0 always.
  */
-static int ti_sci_clk_remove(struct platform_device *pdev)
+static void ti_sci_clk_remove(struct platform_device *pdev)
 {
 	of_clk_del_provider(pdev->dev.of_node);
-
-	return 0;
 }
 
 static struct platform_driver ti_sci_clk_driver = {
 	.probe = ti_sci_clk_probe,
-	.remove = ti_sci_clk_remove,
+	.remove_new = ti_sci_clk_remove,
 	.driver = {
 		.name = "ti-sci-clk",
 		.of_match_table = of_match_ptr(ti_sci_clk_of_match),
-- 
2.39.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] 29+ messages in thread

* [PATCH 19/30] clk: mediatek: Convert to platform remove callback returning void
  2023-03-12 16:14 [PATCH 00/30] clk: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (5 preceding siblings ...)
  2023-03-12 16:15 ` [PATCH 18/30] clk: keystone: " Uwe Kleine-König
@ 2023-03-12 16:15 ` Uwe Kleine-König
  2023-03-29  2:39   ` Stephen Boyd
  2023-03-12 16:15 ` [PATCH 24/30] clk: samsung: " Uwe Kleine-König
                   ` (4 subsequent siblings)
  11 siblings, 1 reply; 29+ messages in thread
From: Uwe Kleine-König @ 2023-03-12 16:15 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd, Matthias Brugger
  Cc: AngeloGioacchino Del Regno, linux-clk, linux-kernel,
	linux-arm-kernel, linux-mediatek

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

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

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/clk/mediatek/clk-mt6795-apmixedsys.c | 6 ++----
 drivers/clk/mediatek/clk-mt6795-infracfg.c   | 6 ++----
 drivers/clk/mediatek/clk-mt6795-mm.c         | 6 ++----
 drivers/clk/mediatek/clk-mt6795-pericfg.c    | 6 ++----
 drivers/clk/mediatek/clk-mt8173-apmixedsys.c | 6 ++----
 drivers/clk/mediatek/clk-mt8173-infracfg.c   | 6 ++----
 drivers/clk/mediatek/clk-mt8173-mm.c         | 6 ++----
 drivers/clk/mediatek/clk-mt8186-apmixedsys.c | 6 ++----
 drivers/clk/mediatek/clk-mt8186-mcu.c        | 6 ++----
 drivers/clk/mediatek/clk-mt8186-mm.c         | 6 ++----
 drivers/clk/mediatek/clk-mt8195-apmixedsys.c | 6 ++----
 drivers/clk/mediatek/clk-mt8195-apusys_pll.c | 6 ++----
 drivers/clk/mediatek/clk-mt8195-topckgen.c   | 6 ++----
 drivers/clk/mediatek/clk-mt8195-vdo0.c       | 6 ++----
 drivers/clk/mediatek/clk-mt8195-vdo1.c       | 6 ++----
 drivers/clk/mediatek/clk-mt8195-vpp0.c       | 6 ++----
 drivers/clk/mediatek/clk-mt8195-vpp1.c       | 6 ++----
 17 files changed, 34 insertions(+), 68 deletions(-)

diff --git a/drivers/clk/mediatek/clk-mt6795-apmixedsys.c b/drivers/clk/mediatek/clk-mt6795-apmixedsys.c
index 59761c72d3bc..d71784f82d85 100644
--- a/drivers/clk/mediatek/clk-mt6795-apmixedsys.c
+++ b/drivers/clk/mediatek/clk-mt6795-apmixedsys.c
@@ -130,7 +130,7 @@ static int clk_mt6795_apmixed_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int clk_mt6795_apmixed_remove(struct platform_device *pdev)
+static void clk_mt6795_apmixed_remove(struct platform_device *pdev)
 {
 	struct device_node *node = pdev->dev.of_node;
 	struct clk_hw_onecell_data *clk_data = platform_get_drvdata(pdev);
@@ -139,13 +139,11 @@ static int clk_mt6795_apmixed_remove(struct platform_device *pdev)
 	mtk_clk_unregister_ref2usb_tx(clk_data->hws[CLK_APMIXED_REF2USB_TX]);
 	mtk_clk_unregister_plls(plls, ARRAY_SIZE(plls), clk_data);
 	mtk_free_clk_data(clk_data);
-
-	return 0;
 }
 
 static struct platform_driver clk_mt6795_apmixed_drv = {
 	.probe = clk_mt6795_apmixed_probe,
-	.remove = clk_mt6795_apmixed_remove,
+	.remove_new = clk_mt6795_apmixed_remove,
 	.driver = {
 		.name = "clk-mt6795-apmixed",
 		.of_match_table = of_match_clk_mt6795_apmixed,
diff --git a/drivers/clk/mediatek/clk-mt6795-infracfg.c b/drivers/clk/mediatek/clk-mt6795-infracfg.c
index 23d9fc057e61..e74902d51db7 100644
--- a/drivers/clk/mediatek/clk-mt6795-infracfg.c
+++ b/drivers/clk/mediatek/clk-mt6795-infracfg.c
@@ -126,7 +126,7 @@ static int clk_mt6795_infracfg_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int clk_mt6795_infracfg_remove(struct platform_device *pdev)
+static void clk_mt6795_infracfg_remove(struct platform_device *pdev)
 {
 	struct device_node *node = pdev->dev.of_node;
 	struct clk_hw_onecell_data *clk_data = platform_get_drvdata(pdev);
@@ -135,8 +135,6 @@ static int clk_mt6795_infracfg_remove(struct platform_device *pdev)
 	mtk_clk_unregister_cpumuxes(cpu_muxes, ARRAY_SIZE(cpu_muxes), clk_data);
 	mtk_clk_unregister_gates(infra_gates, ARRAY_SIZE(infra_gates), clk_data);
 	mtk_free_clk_data(clk_data);
-
-	return 0;
 }
 
 static struct platform_driver clk_mt6795_infracfg_drv = {
@@ -145,7 +143,7 @@ static struct platform_driver clk_mt6795_infracfg_drv = {
 		.of_match_table = of_match_clk_mt6795_infracfg,
 	},
 	.probe = clk_mt6795_infracfg_probe,
-	.remove = clk_mt6795_infracfg_remove,
+	.remove_new = clk_mt6795_infracfg_remove,
 };
 module_platform_driver(clk_mt6795_infracfg_drv);
 
diff --git a/drivers/clk/mediatek/clk-mt6795-mm.c b/drivers/clk/mediatek/clk-mt6795-mm.c
index eebb6143ada2..426f9897877d 100644
--- a/drivers/clk/mediatek/clk-mt6795-mm.c
+++ b/drivers/clk/mediatek/clk-mt6795-mm.c
@@ -107,7 +107,7 @@ static int clk_mt6795_mm_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int clk_mt6795_mm_remove(struct platform_device *pdev)
+static void clk_mt6795_mm_remove(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
 	struct device_node *node = dev->parent->of_node;
@@ -116,8 +116,6 @@ static int clk_mt6795_mm_remove(struct platform_device *pdev)
 	of_clk_del_provider(node);
 	mtk_clk_unregister_gates(mm_gates, ARRAY_SIZE(mm_gates), clk_data);
 	mtk_free_clk_data(clk_data);
-
-	return 0;
 }
 
 static struct platform_driver clk_mt6795_mm_drv = {
@@ -125,7 +123,7 @@ static struct platform_driver clk_mt6795_mm_drv = {
 		.name = "clk-mt6795-mm",
 	},
 	.probe = clk_mt6795_mm_probe,
-	.remove = clk_mt6795_mm_remove,
+	.remove_new = clk_mt6795_mm_remove,
 };
 module_platform_driver(clk_mt6795_mm_drv);
 
diff --git a/drivers/clk/mediatek/clk-mt6795-pericfg.c b/drivers/clk/mediatek/clk-mt6795-pericfg.c
index 08aaa9b09c36..9e30d8d186a2 100644
--- a/drivers/clk/mediatek/clk-mt6795-pericfg.c
+++ b/drivers/clk/mediatek/clk-mt6795-pericfg.c
@@ -135,7 +135,7 @@ static int clk_mt6795_pericfg_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int clk_mt6795_pericfg_remove(struct platform_device *pdev)
+static void clk_mt6795_pericfg_remove(struct platform_device *pdev)
 {
 	struct device_node *node = pdev->dev.of_node;
 	struct clk_hw_onecell_data *clk_data = platform_get_drvdata(pdev);
@@ -144,8 +144,6 @@ static int clk_mt6795_pericfg_remove(struct platform_device *pdev)
 	mtk_clk_unregister_composites(peri_clks, ARRAY_SIZE(peri_clks), clk_data);
 	mtk_clk_unregister_gates(peri_gates, ARRAY_SIZE(peri_gates), clk_data);
 	mtk_free_clk_data(clk_data);
-
-	return 0;
 }
 
 static struct platform_driver clk_mt6795_pericfg_drv = {
@@ -154,7 +152,7 @@ static struct platform_driver clk_mt6795_pericfg_drv = {
 		.of_match_table = of_match_clk_mt6795_pericfg,
 	},
 	.probe = clk_mt6795_pericfg_probe,
-	.remove = clk_mt6795_pericfg_remove,
+	.remove_new = clk_mt6795_pericfg_remove,
 };
 module_platform_driver(clk_mt6795_pericfg_drv);
 
diff --git a/drivers/clk/mediatek/clk-mt8173-apmixedsys.c b/drivers/clk/mediatek/clk-mt8173-apmixedsys.c
index a56c5845d07a..b7ca15949fd1 100644
--- a/drivers/clk/mediatek/clk-mt8173-apmixedsys.c
+++ b/drivers/clk/mediatek/clk-mt8173-apmixedsys.c
@@ -130,7 +130,7 @@ static int clk_mt8173_apmixed_probe(struct platform_device *pdev)
 	return r;
 }
 
-static int clk_mt8173_apmixed_remove(struct platform_device *pdev)
+static void clk_mt8173_apmixed_remove(struct platform_device *pdev)
 {
 	struct device_node *node = pdev->dev.of_node;
 	struct clk_hw_onecell_data *clk_data = platform_get_drvdata(pdev);
@@ -139,13 +139,11 @@ static int clk_mt8173_apmixed_remove(struct platform_device *pdev)
 	mtk_clk_unregister_ref2usb_tx(clk_data->hws[CLK_APMIXED_REF2USB_TX]);
 	mtk_clk_unregister_plls(plls, ARRAY_SIZE(plls), clk_data);
 	mtk_free_clk_data(clk_data);
-
-	return 0;
 }
 
 static struct platform_driver clk_mt8173_apmixed_drv = {
 	.probe = clk_mt8173_apmixed_probe,
-	.remove = clk_mt8173_apmixed_remove,
+	.remove_new = clk_mt8173_apmixed_remove,
 	.driver = {
 		.name = "clk-mt8173-apmixed",
 		.of_match_table = of_match_clk_mt8173_apmixed,
diff --git a/drivers/clk/mediatek/clk-mt8173-infracfg.c b/drivers/clk/mediatek/clk-mt8173-infracfg.c
index 729b3c408c7b..c71c0e5c607d 100644
--- a/drivers/clk/mediatek/clk-mt8173-infracfg.c
+++ b/drivers/clk/mediatek/clk-mt8173-infracfg.c
@@ -128,7 +128,7 @@ static int clk_mt8173_infracfg_probe(struct platform_device *pdev)
 	return r;
 }
 
-static int clk_mt8173_infracfg_remove(struct platform_device *pdev)
+static void clk_mt8173_infracfg_remove(struct platform_device *pdev)
 {
 	struct device_node *node = pdev->dev.of_node;
 	struct clk_hw_onecell_data *clk_data = platform_get_drvdata(pdev);
@@ -137,8 +137,6 @@ static int clk_mt8173_infracfg_remove(struct platform_device *pdev)
 	mtk_clk_unregister_cpumuxes(cpu_muxes, ARRAY_SIZE(cpu_muxes), clk_data);
 	mtk_clk_unregister_gates(infra_gates, ARRAY_SIZE(infra_gates), clk_data);
 	mtk_free_clk_data(clk_data);
-
-	return 0;
 }
 
 static struct platform_driver clk_mt8173_infracfg_drv = {
@@ -147,7 +145,7 @@ static struct platform_driver clk_mt8173_infracfg_drv = {
 		.of_match_table = of_match_clk_mt8173_infracfg,
 	},
 	.probe = clk_mt8173_infracfg_probe,
-	.remove = clk_mt8173_infracfg_remove,
+	.remove_new = clk_mt8173_infracfg_remove,
 };
 module_platform_driver(clk_mt8173_infracfg_drv);
 
diff --git a/drivers/clk/mediatek/clk-mt8173-mm.c b/drivers/clk/mediatek/clk-mt8173-mm.c
index 315430ad1581..a941b4c688a5 100644
--- a/drivers/clk/mediatek/clk-mt8173-mm.c
+++ b/drivers/clk/mediatek/clk-mt8173-mm.c
@@ -136,7 +136,7 @@ static int clk_mt8173_mm_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int clk_mt8173_mm_remove(struct platform_device *pdev)
+static void clk_mt8173_mm_remove(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
 	struct device_node *node = dev->parent->of_node;
@@ -146,8 +146,6 @@ static int clk_mt8173_mm_remove(struct platform_device *pdev)
 	of_clk_del_provider(node);
 	mtk_clk_unregister_gates(data->gates_clk, data->gates_num, clk_data);
 	mtk_free_clk_data(clk_data);
-
-	return 0;
 }
 
 static struct platform_driver clk_mt8173_mm_drv = {
@@ -155,7 +153,7 @@ static struct platform_driver clk_mt8173_mm_drv = {
 		.name = "clk-mt8173-mm",
 	},
 	.probe = clk_mt8173_mm_probe,
-	.remove = clk_mt8173_mm_remove,
+	.remove_new = clk_mt8173_mm_remove,
 };
 
 builtin_platform_driver(clk_mt8173_mm_drv);
diff --git a/drivers/clk/mediatek/clk-mt8186-apmixedsys.c b/drivers/clk/mediatek/clk-mt8186-apmixedsys.c
index 1d673c6278a9..392ffc1acb05 100644
--- a/drivers/clk/mediatek/clk-mt8186-apmixedsys.c
+++ b/drivers/clk/mediatek/clk-mt8186-apmixedsys.c
@@ -169,7 +169,7 @@ static int clk_mt8186_apmixed_probe(struct platform_device *pdev)
 	return r;
 }
 
-static int clk_mt8186_apmixed_remove(struct platform_device *pdev)
+static void clk_mt8186_apmixed_remove(struct platform_device *pdev)
 {
 	struct device_node *node = pdev->dev.of_node;
 	struct clk_hw_onecell_data *clk_data = platform_get_drvdata(pdev);
@@ -178,13 +178,11 @@ static int clk_mt8186_apmixed_remove(struct platform_device *pdev)
 	mtk_clk_unregister_pllfhs(plls, ARRAY_SIZE(plls), pllfhs,
 				  ARRAY_SIZE(pllfhs), clk_data);
 	mtk_free_clk_data(clk_data);
-
-	return 0;
 }
 
 static struct platform_driver clk_mt8186_apmixed_drv = {
 	.probe = clk_mt8186_apmixed_probe,
-	.remove = clk_mt8186_apmixed_remove,
+	.remove_new = clk_mt8186_apmixed_remove,
 	.driver = {
 		.name = "clk-mt8186-apmixed",
 		.of_match_table = of_match_clk_mt8186_apmixed,
diff --git a/drivers/clk/mediatek/clk-mt8186-mcu.c b/drivers/clk/mediatek/clk-mt8186-mcu.c
index e52a2d986c99..e36519996873 100644
--- a/drivers/clk/mediatek/clk-mt8186-mcu.c
+++ b/drivers/clk/mediatek/clk-mt8186-mcu.c
@@ -86,7 +86,7 @@ static int clk_mt8186_mcu_probe(struct platform_device *pdev)
 	return r;
 }
 
-static int clk_mt8186_mcu_remove(struct platform_device *pdev)
+static void clk_mt8186_mcu_remove(struct platform_device *pdev)
 {
 	struct clk_hw_onecell_data *clk_data = platform_get_drvdata(pdev);
 	struct device_node *node = pdev->dev.of_node;
@@ -94,13 +94,11 @@ static int clk_mt8186_mcu_remove(struct platform_device *pdev)
 	of_clk_del_provider(node);
 	mtk_clk_unregister_composites(mcu_muxes, ARRAY_SIZE(mcu_muxes), clk_data);
 	mtk_free_clk_data(clk_data);
-
-	return 0;
 }
 
 static struct platform_driver clk_mt8186_mcu_drv = {
 	.probe = clk_mt8186_mcu_probe,
-	.remove = clk_mt8186_mcu_remove,
+	.remove_new = clk_mt8186_mcu_remove,
 	.driver = {
 		.name = "clk-mt8186-mcu",
 		.of_match_table = of_match_clk_mt8186_mcu,
diff --git a/drivers/clk/mediatek/clk-mt8186-mm.c b/drivers/clk/mediatek/clk-mt8186-mm.c
index 0b72607777fa..bd54f13939a9 100644
--- a/drivers/clk/mediatek/clk-mt8186-mm.c
+++ b/drivers/clk/mediatek/clk-mt8186-mm.c
@@ -89,7 +89,7 @@ static int clk_mt8186_mm_probe(struct platform_device *pdev)
 	return r;
 }
 
-static int clk_mt8186_mm_remove(struct platform_device *pdev)
+static void clk_mt8186_mm_remove(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
 	struct device_node *node = dev->parent->of_node;
@@ -98,13 +98,11 @@ static int clk_mt8186_mm_remove(struct platform_device *pdev)
 	of_clk_del_provider(node);
 	mtk_clk_unregister_gates(mm_clks, ARRAY_SIZE(mm_clks), clk_data);
 	mtk_free_clk_data(clk_data);
-
-	return 0;
 }
 
 static struct platform_driver clk_mt8186_mm_drv = {
 	.probe = clk_mt8186_mm_probe,
-	.remove = clk_mt8186_mm_remove,
+	.remove_new = clk_mt8186_mm_remove,
 	.driver = {
 		.name = "clk-mt8186-mm",
 	},
diff --git a/drivers/clk/mediatek/clk-mt8195-apmixedsys.c b/drivers/clk/mediatek/clk-mt8195-apmixedsys.c
index 1bc917f2667e..232781c70df2 100644
--- a/drivers/clk/mediatek/clk-mt8195-apmixedsys.c
+++ b/drivers/clk/mediatek/clk-mt8195-apmixedsys.c
@@ -146,7 +146,7 @@ static int clk_mt8195_apmixed_probe(struct platform_device *pdev)
 	return r;
 }
 
-static int clk_mt8195_apmixed_remove(struct platform_device *pdev)
+static void clk_mt8195_apmixed_remove(struct platform_device *pdev)
 {
 	struct device_node *node = pdev->dev.of_node;
 	struct clk_hw_onecell_data *clk_data = platform_get_drvdata(pdev);
@@ -155,13 +155,11 @@ static int clk_mt8195_apmixed_remove(struct platform_device *pdev)
 	mtk_clk_unregister_gates(apmixed_clks, ARRAY_SIZE(apmixed_clks), clk_data);
 	mtk_clk_unregister_plls(plls, ARRAY_SIZE(plls), clk_data);
 	mtk_free_clk_data(clk_data);
-
-	return 0;
 }
 
 static struct platform_driver clk_mt8195_apmixed_drv = {
 	.probe = clk_mt8195_apmixed_probe,
-	.remove = clk_mt8195_apmixed_remove,
+	.remove_new = clk_mt8195_apmixed_remove,
 	.driver = {
 		.name = "clk-mt8195-apmixed",
 		.of_match_table = of_match_clk_mt8195_apmixed,
diff --git a/drivers/clk/mediatek/clk-mt8195-apusys_pll.c b/drivers/clk/mediatek/clk-mt8195-apusys_pll.c
index 0b52f6a009c4..d8ba3c5a5942 100644
--- a/drivers/clk/mediatek/clk-mt8195-apusys_pll.c
+++ b/drivers/clk/mediatek/clk-mt8195-apusys_pll.c
@@ -85,7 +85,7 @@ static int clk_mt8195_apusys_pll_probe(struct platform_device *pdev)
 	return r;
 }
 
-static int clk_mt8195_apusys_pll_remove(struct platform_device *pdev)
+static void clk_mt8195_apusys_pll_remove(struct platform_device *pdev)
 {
 	struct clk_hw_onecell_data *clk_data = platform_get_drvdata(pdev);
 	struct device_node *node = pdev->dev.of_node;
@@ -93,8 +93,6 @@ static int clk_mt8195_apusys_pll_remove(struct platform_device *pdev)
 	of_clk_del_provider(node);
 	mtk_clk_unregister_plls(apusys_plls, ARRAY_SIZE(apusys_plls), clk_data);
 	mtk_free_clk_data(clk_data);
-
-	return 0;
 }
 
 static const struct of_device_id of_match_clk_mt8195_apusys_pll[] = {
@@ -104,7 +102,7 @@ static const struct of_device_id of_match_clk_mt8195_apusys_pll[] = {
 
 static struct platform_driver clk_mt8195_apusys_pll_drv = {
 	.probe = clk_mt8195_apusys_pll_probe,
-	.remove = clk_mt8195_apusys_pll_remove,
+	.remove_new = clk_mt8195_apusys_pll_remove,
 	.driver = {
 		.name = "clk-mt8195-apusys_pll",
 		.of_match_table = of_match_clk_mt8195_apusys_pll,
diff --git a/drivers/clk/mediatek/clk-mt8195-topckgen.c b/drivers/clk/mediatek/clk-mt8195-topckgen.c
index cf520f85de73..c970cdd13c0b 100644
--- a/drivers/clk/mediatek/clk-mt8195-topckgen.c
+++ b/drivers/clk/mediatek/clk-mt8195-topckgen.c
@@ -1316,7 +1316,7 @@ static int clk_mt8195_topck_probe(struct platform_device *pdev)
 	return r;
 }
 
-static int clk_mt8195_topck_remove(struct platform_device *pdev)
+static void clk_mt8195_topck_remove(struct platform_device *pdev)
 {
 	struct clk_hw_onecell_data *top_clk_data = platform_get_drvdata(pdev);
 	struct device_node *node = pdev->dev.of_node;
@@ -1328,13 +1328,11 @@ static int clk_mt8195_topck_remove(struct platform_device *pdev)
 	mtk_clk_unregister_factors(top_divs, ARRAY_SIZE(top_divs), top_clk_data);
 	mtk_clk_unregister_fixed_clks(top_fixed_clks, ARRAY_SIZE(top_fixed_clks), top_clk_data);
 	mtk_free_clk_data(top_clk_data);
-
-	return 0;
 }
 
 static struct platform_driver clk_mt8195_topck_drv = {
 	.probe = clk_mt8195_topck_probe,
-	.remove = clk_mt8195_topck_remove,
+	.remove_new = clk_mt8195_topck_remove,
 	.driver = {
 		.name = "clk-mt8195-topck",
 		.of_match_table = of_match_clk_mt8195_topck,
diff --git a/drivers/clk/mediatek/clk-mt8195-vdo0.c b/drivers/clk/mediatek/clk-mt8195-vdo0.c
index 839b730688ac..86663db54a72 100644
--- a/drivers/clk/mediatek/clk-mt8195-vdo0.c
+++ b/drivers/clk/mediatek/clk-mt8195-vdo0.c
@@ -124,7 +124,7 @@ static int clk_mt8195_vdo0_probe(struct platform_device *pdev)
 	return r;
 }
 
-static int clk_mt8195_vdo0_remove(struct platform_device *pdev)
+static void clk_mt8195_vdo0_remove(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
 	struct device_node *node = dev->parent->of_node;
@@ -133,13 +133,11 @@ static int clk_mt8195_vdo0_remove(struct platform_device *pdev)
 	of_clk_del_provider(node);
 	mtk_clk_unregister_gates(vdo0_clks, ARRAY_SIZE(vdo0_clks), clk_data);
 	mtk_free_clk_data(clk_data);
-
-	return 0;
 }
 
 static struct platform_driver clk_mt8195_vdo0_drv = {
 	.probe = clk_mt8195_vdo0_probe,
-	.remove = clk_mt8195_vdo0_remove,
+	.remove_new = clk_mt8195_vdo0_remove,
 	.driver = {
 		.name = "clk-mt8195-vdo0",
 	},
diff --git a/drivers/clk/mediatek/clk-mt8195-vdo1.c b/drivers/clk/mediatek/clk-mt8195-vdo1.c
index 7df695b28925..05119b31077d 100644
--- a/drivers/clk/mediatek/clk-mt8195-vdo1.c
+++ b/drivers/clk/mediatek/clk-mt8195-vdo1.c
@@ -151,7 +151,7 @@ static int clk_mt8195_vdo1_probe(struct platform_device *pdev)
 	return r;
 }
 
-static int clk_mt8195_vdo1_remove(struct platform_device *pdev)
+static void clk_mt8195_vdo1_remove(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
 	struct device_node *node = dev->parent->of_node;
@@ -160,13 +160,11 @@ static int clk_mt8195_vdo1_remove(struct platform_device *pdev)
 	of_clk_del_provider(node);
 	mtk_clk_unregister_gates(vdo1_clks, ARRAY_SIZE(vdo1_clks), clk_data);
 	mtk_free_clk_data(clk_data);
-
-	return 0;
 }
 
 static struct platform_driver clk_mt8195_vdo1_drv = {
 	.probe = clk_mt8195_vdo1_probe,
-	.remove = clk_mt8195_vdo1_remove,
+	.remove_new = clk_mt8195_vdo1_remove,
 	.driver = {
 		.name = "clk-mt8195-vdo1",
 	},
diff --git a/drivers/clk/mediatek/clk-mt8195-vpp0.c b/drivers/clk/mediatek/clk-mt8195-vpp0.c
index e19664af09b6..fdb9f0507e52 100644
--- a/drivers/clk/mediatek/clk-mt8195-vpp0.c
+++ b/drivers/clk/mediatek/clk-mt8195-vpp0.c
@@ -116,7 +116,7 @@ static int clk_mt8195_vpp0_probe(struct platform_device *pdev)
 	return r;
 }
 
-static int clk_mt8195_vpp0_remove(struct platform_device *pdev)
+static void clk_mt8195_vpp0_remove(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
 	struct device_node *node = dev->parent->of_node;
@@ -125,13 +125,11 @@ static int clk_mt8195_vpp0_remove(struct platform_device *pdev)
 	of_clk_del_provider(node);
 	mtk_clk_unregister_gates(vpp0_clks, ARRAY_SIZE(vpp0_clks), clk_data);
 	mtk_free_clk_data(clk_data);
-
-	return 0;
 }
 
 static struct platform_driver clk_mt8195_vpp0_drv = {
 	.probe = clk_mt8195_vpp0_probe,
-	.remove = clk_mt8195_vpp0_remove,
+	.remove_new = clk_mt8195_vpp0_remove,
 	.driver = {
 		.name = "clk-mt8195-vpp0",
 	},
diff --git a/drivers/clk/mediatek/clk-mt8195-vpp1.c b/drivers/clk/mediatek/clk-mt8195-vpp1.c
index e6c458fc1531..075c569867d1 100644
--- a/drivers/clk/mediatek/clk-mt8195-vpp1.c
+++ b/drivers/clk/mediatek/clk-mt8195-vpp1.c
@@ -114,7 +114,7 @@ static int clk_mt8195_vpp1_probe(struct platform_device *pdev)
 	return r;
 }
 
-static int clk_mt8195_vpp1_remove(struct platform_device *pdev)
+static void clk_mt8195_vpp1_remove(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
 	struct device_node *node = dev->parent->of_node;
@@ -123,13 +123,11 @@ static int clk_mt8195_vpp1_remove(struct platform_device *pdev)
 	of_clk_del_provider(node);
 	mtk_clk_unregister_gates(vpp1_clks, ARRAY_SIZE(vpp1_clks), clk_data);
 	mtk_free_clk_data(clk_data);
-
-	return 0;
 }
 
 static struct platform_driver clk_mt8195_vpp1_drv = {
 	.probe = clk_mt8195_vpp1_probe,
-	.remove = clk_mt8195_vpp1_remove,
+	.remove_new = clk_mt8195_vpp1_remove,
 	.driver = {
 		.name = "clk-mt8195-vpp1",
 	},
-- 
2.39.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] 29+ messages in thread

* [PATCH 24/30] clk: samsung: Convert to platform remove callback returning void
  2023-03-12 16:14 [PATCH 00/30] clk: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (6 preceding siblings ...)
  2023-03-12 16:15 ` [PATCH 19/30] clk: mediatek: " Uwe Kleine-König
@ 2023-03-12 16:15 ` Uwe Kleine-König
  2023-03-12 16:33   ` (subset) " Krzysztof Kozlowski
  2023-03-12 16:15 ` [PATCH 25/30] clk: stm32: " Uwe Kleine-König
                   ` (3 subsequent siblings)
  11 siblings, 1 reply; 29+ messages in thread
From: Uwe Kleine-König @ 2023-03-12 16:15 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Sylwester Nawrocki, Tomasz Figa,
	Chanwoo Choi, Michael Turquette, Stephen Boyd
  Cc: Alim Akhtar, linux-samsung-soc, linux-clk, linux-arm-kernel,
	linux-kernel

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

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

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/clk/samsung/clk-exynos-audss.c  | 6 ++----
 drivers/clk/samsung/clk-exynos-clkout.c | 6 ++----
 2 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/clk/samsung/clk-exynos-audss.c b/drivers/clk/samsung/clk-exynos-audss.c
index 9cc127a162ad..7626dff41f6f 100644
--- a/drivers/clk/samsung/clk-exynos-audss.c
+++ b/drivers/clk/samsung/clk-exynos-audss.c
@@ -268,7 +268,7 @@ static int exynos_audss_clk_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int exynos_audss_clk_remove(struct platform_device *pdev)
+static void exynos_audss_clk_remove(struct platform_device *pdev)
 {
 	of_clk_del_provider(pdev->dev.of_node);
 
@@ -277,8 +277,6 @@ static int exynos_audss_clk_remove(struct platform_device *pdev)
 
 	if (!IS_ERR(epll))
 		clk_disable_unprepare(epll);
-
-	return 0;
 }
 
 static const struct dev_pm_ops exynos_audss_clk_pm_ops = {
@@ -295,7 +293,7 @@ static struct platform_driver exynos_audss_clk_driver = {
 		.pm = &exynos_audss_clk_pm_ops,
 	},
 	.probe = exynos_audss_clk_probe,
-	.remove = exynos_audss_clk_remove,
+	.remove_new = exynos_audss_clk_remove,
 };
 
 module_platform_driver(exynos_audss_clk_driver);
diff --git a/drivers/clk/samsung/clk-exynos-clkout.c b/drivers/clk/samsung/clk-exynos-clkout.c
index e6d6cbf8c4e6..0cff1c94c35e 100644
--- a/drivers/clk/samsung/clk-exynos-clkout.c
+++ b/drivers/clk/samsung/clk-exynos-clkout.c
@@ -196,15 +196,13 @@ static int exynos_clkout_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int exynos_clkout_remove(struct platform_device *pdev)
+static void exynos_clkout_remove(struct platform_device *pdev)
 {
 	struct exynos_clkout *clkout = platform_get_drvdata(pdev);
 
 	of_clk_del_provider(clkout->np);
 	clk_hw_unregister(clkout->data.hws[0]);
 	iounmap(clkout->reg);
-
-	return 0;
 }
 
 static int __maybe_unused exynos_clkout_suspend(struct device *dev)
@@ -235,7 +233,7 @@ static struct platform_driver exynos_clkout_driver = {
 		.pm = &exynos_clkout_pm_ops,
 	},
 	.probe = exynos_clkout_probe,
-	.remove = exynos_clkout_remove,
+	.remove_new = exynos_clkout_remove,
 };
 module_platform_driver(exynos_clkout_driver);
 
-- 
2.39.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] 29+ messages in thread

* [PATCH 25/30] clk: stm32: Convert to platform remove callback returning void
  2023-03-12 16:14 [PATCH 00/30] clk: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (7 preceding siblings ...)
  2023-03-12 16:15 ` [PATCH 24/30] clk: samsung: " Uwe Kleine-König
@ 2023-03-12 16:15 ` Uwe Kleine-König
  2023-03-29  2:40   ` Stephen Boyd
  2023-03-12 16:15 ` [PATCH 28/30] clk: uniphier: " Uwe Kleine-König
                   ` (2 subsequent siblings)
  11 siblings, 1 reply; 29+ messages in thread
From: Uwe Kleine-König @ 2023-03-12 16:15 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd, Maxime Coquelin,
	Alexandre Torgue
  Cc: linux-clk, linux-stm32, linux-arm-kernel, linux-kernel

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

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

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

diff --git a/drivers/clk/stm32/clk-stm32mp13.c b/drivers/clk/stm32/clk-stm32mp13.c
index 1192eee8abe4..c4a737482fe5 100644
--- a/drivers/clk/stm32/clk-stm32mp13.c
+++ b/drivers/clk/stm32/clk-stm32mp13.c
@@ -1593,15 +1593,13 @@ static int stm32mp1_rcc_clocks_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int stm32mp1_rcc_clocks_remove(struct platform_device *pdev)
+static void stm32mp1_rcc_clocks_remove(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
 	struct device_node *child, *np = dev_of_node(dev);
 
 	for_each_available_child_of_node(np, child)
 		of_clk_del_provider(child);
-
-	return 0;
 }
 
 static struct platform_driver stm32mp13_rcc_clocks_driver = {
@@ -1610,7 +1608,7 @@ static struct platform_driver stm32mp13_rcc_clocks_driver = {
 		.of_match_table = stm32mp13_match_data,
 	},
 	.probe = stm32mp1_rcc_clocks_probe,
-	.remove = stm32mp1_rcc_clocks_remove,
+	.remove_new = stm32mp1_rcc_clocks_remove,
 };
 
 static int __init stm32mp13_clocks_init(void)
-- 
2.39.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] 29+ messages in thread

* [PATCH 28/30] clk: uniphier: Convert to platform remove callback returning void
  2023-03-12 16:14 [PATCH 00/30] clk: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (8 preceding siblings ...)
  2023-03-12 16:15 ` [PATCH 25/30] clk: stm32: " Uwe Kleine-König
@ 2023-03-12 16:15 ` Uwe Kleine-König
  2023-03-29  2:40   ` Stephen Boyd
  2023-03-12 16:15 ` [PATCH 30/30] clk: xilinx: " Uwe Kleine-König
  2023-03-15 23:35 ` (subset) [PATCH 00/30] clk: " Bjorn Andersson
  11 siblings, 1 reply; 29+ messages in thread
From: Uwe Kleine-König @ 2023-03-12 16:15 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd, Kunihiko Hayashi,
	Masami Hiramatsu
  Cc: linux-clk, linux-arm-kernel, linux-kernel

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

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

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

diff --git a/drivers/clk/uniphier/clk-uniphier-core.c b/drivers/clk/uniphier/clk-uniphier-core.c
index 46c66fac48e6..92f4ddc593db 100644
--- a/drivers/clk/uniphier/clk-uniphier-core.c
+++ b/drivers/clk/uniphier/clk-uniphier-core.c
@@ -91,11 +91,9 @@ static int uniphier_clk_probe(struct platform_device *pdev)
 				      hw_data);
 }
 
-static int uniphier_clk_remove(struct platform_device *pdev)
+static void uniphier_clk_remove(struct platform_device *pdev)
 {
 	of_clk_del_provider(pdev->dev.of_node);
-
-	return 0;
 }
 
 static const struct of_device_id uniphier_clk_match[] = {
@@ -220,7 +218,7 @@ static const struct of_device_id uniphier_clk_match[] = {
 
 static struct platform_driver uniphier_clk_driver = {
 	.probe = uniphier_clk_probe,
-	.remove = uniphier_clk_remove,
+	.remove_new = uniphier_clk_remove,
 	.driver = {
 		.name = "uniphier-clk",
 		.of_match_table = uniphier_clk_match,
-- 
2.39.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] 29+ messages in thread

* [PATCH 30/30] clk: xilinx: Convert to platform remove callback returning void
  2023-03-12 16:14 [PATCH 00/30] clk: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (9 preceding siblings ...)
  2023-03-12 16:15 ` [PATCH 28/30] clk: uniphier: " Uwe Kleine-König
@ 2023-03-12 16:15 ` Uwe Kleine-König
  2023-03-29  2:41   ` Stephen Boyd
  2023-03-15 23:35 ` (subset) [PATCH 00/30] clk: " Bjorn Andersson
  11 siblings, 1 reply; 29+ messages in thread
From: Uwe Kleine-König @ 2023-03-12 16:15 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd, Michal Simek
  Cc: linux-clk, linux-arm-kernel, linux-kernel

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

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

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/clk/xilinx/clk-xlnx-clock-wizard.c | 6 ++----
 drivers/clk/xilinx/xlnx_vcu.c              | 6 ++----
 2 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/clk/xilinx/clk-xlnx-clock-wizard.c b/drivers/clk/xilinx/clk-xlnx-clock-wizard.c
index eb1dfe7ecc1b..fa829c01a444 100644
--- a/drivers/clk/xilinx/clk-xlnx-clock-wizard.c
+++ b/drivers/clk/xilinx/clk-xlnx-clock-wizard.c
@@ -593,7 +593,7 @@ static int clk_wzrd_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int clk_wzrd_remove(struct platform_device *pdev)
+static void clk_wzrd_remove(struct platform_device *pdev)
 {
 	int i;
 	struct clk_wzrd *clk_wzrd = platform_get_drvdata(pdev);
@@ -611,8 +611,6 @@ static int clk_wzrd_remove(struct platform_device *pdev)
 	}
 
 	clk_disable_unprepare(clk_wzrd->axi_clk);
-
-	return 0;
 }
 
 static const struct of_device_id clk_wzrd_ids[] = {
@@ -630,7 +628,7 @@ static struct platform_driver clk_wzrd_driver = {
 		.pm = &clk_wzrd_dev_pm_ops,
 	},
 	.probe = clk_wzrd_probe,
-	.remove = clk_wzrd_remove,
+	.remove_new = clk_wzrd_remove,
 };
 module_platform_driver(clk_wzrd_driver);
 
diff --git a/drivers/clk/xilinx/xlnx_vcu.c b/drivers/clk/xilinx/xlnx_vcu.c
index 54b44debfd3e..0786f15ebbe8 100644
--- a/drivers/clk/xilinx/xlnx_vcu.c
+++ b/drivers/clk/xilinx/xlnx_vcu.c
@@ -702,7 +702,7 @@ static int xvcu_probe(struct platform_device *pdev)
  * Return:	Returns 0 on success
  *		Negative error code otherwise
  */
-static int xvcu_remove(struct platform_device *pdev)
+static void xvcu_remove(struct platform_device *pdev)
 {
 	struct xvcu_device *xvcu;
 
@@ -714,8 +714,6 @@ static int xvcu_remove(struct platform_device *pdev)
 	regmap_write(xvcu->logicore_reg_ba, VCU_GASKET_INIT, 0);
 
 	clk_disable_unprepare(xvcu->aclk);
-
-	return 0;
 }
 
 static const struct of_device_id xvcu_of_id_table[] = {
@@ -731,7 +729,7 @@ static struct platform_driver xvcu_driver = {
 		.of_match_table = xvcu_of_id_table,
 	},
 	.probe                  = xvcu_probe,
-	.remove                 = xvcu_remove,
+	.remove_new             = xvcu_remove,
 };
 
 module_platform_driver(xvcu_driver);
-- 
2.39.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] 29+ messages in thread

* Re: (subset) [PATCH 24/30] clk: samsung: Convert to platform remove callback returning void
  2023-03-12 16:15 ` [PATCH 24/30] clk: samsung: " Uwe Kleine-König
@ 2023-03-12 16:33   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 29+ messages in thread
From: Krzysztof Kozlowski @ 2023-03-12 16:33 UTC (permalink / raw)
  To: Michael Turquette, Chanwoo Choi, Tomasz Figa, Sylwester Nawrocki,
	Uwe Kleine-König, Stephen Boyd
  Cc: Krzysztof Kozlowski, linux-arm-kernel, Alim Akhtar,
	linux-samsung-soc, linux-clk, linux-kernel

On Sun, 12 Mar 2023 17:15:06 +0100, Uwe Kleine-König wrote:
> The .remove() callback for a platform driver returns an int which makes
> many driver authors wrongly assume it's possible to do error handling by
> returning an error code. However the value returned is (mostly) ignored
> and this typically results in resource leaks. To improve here there is a
> quest to make the remove callback return void. In the first step of this
> quest all drivers are converted to .remove_new() which already returns
> void.
> 
> [...]


You mentioned some dependency of v6.3-rc1, so I assume there is no dependency.
There is never a need to mention RC1 dependencies. Maintainer's tree must be
based on it.

Applied, thanks!

[24/30] clk: samsung: Convert to platform remove callback returning void
        https://git.kernel.org/krzk/linux/c/e853fb1803f60da69db82d41d92e30539a859227

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

* Re: [PATCH 01/30] clk: mediatek: Make mtk_clk_simple_remove() return void
  2023-03-12 16:14 ` [PATCH 01/30] clk: mediatek: Make mtk_clk_simple_remove() return void Uwe Kleine-König
@ 2023-03-13  8:54   ` AngeloGioacchino Del Regno
  2023-03-13  9:45     ` Uwe Kleine-König
  0 siblings, 1 reply; 29+ messages in thread
From: AngeloGioacchino Del Regno @ 2023-03-13  8:54 UTC (permalink / raw)
  To: Uwe Kleine-König, Michael Turquette, Stephen Boyd,
	Matthias Brugger
  Cc: linux-clk, linux-kernel, linux-arm-kernel, linux-mediatek

Il 12/03/23 17:14, Uwe Kleine-König ha scritto:
> mtk_clk_simple_remove() returned zero unconditionally. Make it return no
> value instead and convert the respective drivers to .remove_new.
> 
> This makes the semantics in the callers of mtk_clk_simple_remove() clearer
> and prepares for the quest to make platform driver's remove function return
> void.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Hello Uwe,

since there's a big cleanup series that is well reviewed and that is touching
practically all MediaTek clock drivers, can you please rebase this commit over
[1]?

Thanks,
Angelo

[1]: https://patchwork.kernel.org/project/linux-mediatek/list/?series=726914


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

* Re: [PATCH 01/30] clk: mediatek: Make mtk_clk_simple_remove() return void
  2023-03-13  8:54   ` AngeloGioacchino Del Regno
@ 2023-03-13  9:45     ` Uwe Kleine-König
  0 siblings, 0 replies; 29+ messages in thread
From: Uwe Kleine-König @ 2023-03-13  9:45 UTC (permalink / raw)
  To: AngeloGioacchino Del Regno
  Cc: Michael Turquette, Stephen Boyd, Matthias Brugger, linux-clk,
	linux-kernel, linux-arm-kernel, linux-mediatek


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

Hello Angelo,

On Mon, Mar 13, 2023 at 09:54:07AM +0100, AngeloGioacchino Del Regno wrote:
> Il 12/03/23 17:14, Uwe Kleine-König ha scritto:
> > mtk_clk_simple_remove() returned zero unconditionally. Make it return no
> > value instead and convert the respective drivers to .remove_new.
> > 
> > This makes the semantics in the callers of mtk_clk_simple_remove() clearer
> > and prepares for the quest to make platform driver's remove function return
> > void.
> > 
> > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> 
> Hello Uwe,
> 
> since there's a big cleanup series that is well reviewed and that is touching
> practically all MediaTek clock drivers, can you please rebase this commit over
> [1]?

I'll wait a bit until this series is in and then rebase and resend.
Thanks for letting me know.

Best regards
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: 176 bytes --]

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

* Re: [PATCH 05/30] clk: bcm: Convert to platform remove callback returning void
  2023-03-12 16:14 ` [PATCH 05/30] clk: bcm: Convert to platform remove callback returning void Uwe Kleine-König
@ 2023-03-14 21:28   ` Florian Fainelli
  2023-03-29  2:35   ` Stephen Boyd
  1 sibling, 0 replies; 29+ messages in thread
From: Florian Fainelli @ 2023-03-14 21:28 UTC (permalink / raw)
  To: Uwe Kleine-König, Michael Turquette, Stephen Boyd,
	Florian Fainelli
  Cc: Broadcom internal kernel review list, linux-clk, linux-rpi-kernel,
	linux-arm-kernel, linux-kernel

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

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


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

* Re: (subset) [PATCH 00/30] clk: Convert to platform remove callback returning void
  2023-03-12 16:14 [PATCH 00/30] clk: Convert to platform remove callback returning void Uwe Kleine-König
                   ` (10 preceding siblings ...)
  2023-03-12 16:15 ` [PATCH 30/30] clk: xilinx: " Uwe Kleine-König
@ 2023-03-15 23:35 ` Bjorn Andersson
  11 siblings, 0 replies; 29+ messages in thread
From: Bjorn Andersson @ 2023-03-15 23:35 UTC (permalink / raw)
  To: Tero Kristo, Alexandre Torgue, Chanwoo Choi, Krzysztof Kozlowski,
	Santosh Shilimkar, Eugeniy Paltsev, Michal Simek, Nishanth Menon,
	Michael Turquette, Peter De Schrijver, Maxime Coquelin,
	Thierry Reding, Geert Uytterhoeven, Tomasz Figa, Stephen Boyd,
	Uwe Kleine-König, Sylwester Nawrocki, Andy Gross,
	Masami Hiramatsu, Kunihiko Hayashi, Florian Fainelli,
	Sudeep Holla, Jonathan Hunter, Prashant Gaikwad, Matthias Brugger
  Cc: linux-arm-msm, Konrad Dybcio, Alim Akhtar, linux-tegra,
	AngeloGioacchino Del Regno, linux-stm32,
	Broadcom internal kernel review list, linux-samsung-soc,
	linux-kernel, linux-arm-kernel, linux-mediatek, linux-clk,
	linux-omap, Cristian Marussi, linux-rpi-kernel, linux-renesas-soc

On Sun, 12 Mar 2023 17:14:42 +0100, Uwe Kleine-König wrote:
> this patch series adapts the platform drivers below drivers/clk
> to use the .remove_new() callback. Compared to the traditional .remove()
> callback .remove_new() returns no value. This is a good thing because
> the driver core doesn't (and cannot) cope for errors during remove. The
> only effect of a non-zero return value in .remove() is that the driver
> core emits a warning. The device is removed anyhow and an early return
> from .remove() usually yields a resource leak.
> 
> [...]

Applied, thanks!

[22/30] clk: qcom: Convert to platform remove callback returning void
        commit: c4dc24da5286742f8cc728379f6115c9e886a8a4

Best regards,
-- 
Bjorn Andersson <andersson@kernel.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] 29+ messages in thread

* Re: [PATCH 15/30] clk: scpi: Convert to platform remove callback returning void
  2023-03-12 16:14 ` [PATCH 15/30] clk: scpi: " Uwe Kleine-König
@ 2023-03-16 15:01   ` Sudeep Holla
  2023-03-16 15:48     ` Uwe Kleine-König
  2023-03-29  2:38   ` Stephen Boyd
  1 sibling, 1 reply; 29+ messages in thread
From: Sudeep Holla @ 2023-03-16 15:01 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Michael Turquette, Stephen Boyd, Sudeep Holla, Cristian Marussi,
	linux-arm-kernel, linux-clk, linux-kernel

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

Acked-by: Sudeep Holla <sudeep.holla@arm.com>

Let me know if you want me to pick up instead.

-- 
Regards,
Sudeep

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

* Re: [PATCH 15/30] clk: scpi: Convert to platform remove callback returning void
  2023-03-16 15:01   ` Sudeep Holla
@ 2023-03-16 15:48     ` Uwe Kleine-König
  2023-03-17  0:31       ` Stephen Boyd
  0 siblings, 1 reply; 29+ messages in thread
From: Uwe Kleine-König @ 2023-03-16 15:48 UTC (permalink / raw)
  To: Sudeep Holla, Michael Turquette, Stephen Boyd
  Cc: Cristian Marussi, linux-arm-kernel, linux-clk, linux-kernel


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

Hello,

[put the clk maintainers in To:]

On Thu, Mar 16, 2023 at 03:01:44PM +0000, Sudeep Holla wrote:
> On Sun, Mar 12, 2023 at 05:14:57PM +0100, Uwe Kleine-König wrote:
> > The .remove() callback for a platform driver returns an int which makes
> > many driver authors wrongly assume it's possible to do error handling by
> > returning an error code. However the value returned is (mostly) ignored
> > and this typically results in resource leaks. To improve here there is a
> > quest to make the remove callback return void. In the first step of this
> > quest all drivers are converted to .remove_new() which already returns
> > void.
> > 
> > Trivially convert this driver from always returning zero in the remove
> > callback to the void returning variant.
> >
> 
> Acked-by: Sudeep Holla <sudeep.holla@arm.com>
> 
> Let me know if you want me to pick up instead.

Honestly I don't know. I expected that the series is applied completely
via the clk maintainers, but the samsung patch was already taken
individually.

Michael and Stephen: It would probably be helpful if you shared your
thoughs about this. For me both options are fine.

Best regards
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: 176 bytes --]

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

* Re: [PATCH 15/30] clk: scpi: Convert to platform remove callback returning void
  2023-03-16 15:48     ` Uwe Kleine-König
@ 2023-03-17  0:31       ` Stephen Boyd
  0 siblings, 0 replies; 29+ messages in thread
From: Stephen Boyd @ 2023-03-17  0:31 UTC (permalink / raw)
  To: Michael Turquette, Sudeep Holla, Uwe Kleine-König
  Cc: Cristian Marussi, linux-arm-kernel, linux-clk, linux-kernel

Quoting Uwe Kleine-König (2023-03-16 08:48:50)
> Hello,
> 
> [put the clk maintainers in To:]
> 
> On Thu, Mar 16, 2023 at 03:01:44PM +0000, Sudeep Holla wrote:
> > On Sun, Mar 12, 2023 at 05:14:57PM +0100, Uwe Kleine-K�nig wrote:
> > > The .remove() callback for a platform driver returns an int which makes
> > > many driver authors wrongly assume it's possible to do error handling by
> > > returning an error code. However the value returned is (mostly) ignored
> > > and this typically results in resource leaks. To improve here there is a
> > > quest to make the remove callback return void. In the first step of this
> > > quest all drivers are converted to .remove_new() which already returns
> > > void.
> > > 
> > > Trivially convert this driver from always returning zero in the remove
> > > callback to the void returning variant.
> > >
> > 
> > Acked-by: Sudeep Holla <sudeep.holla@arm.com>
> > 
> > Let me know if you want me to pick up instead.
> 
> Honestly I don't know. I expected that the series is applied completely
> via the clk maintainers, but the samsung patch was already taken
> individually.
> 
> Michael and Stephen: It would probably be helpful if you shared your
> thoughs about this. For me both options are fine.
> 

I will pick up whatever isn't picked by SoC maintainers.

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

* Re: [PATCH 03/30] clk: xilinx: Drop if block with always false condition
  2023-03-12 16:14 ` [PATCH 03/30] clk: xilinx: Drop if block with always false condition Uwe Kleine-König
@ 2023-03-29  2:35   ` Stephen Boyd
  0 siblings, 0 replies; 29+ messages in thread
From: Stephen Boyd @ 2023-03-29  2:35 UTC (permalink / raw)
  To: Michael Turquette, Michal Simek, Uwe Kleine-König
  Cc: linux-clk, linux-arm-kernel, linux-kernel

Quoting Uwe Kleine-König (2023-03-12 09:14:45)
> xvcu_remove() is only called for a device after after xvcu_probe()
> completed successfully. In that case dev_set_drvdata() was called for
> that device with a non-NULL parameter, so platform_get_drvdata() won't
> return NULL and the if condition is never true.
> 
> Drop the if, preparing a conversion to make platform driver's remove
> callback return void.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---

Applied to clk-next

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

* Re: [PATCH 05/30] clk: bcm: Convert to platform remove callback returning void
  2023-03-12 16:14 ` [PATCH 05/30] clk: bcm: Convert to platform remove callback returning void Uwe Kleine-König
  2023-03-14 21:28   ` Florian Fainelli
@ 2023-03-29  2:35   ` Stephen Boyd
  1 sibling, 0 replies; 29+ messages in thread
From: Stephen Boyd @ 2023-03-29  2:35 UTC (permalink / raw)
  To: Florian Fainelli, Michael Turquette, Uwe Kleine-König
  Cc: Broadcom internal kernel review list, linux-clk, linux-rpi-kernel,
	linux-arm-kernel, linux-kernel

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

Applied to clk-next

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

* Re: [PATCH 15/30] clk: scpi: Convert to platform remove callback returning void
  2023-03-12 16:14 ` [PATCH 15/30] clk: scpi: " Uwe Kleine-König
  2023-03-16 15:01   ` Sudeep Holla
@ 2023-03-29  2:38   ` Stephen Boyd
  1 sibling, 0 replies; 29+ messages in thread
From: Stephen Boyd @ 2023-03-29  2:38 UTC (permalink / raw)
  To: Michael Turquette, Sudeep Holla, Uwe Kleine-König
  Cc: Cristian Marussi, linux-arm-kernel, linux-clk, linux-kernel

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

Applied to clk-next

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

* Re: [PATCH 16/30] clk: stm32mp1: Convert to platform remove callback returning void
  2023-03-12 16:14 ` [PATCH 16/30] clk: stm32mp1: " Uwe Kleine-König
@ 2023-03-29  2:38   ` Stephen Boyd
  0 siblings, 0 replies; 29+ messages in thread
From: Stephen Boyd @ 2023-03-29  2:38 UTC (permalink / raw)
  To: Alexandre Torgue, Maxime Coquelin, Michael Turquette,
	Uwe Kleine-König
  Cc: linux-clk, linux-stm32, linux-arm-kernel, linux-kernel

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

Applied to clk-next

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

* Re: [PATCH 18/30] clk: keystone: Convert to platform remove callback returning void
  2023-03-12 16:15 ` [PATCH 18/30] clk: keystone: " Uwe Kleine-König
@ 2023-03-29  2:39   ` Stephen Boyd
  0 siblings, 0 replies; 29+ messages in thread
From: Stephen Boyd @ 2023-03-29  2:39 UTC (permalink / raw)
  To: Michael Turquette, Nishanth Menon, Santosh Shilimkar, Tero Kristo,
	Uwe Kleine-König
  Cc: linux-arm-kernel, linux-kernel, linux-clk

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

Applied to clk-next

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

* Re: [PATCH 19/30] clk: mediatek: Convert to platform remove callback returning void
  2023-03-12 16:15 ` [PATCH 19/30] clk: mediatek: " Uwe Kleine-König
@ 2023-03-29  2:39   ` Stephen Boyd
  0 siblings, 0 replies; 29+ messages in thread
From: Stephen Boyd @ 2023-03-29  2:39 UTC (permalink / raw)
  To: Matthias Brugger, Michael Turquette, Uwe Kleine-König
  Cc: AngeloGioacchino Del Regno, linux-clk, linux-kernel,
	linux-arm-kernel, linux-mediatek

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

Skipped this one due to all the conflicts.

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

* Re: [PATCH 25/30] clk: stm32: Convert to platform remove callback returning void
  2023-03-12 16:15 ` [PATCH 25/30] clk: stm32: " Uwe Kleine-König
@ 2023-03-29  2:40   ` Stephen Boyd
  0 siblings, 0 replies; 29+ messages in thread
From: Stephen Boyd @ 2023-03-29  2:40 UTC (permalink / raw)
  To: Alexandre Torgue, Maxime Coquelin, Michael Turquette,
	Uwe Kleine-König
  Cc: linux-clk, linux-stm32, linux-arm-kernel, linux-kernel

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

Applied to clk-next

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

* Re: [PATCH 28/30] clk: uniphier: Convert to platform remove callback returning void
  2023-03-12 16:15 ` [PATCH 28/30] clk: uniphier: " Uwe Kleine-König
@ 2023-03-29  2:40   ` Stephen Boyd
  0 siblings, 0 replies; 29+ messages in thread
From: Stephen Boyd @ 2023-03-29  2:40 UTC (permalink / raw)
  To: Kunihiko Hayashi, Masami Hiramatsu, Michael Turquette,
	Uwe Kleine-König
  Cc: linux-clk, linux-arm-kernel, linux-kernel

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

Applied to clk-next

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

* Re: [PATCH 30/30] clk: xilinx: Convert to platform remove callback returning void
  2023-03-12 16:15 ` [PATCH 30/30] clk: xilinx: " Uwe Kleine-König
@ 2023-03-29  2:41   ` Stephen Boyd
  0 siblings, 0 replies; 29+ messages in thread
From: Stephen Boyd @ 2023-03-29  2:41 UTC (permalink / raw)
  To: Michael Turquette, Michal Simek, Uwe Kleine-König
  Cc: linux-clk, linux-arm-kernel, linux-kernel

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

Applied to clk-next

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

end of thread, other threads:[~2023-03-29  2:41 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-12 16:14 [PATCH 00/30] clk: Convert to platform remove callback returning void Uwe Kleine-König
2023-03-12 16:14 ` [PATCH 01/30] clk: mediatek: Make mtk_clk_simple_remove() return void Uwe Kleine-König
2023-03-13  8:54   ` AngeloGioacchino Del Regno
2023-03-13  9:45     ` Uwe Kleine-König
2023-03-12 16:14 ` [PATCH 03/30] clk: xilinx: Drop if block with always false condition Uwe Kleine-König
2023-03-29  2:35   ` Stephen Boyd
2023-03-12 16:14 ` [PATCH 05/30] clk: bcm: Convert to platform remove callback returning void Uwe Kleine-König
2023-03-14 21:28   ` Florian Fainelli
2023-03-29  2:35   ` Stephen Boyd
2023-03-12 16:14 ` [PATCH 15/30] clk: scpi: " Uwe Kleine-König
2023-03-16 15:01   ` Sudeep Holla
2023-03-16 15:48     ` Uwe Kleine-König
2023-03-17  0:31       ` Stephen Boyd
2023-03-29  2:38   ` Stephen Boyd
2023-03-12 16:14 ` [PATCH 16/30] clk: stm32mp1: " Uwe Kleine-König
2023-03-29  2:38   ` Stephen Boyd
2023-03-12 16:15 ` [PATCH 18/30] clk: keystone: " Uwe Kleine-König
2023-03-29  2:39   ` Stephen Boyd
2023-03-12 16:15 ` [PATCH 19/30] clk: mediatek: " Uwe Kleine-König
2023-03-29  2:39   ` Stephen Boyd
2023-03-12 16:15 ` [PATCH 24/30] clk: samsung: " Uwe Kleine-König
2023-03-12 16:33   ` (subset) " Krzysztof Kozlowski
2023-03-12 16:15 ` [PATCH 25/30] clk: stm32: " Uwe Kleine-König
2023-03-29  2:40   ` Stephen Boyd
2023-03-12 16:15 ` [PATCH 28/30] clk: uniphier: " Uwe Kleine-König
2023-03-29  2:40   ` Stephen Boyd
2023-03-12 16:15 ` [PATCH 30/30] clk: xilinx: " Uwe Kleine-König
2023-03-29  2:41   ` Stephen Boyd
2023-03-15 23:35 ` (subset) [PATCH 00/30] clk: " Bjorn Andersson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).