Re: [PATCH 3/3] cpufreq: ppc: Fix handling of non-existent clocks

2014-04-21 Thread Geert Uytterhoeven
Hi Viresh, On Mon, Apr 21, 2014 at 8:01 AM, Viresh Kumar wrote: > On 17 April 2014 15:23, Geert Uytterhoeven wrote: >> If the clock doesn't exist, clk_get_rate() returns -EINVAL > > You clk_get_rate() isn't written well then, it should return zero. You're right, thanks! Once again I looked at t

Re: [PATCH 3/3] cpufreq: ppc: Fix handling of non-existent clocks

2014-04-20 Thread Viresh Kumar
On 17 April 2014 15:23, Geert Uytterhoeven wrote: > If the clock doesn't exist, clk_get_rate() returns -EINVAL You clk_get_rate() isn't written well then, it should return zero. @Mike: I didn't see this clearly mentioned in clk.h, should we fix that? >, which becomes > a large number (freq is u3

[PATCH 3/3] cpufreq: ppc: Fix handling of non-existent clocks

2014-04-17 Thread Geert Uytterhoeven
If the clock doesn't exist, clk_get_rate() returns -EINVAL, which becomes a large number (freq is u32), failing the "freq < min_cpufreq" test. Explicitly test for "(u32)-EINVAL" to fix this. Update the comment, and fix a grammer issue while we're at it. Signed-off-by: Geert Uytterhoeven --- dri