From: Arnd Bergmann <arnd@arndb.de>
To: Liam Girdwood <lgirdwood@gmail.com>, Mark Brown <broonie@kernel.org>
Cc: linux-kernel@vger.kernel.org, Sascha Hauer <s.hauer@pengutronix.de>
Subject: [PATCH] regulator: core: mark lock functions as __maybe_unused
Date: Wed, 07 Oct 2015 12:12:09 +0200 [thread overview]
Message-ID: <6130994.OMIWUN9F6x@wuerfel> (raw)
Commit 9f01cd4a915e1 ("regulator: core: introduce function to lock
regulators and its supplies") introduced a pair of new functions
that are marked static but so far not used, which causes annoying
but harmless compiler warnings:
drivers/regulator/core.c:139:13: warning: 'regulator_lock_supply' defined but not used [-Wunused-function]
static void regulator_lock_supply(struct regulator_dev *rdev)
The best way to avoid these would be to add the code that will
use these functions. If that still takes a while, this patch
at least shuts up the compiler by marking the functions
as __maybe_unused. The same could be achieved by marking them
as static inline or non-static, or by hiding them from the
compiler, but those seemed less appropriate.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 7896ef53ff86..96dd7e1f1f28 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -136,7 +136,7 @@ static bool have_full_constraints(void)
* regulator_lock_supply - lock a regulator and its supplies
* @rdev: regulator source
*/
-static void regulator_lock_supply(struct regulator_dev *rdev)
+static void __maybe_unused regulator_lock_supply(struct regulator_dev *rdev)
{
struct regulator *supply;
int i = 0;
@@ -156,7 +156,7 @@ static void regulator_lock_supply(struct regulator_dev *rdev)
* regulator_unlock_supply - unlock a regulator and its supplies
* @rdev: regulator source
*/
-static void regulator_unlock_supply(struct regulator_dev *rdev)
+static void __maybe_unused regulator_unlock_supply(struct regulator_dev *rdev)
{
struct regulator *supply;
next reply other threads:[~2015-10-07 10:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-07 10:12 Arnd Bergmann [this message]
2015-10-07 10:24 ` Mark Brown
2015-10-07 14:01 ` Sascha Hauer
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=6130994.OMIWUN9F6x@wuerfel \
--to=arnd@arndb.de \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=s.hauer@pengutronix.de \
/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®