From: Arnd Bergmann <arnd@arndb.de>
To: Eduardo Valentin <edubezval@gmail.com>, Wei Ni <wni@nvidia.com>
Cc: Arnd Bergmann <arnd@arndb.de>, Zhang Rui <rui.zhang@intel.com>,
Stephen Warren <swarren@wwwdotorg.org>,
Thierry Reding <thierry.reding@gmail.com>,
Alexandre Courbot <gnurou@gmail.com>,
linux-pm@vger.kernel.org, linux-tegra@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH] thermal: tegra: mark PM functions __maybe_unused
Date: Sat, 16 Apr 2016 22:19:33 +0200 [thread overview]
Message-ID: <1460838026-1242452-1-git-send-email-arnd@arndb.de> (raw)
After the PM support has been added to this driver, we get
a harmless warning when that support is disabled at compile
time:
drivers/thermal/tegra/soctherm.c:641:12: error: 'soctherm_resume' defined but not used [-Werror=unused-function]
static int soctherm_resume(struct device *dev)
This marks the two PM functions as __maybe_unused to shut up
the warning. This is preferred over adding an #ifdef around
them, as it is harder to get wrong, and provides better
compile-time coverage.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: a134b4143b65 ("thermal: tegra: add PM support")
---
drivers/thermal/tegra/soctherm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/thermal/tegra/soctherm.c b/drivers/thermal/tegra/soctherm.c
index 559c74279eb8..be829d6e131c 100644
--- a/drivers/thermal/tegra/soctherm.c
+++ b/drivers/thermal/tegra/soctherm.c
@@ -629,7 +629,7 @@ static int tegra_soctherm_remove(struct platform_device *pdev)
return 0;
}
-static int soctherm_suspend(struct device *dev)
+static int __maybe_unused soctherm_suspend(struct device *dev)
{
struct platform_device *pdev = to_platform_device(dev);
@@ -638,7 +638,7 @@ static int soctherm_suspend(struct device *dev)
return 0;
}
-static int soctherm_resume(struct device *dev)
+static int __maybe_unused soctherm_resume(struct device *dev)
{
struct platform_device *pdev = to_platform_device(dev);
struct tegra_soctherm *tegra = platform_get_drvdata(pdev);
--
2.7.0
next reply other threads:[~2016-04-16 20:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-16 20:19 Arnd Bergmann [this message]
2016-04-18 7:15 ` Thierry Reding
2016-04-19 2:35 ` Wei Ni
2016-04-19 12:43 ` Thierry Reding
2016-04-20 6:44 ` Wei Ni
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=1460838026-1242452-1-git-send-email-arnd@arndb.de \
--to=arnd@arndb.de \
--cc=edubezval@gmail.com \
--cc=gnurou@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=rui.zhang@intel.com \
--cc=swarren@wwwdotorg.org \
--cc=thierry.reding@gmail.com \
--cc=wni@nvidia.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
all inboxes | Powered by JetHome®