mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] drivers: regulator: core: fix 'unused' warning
@ 2016-01-26 13:09 Yury Norov
  2016-01-26 15:21 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Yury Norov @ 2016-01-26 13:09 UTC (permalink / raw)
  To: s.hauer, broonie; +Cc: lgirdwood, linux-kernel, Yury Norov

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@caviumnetworks.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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] drivers: regulator: core: fix 'unused' warning
  2016-01-26 13:09 [PATCH] drivers: regulator: core: fix 'unused' warning Yury Norov
@ 2016-01-26 15:21 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2016-01-26 15:21 UTC (permalink / raw)
  To: Yury Norov; +Cc: s.hauer, lgirdwood, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 451 bytes --]

On Tue, Jan 26, 2016 at 04:09:13PM +0300, Yury Norov wrote:
> 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]

You're not seeing this in mainline...

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-01-26 15:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-26 13:09 [PATCH] drivers: regulator: core: fix 'unused' warning Yury Norov
2016-01-26 15:21 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome