[PATCH 00/30] clk: Convert to platform remove callback returning void

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [ARM Kernel]     [Linux ARM]     [Linux ARM MSM]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux