mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
[CPUFREQ] checkpatch cleanups for ondemand governor.
Signed-off-by: Dave Jones <davej@redhat.com>
This commit is contained in:
parent
b9e7638a30
commit
2b03f891ad
1 changed files with 13 additions and 16 deletions
|
@ -203,12 +203,12 @@ static void ondemand_powersave_bias_init(void)
|
||||||
/************************** sysfs interface ************************/
|
/************************** sysfs interface ************************/
|
||||||
static ssize_t show_sampling_rate_max(struct cpufreq_policy *policy, char *buf)
|
static ssize_t show_sampling_rate_max(struct cpufreq_policy *policy, char *buf)
|
||||||
{
|
{
|
||||||
return sprintf (buf, "%u\n", MAX_SAMPLING_RATE);
|
return sprintf(buf, "%u\n", MAX_SAMPLING_RATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
static ssize_t show_sampling_rate_min(struct cpufreq_policy *policy, char *buf)
|
static ssize_t show_sampling_rate_min(struct cpufreq_policy *policy, char *buf)
|
||||||
{
|
{
|
||||||
return sprintf (buf, "%u\n", MIN_SAMPLING_RATE);
|
return sprintf(buf, "%u\n", MIN_SAMPLING_RATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
#define define_one_ro(_name) \
|
#define define_one_ro(_name) \
|
||||||
|
@ -279,14 +279,14 @@ static ssize_t store_ignore_nice_load(struct cpufreq_policy *policy,
|
||||||
unsigned int j;
|
unsigned int j;
|
||||||
|
|
||||||
ret = sscanf(buf, "%u", &input);
|
ret = sscanf(buf, "%u", &input);
|
||||||
if ( ret != 1 )
|
if (ret != 1)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
if ( input > 1 )
|
if (input > 1)
|
||||||
input = 1;
|
input = 1;
|
||||||
|
|
||||||
mutex_lock(&dbs_mutex);
|
mutex_lock(&dbs_mutex);
|
||||||
if ( input == dbs_tuners_ins.ignore_nice ) { /* nothing to do */
|
if (input == dbs_tuners_ins.ignore_nice) { /* nothing to do */
|
||||||
mutex_unlock(&dbs_mutex);
|
mutex_unlock(&dbs_mutex);
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
@ -337,7 +337,7 @@ define_one_rw(up_threshold);
|
||||||
define_one_rw(ignore_nice_load);
|
define_one_rw(ignore_nice_load);
|
||||||
define_one_rw(powersave_bias);
|
define_one_rw(powersave_bias);
|
||||||
|
|
||||||
static struct attribute * dbs_attributes[] = {
|
static struct attribute *dbs_attributes[] = {
|
||||||
&sampling_rate_max.attr,
|
&sampling_rate_max.attr,
|
||||||
&sampling_rate_min.attr,
|
&sampling_rate_min.attr,
|
||||||
&sampling_rate.attr,
|
&sampling_rate.attr,
|
||||||
|
@ -512,8 +512,7 @@ static void do_dbs_timer(struct work_struct *work)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
__cpufreq_driver_target(dbs_info->cur_policy,
|
__cpufreq_driver_target(dbs_info->cur_policy,
|
||||||
dbs_info->freq_lo,
|
dbs_info->freq_lo, CPUFREQ_RELATION_H);
|
||||||
CPUFREQ_RELATION_H);
|
|
||||||
}
|
}
|
||||||
queue_delayed_work_on(cpu, kondemand_wq, &dbs_info->work, delay);
|
queue_delayed_work_on(cpu, kondemand_wq, &dbs_info->work, delay);
|
||||||
unlock_policy_rwsem_write(cpu);
|
unlock_policy_rwsem_write(cpu);
|
||||||
|
@ -617,12 +616,10 @@ static int cpufreq_governor_dbs(struct cpufreq_policy *policy,
|
||||||
mutex_lock(&dbs_mutex);
|
mutex_lock(&dbs_mutex);
|
||||||
if (policy->max < this_dbs_info->cur_policy->cur)
|
if (policy->max < this_dbs_info->cur_policy->cur)
|
||||||
__cpufreq_driver_target(this_dbs_info->cur_policy,
|
__cpufreq_driver_target(this_dbs_info->cur_policy,
|
||||||
policy->max,
|
policy->max, CPUFREQ_RELATION_H);
|
||||||
CPUFREQ_RELATION_H);
|
|
||||||
else if (policy->min > this_dbs_info->cur_policy->cur)
|
else if (policy->min > this_dbs_info->cur_policy->cur)
|
||||||
__cpufreq_driver_target(this_dbs_info->cur_policy,
|
__cpufreq_driver_target(this_dbs_info->cur_policy,
|
||||||
policy->min,
|
policy->min, CPUFREQ_RELATION_L);
|
||||||
CPUFREQ_RELATION_L);
|
|
||||||
mutex_unlock(&dbs_mutex);
|
mutex_unlock(&dbs_mutex);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue