[PATCH 00/12] drm/tegra: Convert to platform remove callback returning void

Uwe Kleine-König u.kleine-koenig at pengutronix.de
Wed Mar 22 17:02:11 UTC 2023


Hello,

this series adapts the platform drivers below drivers/gpu/drm/tegra 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 two patches are simplifications that make it obvious that all
remove callbacks always return zero. After that all drivers can be
converted trivially.

Best regards
Uwe

Uwe Kleine-König (12):
  gpu: host1x: Make host1x_client_unregister() return void
  drm/tegra: rgb: Make tegra_dc_rgb_remove() return void
  drm/tegra: dc: Convert to platform remove callback returning void
  drm/tegra: dpaux: Convert to platform remove callback returning void
  drm/tegra: dsi: Convert to platform remove callback returning void
  drm/tegra: gr2d: Convert to platform remove callback returning void
  drm/tegra: gr3d: Convert to platform remove callback returning void
  drm/tegra: hdmi: Convert to platform remove callback returning void
  drm/tegra: hub: Convert to platform remove callback returning void
  drm/tegra: nvdec: Convert to platform remove callback returning void
  drm/tegra: sor: Convert to platform remove callback returning void
  drm/tegra: vic: Convert to platform remove callback returning void

 drivers/gpu/drm/tegra/dc.c              | 20 ++++----------------
 drivers/gpu/drm/tegra/dc.h              |  2 +-
 drivers/gpu/drm/tegra/dpaux.c           |  6 ++----
 drivers/gpu/drm/tegra/dsi.c             | 14 +++-----------
 drivers/gpu/drm/tegra/gr2d.c            | 14 +++-----------
 drivers/gpu/drm/tegra/gr3d.c            | 14 +++-----------
 drivers/gpu/drm/tegra/hdmi.c            | 14 +++-----------
 drivers/gpu/drm/tegra/hub.c             | 13 +++----------
 drivers/gpu/drm/tegra/nvdec.c           | 14 +++-----------
 drivers/gpu/drm/tegra/rgb.c             |  6 ++----
 drivers/gpu/drm/tegra/sor.c             | 14 +++-----------
 drivers/gpu/drm/tegra/vic.c             | 14 +++-----------
 drivers/gpu/host1x/bus.c                |  6 ++----
 drivers/staging/media/tegra-video/csi.c |  8 +-------
 drivers/staging/media/tegra-video/vi.c  |  8 +-------
 include/linux/host1x.h                  |  2 +-
 16 files changed, 38 insertions(+), 131 deletions(-)

base-commit: fe15c26ee26efa11741a7b632e9f23b01aca4cc6
-- 
2.39.2



More information about the dri-devel mailing list