mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yury Norov <ynorov@caviumnetworks.com>
To: <s.hauer@pengutronix.de>, <broonie@kernel.org>
Cc: <lgirdwood@gmail.com>, <linux-kernel@vger.kernel.org>,
	Yury Norov <ynorov@caviumnetworks.com>
Subject: [PATCH] drivers: regulator: core: fix 'unused' warning
Date: Tue, 26 Jan 2016 16:09:13 +0300	[thread overview]
Message-ID: <1453813753-32128-1-git-send-email-ynorov@caviumnetworks.com> (raw)

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

             reply	other threads:[~2016-01-26 13:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-26 13:09 Yury Norov [this message]
2016-01-26 15:21 ` Mark Brown

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=1453813753-32128-1-git-send-email-ynorov@caviumnetworks.com \
    --to=ynorov@caviumnetworks.com \
    --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®