All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] pwm: silently error on EPROBE_DEFER
@ 2017-05-23 16:05 ` Jerome Brunet
  0 siblings, 0 replies; 6+ messages in thread
From: Jerome Brunet @ 2017-05-23 16:05 UTC (permalink / raw)
  To: linus-amlogic

In of_pwm_chip, if we fail to get the pwm chip due to probe defer, we
shouldn't print an error message. Just be silent in this case.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
 drivers/pwm/core.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/pwm/core.c b/drivers/pwm/core.c
index a0860b30bd93..1581f6ab1b1f 100644
--- a/drivers/pwm/core.c
+++ b/drivers/pwm/core.c
@@ -678,7 +678,9 @@ struct pwm_device *of_pwm_get(struct device_node *np, const char *con_id)
 
 	pc = of_node_to_pwmchip(args.np);
 	if (IS_ERR(pc)) {
-		pr_err("%s(): PWM chip not found\n", __func__);
+		if (PTR_ERR(pc) != -EPROBE_DEFER)
+			pr_err("%s(): PWM chip not found\n", __func__);
+
 		pwm = ERR_CAST(pc);
 		goto put;
 	}
-- 
2.9.4

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

* [PATCH] pwm: silently error on EPROBE_DEFER
@ 2017-05-23 16:05 ` Jerome Brunet
  0 siblings, 0 replies; 6+ messages in thread
From: Jerome Brunet @ 2017-05-23 16:05 UTC (permalink / raw)
  To: Thierry Reding; +Cc: Jerome Brunet, linux-pwm, linux-kernel, linux-amlogic

In of_pwm_chip, if we fail to get the pwm chip due to probe defer, we
shouldn't print an error message. Just be silent in this case.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
 drivers/pwm/core.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/pwm/core.c b/drivers/pwm/core.c
index a0860b30bd93..1581f6ab1b1f 100644
--- a/drivers/pwm/core.c
+++ b/drivers/pwm/core.c
@@ -678,7 +678,9 @@ struct pwm_device *of_pwm_get(struct device_node *np, const char *con_id)
 
 	pc = of_node_to_pwmchip(args.np);
 	if (IS_ERR(pc)) {
-		pr_err("%s(): PWM chip not found\n", __func__);
+		if (PTR_ERR(pc) != -EPROBE_DEFER)
+			pr_err("%s(): PWM chip not found\n", __func__);
+
 		pwm = ERR_CAST(pc);
 		goto put;
 	}
-- 
2.9.4

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

* [PATCH] pwm: silently error on EPROBE_DEFER
  2017-05-23 16:05 ` Jerome Brunet
@ 2017-05-23 17:37   ` Andreas Färber
  -1 siblings, 0 replies; 6+ messages in thread
From: Andreas Färber @ 2017-05-23 17:37 UTC (permalink / raw)
  To: linus-amlogic

Am 23.05.2017 um 18:05 schrieb Jerome Brunet:
> In of_pwm_chip, if we fail to get the pwm chip due to probe defer, we
> shouldn't print an error message. Just be silent in this case.
> 
> Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>

Reviewed-by: Andreas F?rber <afaerber@suse.de>

Those messages are indeed irritating.

Thanks,
Andreas

-- 
SUSE Linux GmbH, Maxfeldstr. 5, 90409 N?rnberg, Germany
GF: Felix Imend?rffer, Jane Smithard, Graham Norton
HRB 21284 (AG N?rnberg)

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

* Re: [PATCH] pwm: silently error on EPROBE_DEFER
@ 2017-05-23 17:37   ` Andreas Färber
  0 siblings, 0 replies; 6+ messages in thread
From: Andreas Färber @ 2017-05-23 17:37 UTC (permalink / raw)
  To: Jerome Brunet, Thierry Reding; +Cc: linux-pwm, linux-amlogic, linux-kernel

Am 23.05.2017 um 18:05 schrieb Jerome Brunet:
> In of_pwm_chip, if we fail to get the pwm chip due to probe defer, we
> shouldn't print an error message. Just be silent in this case.
> 
> Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>

Reviewed-by: Andreas Färber <afaerber@suse.de>

Those messages are indeed irritating.

Thanks,
Andreas

-- 
SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)

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

* [PATCH] pwm: silently error on EPROBE_DEFER
  2017-05-23 16:05 ` Jerome Brunet
@ 2017-07-06  6:30   ` Thierry Reding
  -1 siblings, 0 replies; 6+ messages in thread
From: Thierry Reding @ 2017-07-06  6:30 UTC (permalink / raw)
  To: linus-amlogic

On Tue, May 23, 2017 at 06:05:03PM +0200, Jerome Brunet wrote:
> In of_pwm_chip, if we fail to get the pwm chip due to probe defer, we
> shouldn't print an error message. Just be silent in this case.
> 
> Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
> ---
>  drivers/pwm/core.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)

Applied, thanks.

Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-amlogic/attachments/20170706/618718ad/attachment.sig>

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

* Re: [PATCH] pwm: silently error on EPROBE_DEFER
@ 2017-07-06  6:30   ` Thierry Reding
  0 siblings, 0 replies; 6+ messages in thread
From: Thierry Reding @ 2017-07-06  6:30 UTC (permalink / raw)
  To: Jerome Brunet; +Cc: linux-pwm, linux-kernel, linux-amlogic

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

On Tue, May 23, 2017 at 06:05:03PM +0200, Jerome Brunet wrote:
> In of_pwm_chip, if we fail to get the pwm chip due to probe defer, we
> shouldn't print an error message. Just be silent in this case.
> 
> Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
> ---
>  drivers/pwm/core.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)

Applied, thanks.

Thierry

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

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

end of thread, other threads:[~2017-07-06  6:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-23 16:05 [PATCH] pwm: silently error on EPROBE_DEFER Jerome Brunet
2017-05-23 16:05 ` Jerome Brunet
2017-05-23 17:37 ` Andreas Färber
2017-05-23 17:37   ` Andreas Färber
2017-07-06  6:30 ` Thierry Reding
2017-07-06  6:30   ` Thierry Reding

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.