[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1453813753-32128-1-git-send-email-ynorov@caviumnetworks.com>
Date: Tue, 26 Jan 2016 16:09:13 +0300
From: Yury Norov <ynorov@...iumnetworks.com>
To: <s.hauer@...gutronix.de>, <broonie@...nel.org>
CC: <lgirdwood@...il.com>, <linux-kernel@...r.kernel.org>,
Yury Norov <ynorov@...iumnetworks.com>
Subject: [PATCH] drivers: regulator: core: fix 'unused' warning
Patch 9f01cd4a91 (regulator: core: introduce function to lock
regulators and its supplies) introduces function
regulator_lock_supply(). On my kernel it causes compile-time
error:
drivers/regulator/core.c: In function ‘regulator_lock_supply’:
drivers/regulator/core.c:142:6: warning: unused variable ‘i’ [-Wunused-variable]
int i = 0;
Please pull this fix.
Signed-off-by: Yury Norov <ynorov@...iumnetworks.com>
---
drivers/regulator/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 73b7683..2453bce 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -139,7 +139,7 @@ static bool have_full_constraints(void)
static void regulator_lock_supply(struct regulator_dev *rdev)
{
struct regulator *supply;
- int i = 0;
+ int __maybe_unused i = 0;
while (1) {
mutex_lock_nested(&rdev->mutex, i++);
--
2.5.0
Powered by blists - more mailing lists