linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] clocksource/drivers/timer-of: Do not warn on deferred probe
@ 2019-08-21 15:02 Jon Hunter
  2019-08-21 15:02 ` [PATCH 2/2] clocksource/drivers: Do not warn on probe defer Jon Hunter
  2019-08-22  6:06 ` [PATCH 1/2] clocksource/drivers/timer-of: Do not warn on deferred probe Daniel Lezcano
  0 siblings, 2 replies; 3+ messages in thread
From: Jon Hunter @ 2019-08-21 15:02 UTC (permalink / raw)
  To: Daniel Lezcano, Thomas Gleixner; +Cc: linux-kernel, linux-tegra, Jon Hunter

Deferred probe is an expected return value for clk_get() on many
platforms. The driver deals with it properly, so there's no need
to output a warning that may potentially confuse users.

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
---
 drivers/clocksource/timer-of.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/clocksource/timer-of.c b/drivers/clocksource/timer-of.c
index 80542289fae7..d8c2bd4391d0 100644
--- a/drivers/clocksource/timer-of.c
+++ b/drivers/clocksource/timer-of.c
@@ -113,8 +113,10 @@ static __init int timer_of_clk_init(struct device_node *np,
 	of_clk->clk = of_clk->name ? of_clk_get_by_name(np, of_clk->name) :
 		of_clk_get(np, of_clk->index);
 	if (IS_ERR(of_clk->clk)) {
-		pr_err("Failed to get clock for %pOF\n", np);
-		return PTR_ERR(of_clk->clk);
+		ret = PTR_ERR(of_clk->clk);
+		if (ret != -EPROBE_DEFER)
+			pr_err("Failed to get clock for %pOF\n", np);
+		goto out;
 	}
 
 	ret = clk_prepare_enable(of_clk->clk);
-- 
2.17.1


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

* [PATCH 2/2] clocksource/drivers: Do not warn on probe defer
  2019-08-21 15:02 [PATCH 1/2] clocksource/drivers/timer-of: Do not warn on deferred probe Jon Hunter
@ 2019-08-21 15:02 ` Jon Hunter
  2019-08-22  6:06 ` [PATCH 1/2] clocksource/drivers/timer-of: Do not warn on deferred probe Daniel Lezcano
  1 sibling, 0 replies; 3+ messages in thread
From: Jon Hunter @ 2019-08-21 15:02 UTC (permalink / raw)
  To: Daniel Lezcano, Thomas Gleixner; +Cc: linux-kernel, linux-tegra, Jon Hunter

Deferred probe is an expected return value on many platforms and so
there's no need to output a warning that may potentially confuse users.

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
---
 drivers/clocksource/timer-probe.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/clocksource/timer-probe.c b/drivers/clocksource/timer-probe.c
index dda1946e84dd..ee9574da53c0 100644
--- a/drivers/clocksource/timer-probe.c
+++ b/drivers/clocksource/timer-probe.c
@@ -29,7 +29,9 @@ void __init timer_probe(void)
 
 		ret = init_func_ret(np);
 		if (ret) {
-			pr_err("Failed to initialize '%pOF': %d\n", np, ret);
+			if (ret != -EPROBE_DEFER)
+				pr_err("Failed to initialize '%pOF': %d\n", np,
+				       ret);
 			continue;
 		}
 
-- 
2.17.1


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

* Re: [PATCH 1/2] clocksource/drivers/timer-of: Do not warn on deferred probe
  2019-08-21 15:02 [PATCH 1/2] clocksource/drivers/timer-of: Do not warn on deferred probe Jon Hunter
  2019-08-21 15:02 ` [PATCH 2/2] clocksource/drivers: Do not warn on probe defer Jon Hunter
@ 2019-08-22  6:06 ` Daniel Lezcano
  1 sibling, 0 replies; 3+ messages in thread
From: Daniel Lezcano @ 2019-08-22  6:06 UTC (permalink / raw)
  To: Jon Hunter, Thomas Gleixner; +Cc: linux-kernel, linux-tegra

On 21/08/2019 17:02, Jon Hunter wrote:
> Deferred probe is an expected return value for clk_get() on many
> platforms. The driver deals with it properly, so there's no need
> to output a warning that may potentially confuse users.
> 
> Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
> ---

Applied, thanks!

>  drivers/clocksource/timer-of.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/clocksource/timer-of.c b/drivers/clocksource/timer-of.c
> index 80542289fae7..d8c2bd4391d0 100644
> --- a/drivers/clocksource/timer-of.c
> +++ b/drivers/clocksource/timer-of.c
> @@ -113,8 +113,10 @@ static __init int timer_of_clk_init(struct device_node *np,
>  	of_clk->clk = of_clk->name ? of_clk_get_by_name(np, of_clk->name) :
>  		of_clk_get(np, of_clk->index);
>  	if (IS_ERR(of_clk->clk)) {
> -		pr_err("Failed to get clock for %pOF\n", np);
> -		return PTR_ERR(of_clk->clk);
> +		ret = PTR_ERR(of_clk->clk);
> +		if (ret != -EPROBE_DEFER)
> +			pr_err("Failed to get clock for %pOF\n", np);
> +		goto out;
>  	}
>  
>  	ret = clk_prepare_enable(of_clk->clk);
> 


-- 
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog


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

end of thread, other threads:[~2019-08-22  6:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-21 15:02 [PATCH 1/2] clocksource/drivers/timer-of: Do not warn on deferred probe Jon Hunter
2019-08-21 15:02 ` [PATCH 2/2] clocksource/drivers: Do not warn on probe defer Jon Hunter
2019-08-22  6:06 ` [PATCH 1/2] clocksource/drivers/timer-of: Do not warn on deferred probe Daniel Lezcano

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).