lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 07 Oct 2015 12:12:09 +0200
From:	Arnd Bergmann <arnd@...db.de>
To:	Liam Girdwood <lgirdwood@...il.com>,
	Mark Brown <broonie@...nel.org>
Cc:	linux-kernel@...r.kernel.org, Sascha Hauer <s.hauer@...gutronix.de>
Subject: [PATCH] regulator: core: mark lock functions as __maybe_unused

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@...db.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;
 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ