]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
host1x: Make remove callback return void
authorUwe Kleine-König <u.kleine-koenig@baylibre.com>
Wed, 10 Dec 2025 08:31:37 +0000 (09:31 +0100)
committerThierry Reding <treding@nvidia.com>
Tue, 13 Jan 2026 11:25:38 +0000 (12:25 +0100)
The return value of struct device_driver::remove is ignored by the core
(see device_remove() in drivers/base/dd.c). So it doesn't make sense to
let the host1x remove callback return an int just to ignore it later.

So make the callback return void. All current implementors return 0, so
they are easily converted.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Tested-by: Luca Ceresoli <luca.ceresoli@bootlin.com> # tegra20 tegra-video
Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://patch.msgid.link/d364fd4ec043d36ee12e46eaef98c57658884f63.1765355236.git.u.kleine-koenig@baylibre.com
drivers/crypto/tegra/tegra-se-main.c
drivers/gpu/drm/tegra/drm.c
drivers/gpu/host1x/bus.c
drivers/staging/media/tegra-video/video.c
include/linux/host1x.h

index 7237f14eaf5ae499a0eec2871c98134a042ced6c..4e7115b247e7fd0b4e91f324148d1b033200e6fb 100644 (file)
@@ -401,11 +401,9 @@ static int tegra_se_host1x_probe(struct host1x_device *dev)
        return host1x_device_init(dev);
 }
 
-static int tegra_se_host1x_remove(struct host1x_device *dev)
+static void tegra_se_host1x_remove(struct host1x_device *dev)
 {
        host1x_device_exit(dev);
-
-       return 0;
 }
 
 static struct host1x_driver tegra_se_host1x_driver = {
index 1d18d43292dc7282a0c3b90fa0fdd5e7fbc54ba2..f7222819d67214ccefffdc0cd4e04f0503efb1f4 100644 (file)
@@ -1301,7 +1301,7 @@ put:
        return err;
 }
 
-static int host1x_drm_remove(struct host1x_device *dev)
+static void host1x_drm_remove(struct host1x_device *dev)
 {
        struct drm_device *drm = dev_get_drvdata(&dev->dev);
        struct tegra_drm *tegra = drm->dev_private;
@@ -1330,8 +1330,6 @@ static int host1x_drm_remove(struct host1x_device *dev)
 
        kfree(tegra);
        drm_dev_put(drm);
-
-       return 0;
 }
 
 static void host1x_drm_shutdown(struct host1x_device *dev)
index 723a80895cd43bde840adf8d26812e82d12385ab..ceb8212fa8c98ea08dbdc2f666c59361228c8643 100644 (file)
@@ -640,7 +640,7 @@ static int host1x_device_remove(struct device *dev)
        struct host1x_device *device = to_host1x_device(dev);
 
        if (driver->remove)
-               return driver->remove(device);
+               driver->remove(device);
 
        return 0;
 }
index 074ad0dc56ca85bfb92839b62149b7c97555ed57..68783d5ffeb165eee49cc4e0c59f528ec5152fe3 100644 (file)
@@ -107,7 +107,7 @@ cleanup:
        return ret;
 }
 
-static int host1x_video_remove(struct host1x_device *dev)
+static void host1x_video_remove(struct host1x_device *dev)
 {
        struct tegra_video_device *vid = dev_get_drvdata(&dev->dev);
 
@@ -118,8 +118,6 @@ static int host1x_video_remove(struct host1x_device *dev)
 
        /* This calls v4l2_dev release callback on last reference */
        v4l2_device_put(&vid->v4l2_dev);
-
-       return 0;
 }
 
 static const struct of_device_id host1x_video_subdevs[] = {
index 9fa9c30a34e65eb04351136750ac71ccd0b26ba0..5e7a63143a4acfae74540394d5cce41319255c33 100644 (file)
@@ -380,7 +380,7 @@ struct host1x_driver {
        struct list_head list;
 
        int (*probe)(struct host1x_device *device);
-       int (*remove)(struct host1x_device *device);
+       void (*remove)(struct host1x_device *device);
        void (*shutdown)(struct host1x_device *device);
 };