public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] regulator: Fix up a confusing dev_warn when regulator_get fails
@ 2012-03-16 10:20 Rajendra Nayak
  2012-03-16 19:26 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Rajendra Nayak @ 2012-03-16 10:20 UTC (permalink / raw)
  To: broonie, lrg; +Cc: linux-kernel, Rajendra Nayak

of_parse_phandle() returns NULL either if the property name
itself does not exist or if it (exists and) does not
reference a valid phandle.
Giving out a warn like the one below (that the property references
an invalid phandle) can be confusing when the property itself
does not exist in the node.
Fix it with a more sensible message and make it a dev_dbg instead
of a dev_warn.

Reported-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Rajendra Nayak <rnayak@ti.com>
---
 drivers/regulator/core.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 5a6b8ba..e2f3afa 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -148,7 +148,7 @@ static struct device_node *of_get_regulator(struct device *dev, const char *supp
 	regnode = of_parse_phandle(dev->of_node, prop_name, 0);
 
 	if (!regnode) {
-		dev_warn(dev, "%s property in node %s references invalid phandle",
+		dev_dbg(dev, "Looking up %s property in node %s failed",
 				prop_name, dev->of_node->full_name);
 		return NULL;
 	}
-- 
1.7.1


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

* Re: [PATCH] regulator: Fix up a confusing dev_warn when regulator_get fails
  2012-03-16 10:20 [PATCH] regulator: Fix up a confusing dev_warn when regulator_get fails Rajendra Nayak
@ 2012-03-16 19:26 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2012-03-16 19:26 UTC (permalink / raw)
  To: Rajendra Nayak; +Cc: lrg, linux-kernel

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

On Fri, Mar 16, 2012 at 03:50:21PM +0530, Rajendra Nayak wrote:
> of_parse_phandle() returns NULL either if the property name
> itself does not exist or if it (exists and) does not
> reference a valid phandle.

Applied, thanks (tweaked the subject line to say DT instead).

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

end of thread, other threads:[~2012-03-16 19:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-16 10:20 [PATCH] regulator: Fix up a confusing dev_warn when regulator_get fails Rajendra Nayak
2012-03-16 19:26 ` Mark Brown

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