linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] regulator: core: do not report EPROBE_DEFER as error.
@ 2019-04-17  8:54 Jorge Ramirez-Ortiz
  2019-04-17 15:46 ` Mark Brown
  0 siblings, 1 reply; 4+ messages in thread
From: Jorge Ramirez-Ortiz @ 2019-04-17  8:54 UTC (permalink / raw)
  To: jorge.ramirez-ortiz, lgirdwood, broonie; +Cc: linux-kernel, khasim.mohammed

Do not log a temporary failure to get a regulator (EPROBE_DEFER) while
the driver is requesting retries.

Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
---
 drivers/regulator/core.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 186a37675b50..0ca18bbdcd32 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -4342,8 +4342,9 @@ int regulator_bulk_get(struct device *dev, int num_consumers,
 						      consumers[i].supply);
 		if (IS_ERR(consumers[i].consumer)) {
 			ret = PTR_ERR(consumers[i].consumer);
-			dev_err(dev, "Failed to get supply '%s': %d\n",
-				consumers[i].supply, ret);
+			if (ret != -EPROBE_DEFER)
+				dev_err(dev, "Failed to get supply '%s': %d\n",
+					consumers[i].supply, ret);
 			consumers[i].consumer = NULL;
 			goto err;
 		}
-- 
2.21.0


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

* Re: [PATCH] regulator: core: do not report EPROBE_DEFER as error.
  2019-04-17  8:54 [PATCH] regulator: core: do not report EPROBE_DEFER as error Jorge Ramirez-Ortiz
@ 2019-04-17 15:46 ` Mark Brown
  2019-04-17 17:05   ` Jorge Ramirez
  0 siblings, 1 reply; 4+ messages in thread
From: Mark Brown @ 2019-04-17 15:46 UTC (permalink / raw)
  To: Jorge Ramirez-Ortiz; +Cc: lgirdwood, linux-kernel, khasim.mohammed

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

On Wed, Apr 17, 2019 at 10:54:11AM +0200, Jorge Ramirez-Ortiz wrote:
> Do not log a temporary failure to get a regulator (EPROBE_DEFER) while
> the driver is requesting retries.

> -			dev_err(dev, "Failed to get supply '%s': %d\n",
> -				consumers[i].supply, ret);
> +			if (ret != -EPROBE_DEFER)
> +				dev_err(dev, "Failed to get supply '%s': %d\n",
> +					consumers[i].supply, ret);

Please leave at least a debug log in place, it's not good to just
silently fail - even if we will retry someone might still need some help
debugging (eg, figuring out that they need to enable whatever driver is
providing the supply in their config) so we should tell them why we're
deferring.

BTW does an e-mail address need updating somewhere here?

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

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

* Re: [PATCH] regulator: core: do not report EPROBE_DEFER as error.
  2019-04-17 15:46 ` Mark Brown
@ 2019-04-17 17:05   ` Jorge Ramirez
  2019-04-17 17:30     ` Mark Brown
  0 siblings, 1 reply; 4+ messages in thread
From: Jorge Ramirez @ 2019-04-17 17:05 UTC (permalink / raw)
  To: Mark Brown; +Cc: lgirdwood, linux-kernel, khasim.mohammed

On 4/17/19 17:46, Mark Brown wrote:
> On Wed, Apr 17, 2019 at 10:54:11AM +0200, Jorge Ramirez-Ortiz wrote:
>> Do not log a temporary failure to get a regulator (EPROBE_DEFER) while
>> the driver is requesting retries.
> 
>> -			dev_err(dev, "Failed to get supply '%s': %d\n",
>> -				consumers[i].supply, ret);
>> +			if (ret != -EPROBE_DEFER)
>> +				dev_err(dev, "Failed to get supply '%s': %d\n",
>> +					consumers[i].supply, ret);
> 
> Please leave at least a debug log in place, it's not good to just
> silently fail - even if we will retry someone might still need some help
> debugging (eg, figuring out that they need to enable whatever driver is
> providing the supply in their config) so we should tell them why we're
> deferring.


you mean replacing dev_err with dev_dbg on all cases or only on defer
leaving  dev_err on the rest?


> 
> BTW does an e-mail address need updating somewhere here?
> 

dont know, whose email? I got these from get_maintainer.pl (below); or
are you referring to mine (in which case it is correct, I am back at
least for a bit longer)

Liam Girdwood <lgirdwood@gmail.com> (supporter:VOLTAGE AND CURRENT
REGULATOR FRAMEWORK)
Mark Brown <broonie@kernel.org> (supporter:VOLTAGE AND CURRENT REGULATOR
FRAMEWORK)
linux-kernel@vger.kernel.org (open list:VOLTAGE AND CURRENT REGULATOR
FRAMEWORK)

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

* Re: [PATCH] regulator: core: do not report EPROBE_DEFER as error.
  2019-04-17 17:05   ` Jorge Ramirez
@ 2019-04-17 17:30     ` Mark Brown
  0 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2019-04-17 17:30 UTC (permalink / raw)
  To: Jorge Ramirez; +Cc: lgirdwood, linux-kernel, khasim.mohammed

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

On Wed, Apr 17, 2019 at 07:05:52PM +0200, Jorge Ramirez wrote:
> On 4/17/19 17:46, Mark Brown wrote:

> > Please leave at least a debug log in place, it's not good to just
> > silently fail - even if we will retry someone might still need some help
> > debugging (eg, figuring out that they need to enable whatever driver is
> > providing the supply in their config) so we should tell them why we're
> > deferring.

> you mean replacing dev_err with dev_dbg on all cases or only on defer
> leaving  dev_err on the rest?

Only on defer.

> > BTW does an e-mail address need updating somewhere here?

> dont know, whose email? I got these from get_maintainer.pl (below); or
> are you referring to mine (in which case it is correct, I am back at
> least for a bit longer)

It was yours - you didn't show up in meet the team yet so I wasn't clear
if it was just an old patch where the e-mail address had been copied
over.

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

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

end of thread, other threads:[~2019-04-17 17:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-17  8:54 [PATCH] regulator: core: do not report EPROBE_DEFER as error Jorge Ramirez-Ortiz
2019-04-17 15:46 ` Mark Brown
2019-04-17 17:05   ` Jorge Ramirez
2019-04-17 17:30     ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).