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]
Message-Id: <1444218854-17944-1-git-send-email-sudipm.mukherjee@gmail.com>
Date:	Wed,  7 Oct 2015 17:24:14 +0530
From:	Sudip Mukherjee <sudipm.mukherjee@...il.com>
To:	Liam Girdwood <lgirdwood@...il.com>,
	Mark Brown <broonie@...nel.org>
Cc:	linux-kernel@...r.kernel.org,
	Sudip Mukherjee <sudipm.mukherjee@...il.com>
Subject: [PATCH] regulator: core: fix build warning

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