From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] PM / Domains: mark genpd_poweron as __maybe_unused
Date: Mon, 01 Feb 2016 11:38:43 +0100 [thread overview]
Message-ID: <3864075.BdhPDUQ9fB@wuerfel> (raw)
The rework of the power domain code has made the genpd_poweron()
function local to the file it's defined in, and the only remaining
caller is conditionally compiled based on CONFIG_PM_GENERIC_DOMAINS_OF,
so we get a warning when that is disabled:
drivers/base/power/domain.c:234:12: error: 'genpd_poweron' defined but not used [-Werror=unused-function]
This adds a __maybe_unused annotation to the function so gcc can
figure out by itself that it should silently remove the definition
in this case.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: ea823c7cbffa ("PM / Domains: Remove pm_genpd_poweron() API")
diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
index 784dbe897a5e..a14b2f1ae085 100644
--- a/drivers/base/power/domain.c
+++ b/drivers/base/power/domain.c
@@ -231,7 +231,7 @@ static int __genpd_poweron(struct generic_pm_domain *genpd, unsigned int depth)
* genpd_poweron - Restore power to a given PM domain and its masters.
* @genpd: PM domain to power up.
*/
-static int genpd_poweron(struct generic_pm_domain *genpd)
+static int __maybe_unused genpd_poweron(struct generic_pm_domain *genpd)
{
int ret;
next reply other threads:[~2016-02-01 10:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-01 10:38 Arnd Bergmann [this message]
2016-02-01 13:57 ` [PATCH] PM / Domains: mark genpd_poweron as __maybe_unused Ulf Hansson
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=3864075.BdhPDUQ9fB@wuerfel \
--to=arnd@arndb.de \
--cc=linux-arm-kernel@lists.infradead.org \
/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