Commit 6e96c5b3 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki

cpufreq: ondemand: Simplify conditionals in od_dbs_timer()

Reduce the indentation level in the conditionals in od_dbs_timer()
and drop the delay variable from it.

No functional changes.
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
parent 57dc3bcd
...@@ -194,7 +194,7 @@ static unsigned int od_dbs_timer(struct cpufreq_policy *policy) ...@@ -194,7 +194,7 @@ static unsigned int od_dbs_timer(struct cpufreq_policy *policy)
struct policy_dbs_info *policy_dbs = policy->governor_data; struct policy_dbs_info *policy_dbs = policy->governor_data;
struct dbs_data *dbs_data = policy_dbs->dbs_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); struct od_cpu_dbs_info_s *dbs_info = &per_cpu(od_cpu_dbs_info, policy->cpu);
int delay, sample_type = dbs_info->sample_type; int sample_type = dbs_info->sample_type;
/* Common NORMAL_SAMPLE setup */ /* Common NORMAL_SAMPLE setup */
dbs_info->sample_type = OD_NORMAL_SAMPLE; dbs_info->sample_type = OD_NORMAL_SAMPLE;
...@@ -203,22 +203,20 @@ static unsigned int od_dbs_timer(struct cpufreq_policy *policy) ...@@ -203,22 +203,20 @@ static unsigned int od_dbs_timer(struct cpufreq_policy *policy)
* it then. * it then.
*/ */
if (sample_type == OD_SUB_SAMPLE && policy_dbs->sample_delay_ns > 0) { if (sample_type == OD_SUB_SAMPLE && policy_dbs->sample_delay_ns > 0) {
delay = dbs_info->freq_lo_jiffies;
__cpufreq_driver_target(policy, dbs_info->freq_lo, __cpufreq_driver_target(policy, dbs_info->freq_lo,
CPUFREQ_RELATION_H); CPUFREQ_RELATION_H);
} else { return dbs_info->freq_lo_jiffies;
}
od_update(policy); od_update(policy);
if (dbs_info->freq_lo) { if (dbs_info->freq_lo) {
/* Setup timer for SUB_SAMPLE */ /* Setup timer for SUB_SAMPLE */
dbs_info->sample_type = OD_SUB_SAMPLE; dbs_info->sample_type = OD_SUB_SAMPLE;
delay = dbs_info->freq_hi_jiffies; return dbs_info->freq_hi_jiffies;
} else {
delay = delay_for_sampling_rate(dbs_data->sampling_rate
* policy_dbs->rate_mult);
}
} }
return delay; return delay_for_sampling_rate(dbs_data->sampling_rate * policy_dbs->rate_mult);
} }
/************************** sysfs interface ************************/ /************************** sysfs interface ************************/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment