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


Groups > linux.kernel > #1250458

Re: [PATCH] cpufreq: arm_big_little: fix frequency check when bL switcher is active

From Sudeep Holla <sudeep.holla@arm.com>
Newsgroups linux.kernel
Subject Re: [PATCH] cpufreq: arm_big_little: fix frequency check when bL switcher is active
Date 2015-10-19 10:50 +0200
Message-ID <qleiK-7D6-3@gated-at.bofh.it> (permalink)
References (4 earlier) <qj22m-7Ov-19@gated-at.bofh.it> <qj59U-3SV-9@gated-at.bofh.it> <qjovT-88G-15@gated-at.bofh.it> <qjpV1-1Es-35@gated-at.bofh.it> <qle94-7rs-17@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw



On 19/10/15 09:33, Jon Medhurst (Tixy) wrote:
> On Wed, 2015-10-14 at 09:48 +0100, Sudeep Holla wrote:
>>

[...]

>>
>> OK, I understand what you mean now. I don't have a strong opinion, but
>> here is the reason why I prefer the approach I said earlier:
>> clk_set_rate doesn't return error if the h/w or f/w return error which
>> is usually the last step. So calling clk_get_rate when clk_set_rate
>> return error quite early makes no sense to me.
>
> It doesn't to me either, but my suggested code doesn't do that, it only
> calls clk_get_rate if the is _no_ error from clk_set_rate, the pseudo
> code again...
>
> ret = clk_set_rate()
> if(!ret)                         /* if no error from clk_set_rate   */
>      if(clk_get_rate()!=correct)  /* but some additional checks fail */
>          ret = -EIO;              /* then indicate an error anyway   */
>
> !ret is ret==0 is 'no error' as the comment says. So the clock framework
> thinks the rate was set OK and we then use clk_get_rate to see if those
> unreported h/w or f/w errors mean that it actually wasn't set OK.
>

Ah sorry, my mistake. May be I got carried away by that extra if(!ret).
I am fine with the patch.

Acked-by: Sudeep Holla <sudeep.holla@arm.com>

-- 
Regards,
Sudeep
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: [PATCH] cpufreq: arm_big_little: fix frequency check when bL  switcher is active Viresh Kumar <viresh.kumar@linaro.org> - 2015-10-07 19:40 +0200
  Re: [PATCH] cpufreq: arm_big_little: fix frequency check when bL  switcher is active "Jon Medhurst (Tixy)" <tixy@linaro.org> - 2015-10-08 11:30 +0200
    Re: [PATCH] cpufreq: arm_big_little: fix frequency check when bL  switcher is active Viresh Kumar <viresh.kumar@linaro.org> - 2015-10-08 13:30 +0200
      Re: [PATCH] cpufreq: arm_big_little: fix frequency check when bL  switcher is active "Jon Medhurst (Tixy)" <tixy@linaro.org> - 2015-10-08 15:00 +0200
        Re: [PATCH] cpufreq: arm_big_little: fix frequency check when bL  switcher is active Viresh Kumar <viresh.kumar@linaro.org> - 2015-10-08 16:00 +0200
        Re: [PATCH] cpufreq: arm_big_little: fix frequency check when bL  switcher is active Sudeep Holla <sudeep.holla@foss.arm.com> - 2015-10-08 16:20 +0200
    Re: [PATCH] cpufreq: arm_big_little: fix frequency check when bL  switcher is active Sudeep Holla <sudeep.holla@arm.com> - 2015-10-12 15:30 +0200
      Re: [PATCH] cpufreq: arm_big_little: fix frequency check when bL  switcher is active "Jon Medhurst (Tixy)" <tixy@linaro.org> - 2015-10-13 09:20 +0200
        Re: [PATCH] cpufreq: arm_big_little: fix frequency check when bL  switcher is active Sudeep Holla <sudeep.holla@arm.com> - 2015-10-13 12:40 +0200
          Re: [PATCH] cpufreq: arm_big_little: fix frequency check when bL  switcher is active "Jon Medhurst (Tixy)" <tixy@linaro.org> - 2015-10-14 09:20 +0200
            Re: [PATCH] cpufreq: arm_big_little: fix frequency check when bL  switcher is active Sudeep Holla <sudeep.holla@arm.com> - 2015-10-14 10:50 +0200
              Re: [PATCH] cpufreq: arm_big_little: fix frequency check when bL  switcher is active "Jon Medhurst (Tixy)" <tixy@linaro.org> - 2015-10-19 10:40 +0200
                Re: [PATCH] cpufreq: arm_big_little: fix frequency check when bL  switcher is active Sudeep Holla <sudeep.holla@arm.com> - 2015-10-19 10:50 +0200

csiph-web