[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20200122121951.52639-1-vincenzo.frascino@arm.com>
Date: Wed, 22 Jan 2020 12:19:51 +0000
From: Vincenzo Frascino <vincenzo.frascino@....com>
To: thierry.reding@...il.com, airlied@...ux.ie, daniel@...ll.ch,
jonathanh@...dia.com
Cc: dri-devel@...ts.freedesktop.org, linux-tegra@...r.kernel.org,
linux-kernel@...r.kernel.org, vincenzo.frascino@....com
Subject: [PATCH] drm: tegra: Fix warning in PM ops
The tegra driver can be compiled without CONFIG_PM_SLEEP enabled.
In this case the compilation triggers the warning below:
drivers/gpu/drm/tegra/sor.c:3984:12: warning: ‘tegra_sor_resume’
defined but not used [-Wunused-function]
3984 | static int tegra_sor_resume(struct device *dev)
| ^~~~~~~~~~~~~~~~
drivers/gpu/drm/tegra/sor.c:3970:12: warning: ‘tegra_sor_suspend’
defined but not used [-Wunused-function]
3970 | static int tegra_sor_suspend(struct device *dev)
| ^~~~~~~~~~~~~~~~~
Fix the warning adding __maybe_unused to the PM functions.
Cc: Thierry Reding <thierry.reding@...il.com>
Cc: David Airlie <airlied@...ux.ie>
Cc: Daniel Vetter <daniel@...ll.ch>
Cc: Jonathan Hunter <jonathanh@...dia.com>
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@....com>
---
drivers/gpu/drm/tegra/sor.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/tegra/sor.c b/drivers/gpu/drm/tegra/sor.c
index a68d3b36b972..69b9ebee7486 100644
--- a/drivers/gpu/drm/tegra/sor.c
+++ b/drivers/gpu/drm/tegra/sor.c
@@ -3912,7 +3912,7 @@ static int tegra_sor_remove(struct platform_device *pdev)
return 0;
}
-static int tegra_sor_runtime_suspend(struct device *dev)
+static int __maybe_unused tegra_sor_runtime_suspend(struct device *dev)
{
struct tegra_sor *sor = dev_get_drvdata(dev);
int err;
@@ -3934,7 +3934,7 @@ static int tegra_sor_runtime_suspend(struct device *dev)
return 0;
}
-static int tegra_sor_runtime_resume(struct device *dev)
+static int __maybe_unused tegra_sor_runtime_resume(struct device *dev)
{
struct tegra_sor *sor = dev_get_drvdata(dev);
int err;
@@ -3967,7 +3967,7 @@ static int tegra_sor_runtime_resume(struct device *dev)
return 0;
}
-static int tegra_sor_suspend(struct device *dev)
+static int __maybe_unused tegra_sor_suspend(struct device *dev)
{
struct tegra_sor *sor = dev_get_drvdata(dev);
int err;
@@ -3981,7 +3981,7 @@ static int tegra_sor_suspend(struct device *dev)
return 0;
}
-static int tegra_sor_resume(struct device *dev)
+static int __maybe_unused tegra_sor_resume(struct device *dev)
{
struct tegra_sor *sor = dev_get_drvdata(dev);
int err;
--
2.25.0
Powered by blists - more mailing lists