[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJZ5v0jnzMV59V+aisb2W9xxh8SaBjx7bpPXWN-663c0wSC0aw@mail.gmail.com>
Date: Wed, 10 Feb 2016 01:28:12 +0100
From: "Rafael J. Wysocki" <rafael@...nel.org>
To: Viresh Kumar <viresh.kumar@...aro.org>
Cc: Rafael Wysocki <rjw@...ysocki.net>,
Juri Lelli <juri.lelli@....com>,
Lists linaro-kernel <linaro-kernel@...ts.linaro.org>,
"linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
Shilpasri G Bhat <shilpa.bhat@...ux.vnet.ibm.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH V4 7/7] cpufreq: ondemand: Rearrange od_dbs_timer() to
void updating delay
s/void/avoid/ in the subject.
Apart from that it looks good.
On Tue, Feb 9, 2016 at 4:46 AM, Viresh Kumar <viresh.kumar@...aro.org> wrote:
> 'delay' is updated properly in all paths of the routine od_dbs_timer(),
> leaving just one. And can be 0 only in that case.
>
> Move the update to 'delay' as an else part of the if block.
>
> Signed-off-by: Viresh Kumar <viresh.kumar@...aro.org>
> ---
> drivers/cpufreq/cpufreq_ondemand.c | 9 ++++-----
> 1 file changed, 4 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/cpufreq/cpufreq_ondemand.c b/drivers/cpufreq/cpufreq_ondemand.c
> index d9f323f150c4..388ae07ce413 100644
> --- a/drivers/cpufreq/cpufreq_ondemand.c
> +++ b/drivers/cpufreq/cpufreq_ondemand.c
> @@ -194,7 +194,7 @@ static unsigned int od_dbs_timer(struct cpufreq_policy *policy)
> struct policy_dbs_info *policy_dbs = policy->governor_data;
> struct dbs_data *dbs_data = policy_dbs->dbs_data;
> struct od_cpu_dbs_info_s *dbs_info = &per_cpu(od_cpu_dbs_info, policy->cpu);
> - int delay = 0, sample_type = dbs_info->sample_type;
> + int delay, sample_type = dbs_info->sample_type;
>
> /* Common NORMAL_SAMPLE setup */
> dbs_info->sample_type = OD_NORMAL_SAMPLE;
> @@ -208,13 +208,12 @@ static unsigned int od_dbs_timer(struct cpufreq_policy *policy)
> /* Setup timer for SUB_SAMPLE */
> dbs_info->sample_type = OD_SUB_SAMPLE;
> delay = dbs_info->freq_hi_jiffies;
> + } else {
> + delay = delay_for_sampling_rate(dbs_data->sampling_rate
> + * dbs_info->rate_mult);
> }
> }
>
> - if (!delay)
> - delay = delay_for_sampling_rate(dbs_data->sampling_rate
> - * dbs_info->rate_mult);
> -
> return delay;
> }
>
> --
> 2.7.1.370.gb2aa7f8
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pm" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists