omapdrm: dss: mark runtime PM functions __maybe_unused
authorArnd Bergmann <arnd@arndb.de>
Sun, 5 Dec 2021 13:15:56 +0000 (14:15 +0100)
committerTomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Wed, 8 Dec 2021 08:04:59 +0000 (10:04 +0200)
Using the SET_RUNTIME_PM_OPS() macro causes a warning about the
referenced functions when they are marked static but not __maybe_unused:

drivers/gpu/drm/omapdrm/dss/dss.c:1572:12: error: unused function 'dss_runtime_suspend' [-Werror,-Wunused-function]
drivers/gpu/drm/omapdrm/dss/dss.c:1584:12: error: unused function 'dss_runtime_resume' [-Werror,-Wunused-function]
drivers/gpu/drm/omapdrm/dss/dispc.c:4845:12: error: unused function 'dispc_runtime_suspend' [-Werror,-Wunused-function]
drivers/gpu/drm/omapdrm/dss/dispc.c:4860:12: error: unused function 'dispc_runtime_resume' [-Werror,-Wunused-function]

Fixes: b92f7ea556f8 ("drm/omap: dss: Make use of the helper macro SET_RUNTIME_PM_OPS()")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20211205131612.3192652-1-arnd@kernel.org
drivers/gpu/drm/omapdrm/dss/dispc.c
drivers/gpu/drm/omapdrm/dss/dsi.c
drivers/gpu/drm/omapdrm/dss/dss.c
drivers/gpu/drm/omapdrm/dss/venc.c

index 2da4d36a3446966d9c49cd4c11c859e03cad3a3a..c4de142cc85bf343626a183b8dc2aeb572ae28da 100644 (file)
@@ -4869,7 +4869,7 @@ static int dispc_remove(struct platform_device *pdev)
        return 0;
 }
 
-static int dispc_runtime_suspend(struct device *dev)
+static __maybe_unused int dispc_runtime_suspend(struct device *dev)
 {
        struct dispc_device *dispc = dev_get_drvdata(dev);
 
@@ -4884,7 +4884,7 @@ static int dispc_runtime_suspend(struct device *dev)
        return 0;
 }
 
-static int dispc_runtime_resume(struct device *dev)
+static __maybe_unused int dispc_runtime_resume(struct device *dev)
 {
        struct dispc_device *dispc = dev_get_drvdata(dev);
 
index d730bf67fed942d9962417aa9f80a35bfbe2236d..a6845856cbce4ba15957d57e762f92e0de7b01c2 100644 (file)
@@ -5058,7 +5058,7 @@ static int dsi_remove(struct platform_device *pdev)
        return 0;
 }
 
-static int dsi_runtime_suspend(struct device *dev)
+static __maybe_unused int dsi_runtime_suspend(struct device *dev)
 {
        struct dsi_data *dsi = dev_get_drvdata(dev);
 
@@ -5071,7 +5071,7 @@ static int dsi_runtime_suspend(struct device *dev)
        return 0;
 }
 
-static int dsi_runtime_resume(struct device *dev)
+static __maybe_unused int dsi_runtime_resume(struct device *dev)
 {
        struct dsi_data *dsi = dev_get_drvdata(dev);
 
index 66db28bfe824f3e8f5d8eaa60ca57645f5320349..69b3e15b93560df518b87d5ec54958e79a456f5c 100644 (file)
@@ -1569,7 +1569,7 @@ static void dss_shutdown(struct platform_device *pdev)
        DSSDBG("shutdown\n");
 }
 
-static int dss_runtime_suspend(struct device *dev)
+static __maybe_unused int dss_runtime_suspend(struct device *dev)
 {
        struct dss_device *dss = dev_get_drvdata(dev);
 
@@ -1581,7 +1581,7 @@ static int dss_runtime_suspend(struct device *dev)
        return 0;
 }
 
-static int dss_runtime_resume(struct device *dev)
+static __maybe_unused int dss_runtime_resume(struct device *dev)
 {
        struct dss_device *dss = dev_get_drvdata(dev);
        int r;
index 508fddd376cf701c8cd28f44e4b96d616101a682..4480b69ab5a78236bf25da6d9bcdfff4c438d5db 100644 (file)
@@ -879,7 +879,7 @@ static int venc_remove(struct platform_device *pdev)
        return 0;
 }
 
-static int venc_runtime_suspend(struct device *dev)
+static __maybe_unused int venc_runtime_suspend(struct device *dev)
 {
        struct venc_device *venc = dev_get_drvdata(dev);
 
@@ -889,7 +889,7 @@ static int venc_runtime_suspend(struct device *dev)
        return 0;
 }
 
-static int venc_runtime_resume(struct device *dev)
+static __maybe_unused int venc_runtime_resume(struct device *dev)
 {
        struct venc_device *venc = dev_get_drvdata(dev);