mbox series

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

Message ID 20230322170223.410376-1-u.kleine-koenig@pengutronix.de
Headers show
Series drm/tegra: Convert to platform remove callback returning void | expand

Message

Uwe Kleine-König March 22, 2023, 5:02 p.m. UTC
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

Comments

Thierry Reding April 4, 2023, 12:14 p.m. UTC | #1
From: Thierry Reding <treding@nvidia.com>

On Wed, 22 Mar 2023 18:02:11 +0100, Uwe Kleine-König wrote:
> 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.
> 
> [...]

Applied, thanks!

[01/12] gpu: host1x: Make host1x_client_unregister() return void
        commit: 1d83d1a2df0bfb6bd79400746c289e2c4edc5909
[02/12] drm/tegra: rgb: Make tegra_dc_rgb_remove() return void
        commit: bbf9c91c6efaabbd4be0b894d9b753a69a5e02b6
[03/12] drm/tegra: dc: Convert to platform remove callback returning void
        commit: 902a0ab485b6f2b37450635b82b91cd17e8aa608
[04/12] drm/tegra: dpaux: Convert to platform remove callback returning void
        commit: 1255aa402c5c8e07ef6d453474ef1bd25651b420
[05/12] drm/tegra: dsi: Convert to platform remove callback returning void
        commit: 6e470293da9d83569373f83655fdd851bd4dd1d2
[06/12] drm/tegra: gr2d: Convert to platform remove callback returning void
        commit: f7140bd214d5f55dbd2096673290c8bc2bb6121c
[07/12] drm/tegra: gr3d: Convert to platform remove callback returning void
        commit: d2c29d8095c82eae11af29f8857e854f40186f59
[08/12] drm/tegra: hdmi: Convert to platform remove callback returning void
        commit: a3365945203bc6c75f8323ce7df38f1a91600ce7
[09/12] drm/tegra: hub: Convert to platform remove callback returning void
        commit: a407ae48ac9f72f719c6598fe61d03e6b8687349
[10/12] drm/tegra: nvdec: Convert to platform remove callback returning void
        commit: 222ace4a40bf5b2beafe7e4a226fab673360d689
[11/12] drm/tegra: sor: Convert to platform remove callback returning void
        commit: b674031a7bbda964741e0fa961cca8ca6b5faae2
[12/12] drm/tegra: vic: Convert to platform remove callback returning void
        commit: ba0fe014a9ebd5e578d52b2f6521591d409b8f61

Best regards,