mbox series

[00/11] usb: phy: Convert to platform remove callback returning void

Message ID 20230319092428.283054-1-u.kleine-koenig@pengutronix.de (mailing list archive)
Headers show
Series usb: phy: Convert to platform remove callback returning void | expand

Message

Uwe Kleine-König March 19, 2023, 9:24 a.m. UTC
Hello,

this series adapts the platform drivers below drivers/usb/phy 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 could be converted trivally as they all returned zero
unconditionally in their .remove() callback.

Best regards
Uwe


Uwe Kleine-König (11):
  usb: phy: ab8500: Convert to platform remove callback returning void
  usb: phy: am335x: Convert to platform remove callback returning void
  usb: phy: fsl: Convert to platform remove callback returning void
  usb: phy: generic: Convert to platform remove callback returning void
  usb: phy: gpio-vbus: Convert to platform remove callback returning
    void
  usb: phy: keystone: Convert to platform remove callback returning void
  usb: phy: mv: Convert to platform remove callback returning void
  usb: phy: mxs: Convert to platform remove callback returning void
  usb: phy: tahvo: Convert to platform remove callback returning void
  usb: phy: tegra: Convert to platform remove callback returning void
  usb: phy: twl6030: Convert to platform remove callback returning void

 drivers/usb/phy/phy-ab8500-usb.c    | 6 ++----
 drivers/usb/phy/phy-am335x.c        | 5 ++---
 drivers/usb/phy/phy-fsl-usb.c       | 6 ++----
 drivers/usb/phy/phy-generic.c       | 6 ++----
 drivers/usb/phy/phy-gpio-vbus-usb.c | 6 ++----
 drivers/usb/phy/phy-keystone.c      | 6 ++----
 drivers/usb/phy/phy-mv-usb.c        | 6 ++----
 drivers/usb/phy/phy-mxs-usb.c       | 6 ++----
 drivers/usb/phy/phy-tahvo.c         | 6 ++----
 drivers/usb/phy/phy-tegra-usb.c     | 6 ++----
 drivers/usb/phy/phy-twl6030-usb.c   | 6 ++----
 11 files changed, 22 insertions(+), 43 deletions(-)


base-commit: fe15c26ee26efa11741a7b632e9f23b01aca4cc6