Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1311769 > unrolled thread

[PATCH] clocksource: atmel-st: use return value from clk_prepare_enable()

Started byAlexandre Belloni <alexandre.belloni@free-electrons.com>
First post2016-01-18 20:40 +0100
Last post2016-01-19 10:00 +0100
Articles 3 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] clocksource: atmel-st: use return value from clk_prepare_enable() Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2016-01-18 20:40 +0100
    Re: [PATCH] clocksource: atmel-st: use return value from  clk_prepare_enable() Nicolas Ferre <nicolas.ferre@atmel.com> - 2016-01-19 09:40 +0100
    Re: [PATCH] clocksource: atmel-st: use return value from  clk_prepare_enable() Daniel Lezcano <daniel.lezcano@linaro.org> - 2016-01-19 10:00 +0100

#1311769 — [PATCH] clocksource: atmel-st: use return value from clk_prepare_enable()

FromAlexandre Belloni <alexandre.belloni@free-electrons.com>
Date2016-01-18 20:40 +0100
Subject[PATCH] clocksource: atmel-st: use return value from clk_prepare_enable()
Message-ID<qSnOG-5b4-5@gated-at.bofh.it>
ret is used to detect an error but it was not properly updated after
calling clk_prepare_enable() thus it made it impossible to detect an error
when enabling the slow clock.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
 drivers/clocksource/timer-atmel-st.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clocksource/timer-atmel-st.c b/drivers/clocksource/timer-atmel-st.c
index 29d21d68df5a..c69070c6ad91 100644
--- a/drivers/clocksource/timer-atmel-st.c
+++ b/drivers/clocksource/timer-atmel-st.c
@@ -225,7 +225,7 @@ static void __init atmel_st_timer_init(struct device_node *node)
 	if (IS_ERR(sclk))
 		panic(pr_fmt("Unable to get slow clock\n"));
 
-	clk_prepare_enable(sclk);
+	ret = clk_prepare_enable(sclk);
 	if (ret)
 		panic(pr_fmt("Could not enable slow clock\n"));
 
-- 
2.5.0

[toc] | [next] | [standalone]


#1311995 — Re: [PATCH] clocksource: atmel-st: use return value from clk_prepare_enable()

FromNicolas Ferre <nicolas.ferre@atmel.com>
Date2016-01-19 09:40 +0100
SubjectRe: [PATCH] clocksource: atmel-st: use return value from clk_prepare_enable()
Message-ID<qSzZv-5fh-1@gated-at.bofh.it>
In reply to#1311769
Le 18/01/2016 20:34, Alexandre Belloni a écrit :
> ret is used to detect an error but it was not properly updated after
> calling clk_prepare_enable() thus it made it impossible to detect an error
> when enabling the slow clock.
> 
> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
> ---
>  drivers/clocksource/timer-atmel-st.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/clocksource/timer-atmel-st.c b/drivers/clocksource/timer-atmel-st.c
> index 29d21d68df5a..c69070c6ad91 100644
> --- a/drivers/clocksource/timer-atmel-st.c
> +++ b/drivers/clocksource/timer-atmel-st.c
> @@ -225,7 +225,7 @@ static void __init atmel_st_timer_init(struct device_node *node)
>  	if (IS_ERR(sclk))
>  		panic(pr_fmt("Unable to get slow clock\n"));
>  
> -	clk_prepare_enable(sclk);
> +	ret = clk_prepare_enable(sclk);

Yes, sure...
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>

Thanks!


>  	if (ret)
>  		panic(pr_fmt("Could not enable slow clock\n"));
>  
> 


-- 
Nicolas Ferre

[toc] | [prev] | [next] | [standalone]


#1312015 — Re: [PATCH] clocksource: atmel-st: use return value from clk_prepare_enable()

FromDaniel Lezcano <daniel.lezcano@linaro.org>
Date2016-01-19 10:00 +0100
SubjectRe: [PATCH] clocksource: atmel-st: use return value from clk_prepare_enable()
Message-ID<qSAiS-5me-21@gated-at.bofh.it>
In reply to#1311769
On 01/18/2016 08:34 PM, Alexandre Belloni wrote:
> ret is used to detect an error but it was not properly updated after
> calling clk_prepare_enable() thus it made it impossible to detect an error
> when enabling the slow clock.
>
> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
> ---

Applied thanks !

   -- Daniel


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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web