[PATCH 00/41] rtc: Convert to platform remove callback returning void

Uwe Kleine-König u.kleine-koenig at pengutronix.de
Sat Mar 4 05:29:47 PST 2023


Hello,

this patch series adapts the platform drivers below drivers/rtc 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.

By changing the remove callback to return void driver authors cannot reasonably
assume any more that there is some kind of cleanup later.

All drivers touched here returned zero unconditionally in their remove
callback, so they could all be converted trivially to .remove_new().

Note that this series depends on commit 5c5a7680e67b ("platform: Provide a
remove callback that returns no value") that is already in Linus' tree but not
yet included in a tagged version. I guess this will change tomorrow.

Best regards
Uwe

Uwe Kleine-König (41):
  rtc: 88pm80x: Convert to platform remove callback returning void
  rtc: 88pm860x: Convert to platform remove callback returning void
  rtc: ab8500: Convert to platform remove callback returning void
  rtc: ac100: Convert to platform remove callback returning void
  rtc: asm9260: Convert to platform remove callback returning void
  rtc: at91sam9: Convert to platform remove callback returning void
  rtc: brcmstb-waketimer: Convert to platform remove callback returning void
  rtc: cadence: Convert to platform remove callback returning void
  rtc: cmos: Convert to platform remove callback returning void
  rtc: cros-ec: Convert to platform remove callback returning void
  rtc: ds1685: Convert to platform remove callback returning void
  rtc: ftrtc010: Convert to platform remove callback returning void
  rtc: hid-sensor-time: Convert to platform remove callback returning void
  rtc: lpc24xx: Convert to platform remove callback returning void
  rtc: max77686: Convert to platform remove callback returning void
  rtc: mc13xxx: Convert to platform remove callback returning void
  rtc: mpc5121: Convert to platform remove callback returning void
  rtc: mpfs: Convert to platform remove callback returning void
  rtc: mt7622: Convert to platform remove callback returning void
  rtc: mxc_v2: Convert to platform remove callback returning void
  rtc: omap: Convert to platform remove callback returning void
  rtc: palmas: Convert to platform remove callback returning void
  rtc: pcf50633: Convert to platform remove callback returning void
  rtc: pic32: Convert to platform remove callback returning void
  rtc: pm8xxx: Convert to platform remove callback returning void
  rtc: rc5t583: Convert to platform remove callback returning void
  rtc: rtd119x: Convert to platform remove callback returning void
  rtc: rzn1: Convert to platform remove callback returning void
  rtc: s3c: Convert to platform remove callback returning void
  rtc: sa1100: Convert to platform remove callback returning void
  rtc: spear: Convert to platform remove callback returning void
  rtc: stm32: Convert to platform remove callback returning void
  rtc: stmp3xxx: Convert to platform remove callback returning void
  rtc: sunplus: Convert to platform remove callback returning void
  rtc: tegra: Convert to platform remove callback returning void
  rtc: tps6586x: Convert to platform remove callback returning void
  rtc: twl: Convert to platform remove callback returning void
  rtc: vt8500: Convert to platform remove callback returning void
  rtc: wm8350: Convert to platform remove callback returning void
  rtc: xgene: Convert to platform remove callback returning void
  rtc: zynqmp: Convert to platform remove callback returning void

 drivers/rtc/rtc-88pm80x.c           | 5 ++---
 drivers/rtc/rtc-88pm860x.c          | 6 ++----
 drivers/rtc/rtc-ab8500.c            | 6 ++----
 drivers/rtc/rtc-ac100.c             | 6 ++----
 drivers/rtc/rtc-asm9260.c           | 5 ++---
 drivers/rtc/rtc-at91sam9.c          | 6 ++----
 drivers/rtc/rtc-brcmstb-waketimer.c | 6 ++----
 drivers/rtc/rtc-cadence.c           | 6 ++----
 drivers/rtc/rtc-cmos.c              | 5 ++---
 drivers/rtc/rtc-cros-ec.c           | 6 ++----
 drivers/rtc/rtc-ds1685.c            | 6 ++----
 drivers/rtc/rtc-ftrtc010.c          | 6 ++----
 drivers/rtc/rtc-hid-sensor-time.c   | 6 ++----
 drivers/rtc/rtc-lpc24xx.c           | 6 ++----
 drivers/rtc/rtc-max77686.c          | 6 ++----
 drivers/rtc/rtc-mc13xxx.c           | 6 ++----
 drivers/rtc/rtc-mpc5121.c           | 6 ++----
 drivers/rtc/rtc-mpfs.c              | 6 ++----
 drivers/rtc/rtc-mt7622.c            | 6 ++----
 drivers/rtc/rtc-mxc_v2.c            | 5 ++---
 drivers/rtc/rtc-omap.c              | 6 ++----
 drivers/rtc/rtc-palmas.c            | 5 ++---
 drivers/rtc/rtc-pcf50633.c          | 6 ++----
 drivers/rtc/rtc-pic32.c             | 6 ++----
 drivers/rtc/rtc-pm8xxx.c            | 5 ++---
 drivers/rtc/rtc-rc5t583.c           | 5 ++---
 drivers/rtc/rtc-rtd119x.c           | 6 ++----
 drivers/rtc/rtc-rzn1.c              | 6 ++----
 drivers/rtc/rtc-s3c.c               | 6 ++----
 drivers/rtc/rtc-sa1100.c            | 6 ++----
 drivers/rtc/rtc-spear.c             | 6 ++----
 drivers/rtc/rtc-stm32.c             | 6 ++----
 drivers/rtc/rtc-stmp3xxx.c          | 8 +++-----
 drivers/rtc/rtc-sunplus.c           | 6 ++----
 drivers/rtc/rtc-tegra.c             | 6 ++----
 drivers/rtc/rtc-tps6586x.c          | 5 ++---
 drivers/rtc/rtc-twl.c               | 6 ++----
 drivers/rtc/rtc-vt8500.c            | 6 ++----
 drivers/rtc/rtc-wm8350.c            | 6 ++----
 drivers/rtc/rtc-xgene.c             | 5 ++---
 drivers/rtc/rtc-zynqmp.c            | 6 ++----
 41 files changed, 83 insertions(+), 156 deletions(-)

base-commit: 0988a0ea791999ebbf95693f2676381825b05033
-- 
2.39.1




More information about the linux-arm-kernel mailing list