LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] drm/bridge: cdns-dsi: mark PM functions as __maybe_unused
@ 2018-05-03 13:54 Anders Roxell
  0 siblings, 0 replies; only message in thread
From: Anders Roxell @ 2018-05-03 13:54 UTC (permalink / raw)
  To: architt, a.hajda, airlied, Laurent.pinchart
  Cc: dri-devel, linux-kernel, Anders Roxell

The suspend/resume callbacks are now optional, leading to a warning when
they are unused:

drivers/gpu/drm/bridge/cdns-dsi.c:1353:12: warning: ‘cdns_dsi_suspend’
   defined but not used [-Wunused-function]
 static int cdns_dsi_suspend(struct device *dev)
            ^~~~~~~~~~~~~~~~
drivers/gpu/drm/bridge/cdns-dsi.c:1340:12: warning: ‘cdns_dsi_resume’
   defined but not used [-Wunused-function]
 static int cdns_dsi_resume(struct device *dev)
            ^~~~~~~~~~~~~~~

This marks the functions as __maybe_unused to avoid the warning.

Fixes: e19233955d9e ("drm/bridge: Add Cadence DSI driver")
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
---
 drivers/gpu/drm/bridge/cdns-dsi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/bridge/cdns-dsi.c b/drivers/gpu/drm/bridge/cdns-dsi.c
index c255fc3e1be5..f2d43f24acfb 100644
--- a/drivers/gpu/drm/bridge/cdns-dsi.c
+++ b/drivers/gpu/drm/bridge/cdns-dsi.c
@@ -1337,7 +1337,7 @@ static const struct mipi_dsi_host_ops cdns_dsi_ops = {
 	.transfer = cdns_dsi_transfer,
 };
 
-static int cdns_dsi_resume(struct device *dev)
+static int __maybe_unused cdns_dsi_resume(struct device *dev)
 {
 	struct cdns_dsi *dsi = dev_get_drvdata(dev);
 
@@ -1350,7 +1350,7 @@ static int cdns_dsi_resume(struct device *dev)
 	return 0;
 }
 
-static int cdns_dsi_suspend(struct device *dev)
+static int __maybe_unused cdns_dsi_suspend(struct device *dev)
 {
 	struct cdns_dsi *dsi = dev_get_drvdata(dev);
 
-- 
2.17.0

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-05-03 13:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-03 13:54 [PATCH] drm/bridge: cdns-dsi: mark PM functions as __maybe_unused Anders Roxell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).