From: Vincenzo Frascino <vincenzo.frascino@arm.com>
To: thierry.reding@gmail.com, airlied@linux.ie, daniel@ffwll.ch,
jonathanh@nvidia.com
Cc: dri-devel@lists.freedesktop.org, linux-tegra@vger.kernel.org,
linux-kernel@vger.kernel.org, vincenzo.frascino@arm.com
Subject: [PATCH] drm: tegra: Fix warning in PM ops
Date: Wed, 22 Jan 2020 12:19:51 +0000 [thread overview]
Message-ID: <20200122121951.52639-1-vincenzo.frascino@arm.com> (raw)
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@gmail.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Jonathan Hunter <jonathanh@nvidia.com>
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.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
reply other threads:[~2020-01-22 12:20 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200122121951.52639-1-vincenzo.frascino@arm.com \
--to=vincenzo.frascino@arm.com \
--cc=airlied@linux.ie \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=jonathanh@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=thierry.reding@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).