Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1241408 > unrolled thread

[PATCH] regulator: core: fix build warning

Started bySudip Mukherjee <sudipm.mukherjee@gmail.com>
First post2015-10-07 14:00 +0200
Last post2015-10-07 16:00 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] regulator: core: fix build warning Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-10-07 14:00 +0200
    Re: [PATCH] regulator: core: fix build warning Mark Brown <broonie@kernel.org> - 2015-10-07 16:00 +0200

#1241408 — [PATCH] regulator: core: fix build warning

FromSudip Mukherjee <sudipm.mukherjee@gmail.com>
Date2015-10-07 14:00 +0200
Subject[PATCH] regulator: core: fix build warning
Message-ID<qgVy1-3SB-7@gated-at.bofh.it>
We were getting warning about:
warning: 'regulator_lock_supply' defined but not used
warning: 'regulator_unlock_supply' defined but not used

It appears that there is no user of regulator_lock_supply() and
regulator_unlock_supply().
Commit 9f01cd4a915e ("regulator: core: introduce function to lock
regulators and its supplies") says there will be future users, but as of
now there is no user and is creating build warnings.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---
 drivers/regulator/core.c | 39 ---------------------------------------
 1 file changed, 39 deletions(-)

diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 7896ef5..3ba7131 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -133,45 +133,6 @@ 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)
-{
-	struct regulator *supply;
-	int i = 0;
-
-	while (1) {
-		mutex_lock_nested(&rdev->mutex, i++);
-		supply = rdev->supply;
-
-		if (!rdev->supply)
-			return;
-
-		rdev = supply->rdev;
-	}
-}
-
-/**
- * regulator_unlock_supply - unlock a regulator and its supplies
- * @rdev:         regulator source
- */
-static void regulator_unlock_supply(struct regulator_dev *rdev)
-{
-	struct regulator *supply;
-
-	while (1) {
-		mutex_unlock(&rdev->mutex);
-		supply = rdev->supply;
-
-		if (!rdev->supply)
-			return;
-
-		rdev = supply->rdev;
-	}
-}
-
-/**
  * of_get_regulator - get a regulator device node based on supply name
  * @dev: Device pointer for the consumer (of regulator) device
  * @supply: regulator supply name
-- 
1.9.1

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

[toc] | [next] | [standalone]


#1241523

FromMark Brown <broonie@kernel.org>
Date2015-10-07 16:00 +0200
Message-ID<qgXqb-6Da-23@gated-at.bofh.it>
In reply to#1241408

[Multipart message — attachments visible in raw view] — view raw

On Wed, Oct 07, 2015 at 05:24:14PM +0530, Sudip Mukherjee wrote:
> We were getting warning about:
> warning: 'regulator_lock_supply' defined but not used
> warning: 'regulator_unlock_supply' defined but not used
> 
> It appears that there is no user of regulator_lock_supply() and
> regulator_unlock_supply().
> Commit 9f01cd4a915e ("regulator: core: introduce function to lock
> regulators and its supplies") says there will be future users, but as of
> now there is no user and is creating build warnings.

No, there are other parts of the series in review - the earlier parts
are merged now so that we don't have to constantly re-review them.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web