[PATCH 00/19] drm/bridge: Convert to platform remove callback returning void

Uwe Kleine-König u.kleine-koenig at pengutronix.de
Sat Mar 18 12:07:45 PDT 2023


Hello,

this series adapts the platform drivers below drivers/gpu/drm/bridge 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.

The first patch simplifies the cdns-mhdp8546 driver to return zero in its
remove callback unconditionally and thenn all drivers are trivially converted
using coccinelle.

Only patch #3 depends on patch #1, the other are pairwise independant and can
be applied individually.

Best regards
Uwe

Uwe Kleine-König (19):
  drm/bridge: cdns-mhdp8546: Improve error reporting in remove callback
  drm/bridge: cdns-dsi: Convert to platform remove callback returning
    void
  drm/bridge: cdns-mhdp8546: Convert to platform remove callback
    returning void
  drm/bridge: display-connector: Convert to platform remove callback
    returning void
  drm/bridge: fsl-ldb: Convert to platform remove callback returning
    void
  drm/bridge: imx8qm-ldb: Convert to platform remove callback returning
    void
  drm/bridge: imx8qxp-ldb: Convert to platform remove callback returning
    void
  drm/bridge: imx8qxp-pixel-combiner: Convert to platform remove
    callback returning void
  drm/bridge: imx8qxp-pixel-link: Convert to platform remove callback
    returning void
  drm/bridge: imx8qxp-pxl2dpi: Convert to platform remove callback
    returning void
  drm/bridge: lvds-codec: Convert to platform remove callback returning
    void
  drm/bridge: nwl-dsi: Convert to platform remove callback returning
    void
  drm/bridge: simple-bridg: Convert to platform remove callback
    returning void
  drm/bridge: dw-hdmi-ahb-audio: Convert to platform remove callback
    returning void
  drm/bridge: dw-hdmi-cec: Convert to platform remove callback returning
    void
  drm/bridge: dw-hdmi-gp-audio: Convert to platform remove callback
    returning void
  drm/bridge: dw-hdmi-i2s-audio: Convert to platform remove callback
    returning void
  drm/bridge: thc63lvd1024: Convert to platform remove callback
    returning void
  drm/bridge: ti-tfp410: Convert to platform remove callback returning
    void

 .../gpu/drm/bridge/cadence/cdns-dsi-core.c    |  6 ++---
 .../drm/bridge/cadence/cdns-mhdp8546-core.c   | 22 +++++++++----------
 drivers/gpu/drm/bridge/display-connector.c    |  6 ++---
 drivers/gpu/drm/bridge/fsl-ldb.c              |  6 ++---
 drivers/gpu/drm/bridge/imx/imx8qm-ldb-drv.c   |  6 ++---
 drivers/gpu/drm/bridge/imx/imx8qxp-ldb-drv.c  |  6 ++---
 .../drm/bridge/imx/imx8qxp-pixel-combiner.c   |  6 ++---
 .../gpu/drm/bridge/imx/imx8qxp-pixel-link.c   |  6 ++---
 drivers/gpu/drm/bridge/imx/imx8qxp-pxl2dpi.c  |  6 ++---
 drivers/gpu/drm/bridge/lvds-codec.c           |  6 ++---
 drivers/gpu/drm/bridge/nwl-dsi.c              |  5 ++---
 drivers/gpu/drm/bridge/simple-bridge.c        |  6 ++---
 .../drm/bridge/synopsys/dw-hdmi-ahb-audio.c   |  6 ++---
 drivers/gpu/drm/bridge/synopsys/dw-hdmi-cec.c |  6 ++---
 .../drm/bridge/synopsys/dw-hdmi-gp-audio.c    |  6 ++---
 .../drm/bridge/synopsys/dw-hdmi-i2s-audio.c   |  6 ++---
 drivers/gpu/drm/bridge/thc63lvd1024.c         |  6 ++---
 drivers/gpu/drm/bridge/ti-tfp410.c            |  6 ++---
 18 files changed, 44 insertions(+), 79 deletions(-)


base-commit: fe15c26ee26efa11741a7b632e9f23b01aca4cc6
-- 
2.39.2




More information about the linux-arm-kernel mailing list