aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq
diff options
context:
space:
mode:
authorStratos Karafotis <stratosk@semaphore.gr>2014-07-18 11:37:20 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-07-21 07:43:18 -0400
commit2d8d1f18ed2b51bcc65a99bf940514b1a697b5f2 (patch)
tree8c80ecdf800065d8ba0d71f7d64948618274dd0b /drivers/cpufreq
parent845c1cbef08c87d2a4e7ca3c82ac2363637fdcb9 (diff)
cpufreq: intel_pstate: Fit code in a single line where possible
We can fit these lines in a single one, under the 80 characters limit. Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr> Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/cpufreq')
-rw-r--r--drivers/cpufreq/intel_pstate.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
index e9f3048eb6f2..424c5a98771d 100644
--- a/drivers/cpufreq/intel_pstate.c
+++ b/drivers/cpufreq/intel_pstate.c
@@ -205,11 +205,7 @@ static inline void intel_pstate_busy_pid_reset(struct cpudata *cpu)
205 pid_d_gain_set(&cpu->pid, pid_params.d_gain_pct); 205 pid_d_gain_set(&cpu->pid, pid_params.d_gain_pct);
206 pid_i_gain_set(&cpu->pid, pid_params.i_gain_pct); 206 pid_i_gain_set(&cpu->pid, pid_params.i_gain_pct);
207 207
208 pid_reset(&cpu->pid, 208 pid_reset(&cpu->pid, pid_params.setpoint, 100, pid_params.deadband, 0);
209 pid_params.setpoint,
210 100,
211 pid_params.deadband,
212 0);
213} 209}
214 210
215static inline void intel_pstate_reset_all_pid(void) 211static inline void intel_pstate_reset_all_pid(void)
@@ -235,8 +231,7 @@ static int pid_param_get(void *data, u64 *val)
235 *val = *(u32 *)data; 231 *val = *(u32 *)data;
236 return 0; 232 return 0;
237} 233}
238DEFINE_SIMPLE_ATTRIBUTE(fops_pid_param, pid_param_get, 234DEFINE_SIMPLE_ATTRIBUTE(fops_pid_param, pid_param_get, pid_param_set, "%llu\n");
239 pid_param_set, "%llu\n");
240 235
241struct pid_param { 236struct pid_param {
242 char *name; 237 char *name;
@@ -355,8 +350,7 @@ static void __init intel_pstate_sysfs_expose_params(void)
355 intel_pstate_kobject = kobject_create_and_add("intel_pstate", 350 intel_pstate_kobject = kobject_create_and_add("intel_pstate",
356 &cpu_subsys.dev_root->kobj); 351 &cpu_subsys.dev_root->kobj);
357 BUG_ON(!intel_pstate_kobject); 352 BUG_ON(!intel_pstate_kobject);
358 rc = sysfs_create_group(intel_pstate_kobject, 353 rc = sysfs_create_group(intel_pstate_kobject, &intel_pstate_attr_group);
359 &intel_pstate_attr_group);
360 BUG_ON(rc); 354 BUG_ON(rc);
361} 355}
362 356
@@ -515,8 +509,7 @@ static void intel_pstate_get_min_max(struct cpudata *cpu, int *min, int *max)
515 cpu->pstate.min_pstate, cpu->pstate.turbo_pstate); 509 cpu->pstate.min_pstate, cpu->pstate.turbo_pstate);
516 510
517 min_perf = fp_toint(mul_fp(int_tofp(max_perf), limits.min_perf)); 511 min_perf = fp_toint(mul_fp(int_tofp(max_perf), limits.min_perf));
518 *min = clamp_t(int, min_perf, 512 *min = clamp_t(int, min_perf, cpu->pstate.min_pstate, max_perf);
519 cpu->pstate.min_pstate, max_perf);
520} 513}
521 514
522static void intel_pstate_set_pstate(struct cpudata *cpu, int pstate) 515static void intel_pstate_set_pstate(struct cpudata *cpu, int pstate)
@@ -713,8 +706,7 @@ static int intel_pstate_init_cpu(unsigned int cpunum)
713 706
714 init_timer_deferrable(&cpu->timer); 707 init_timer_deferrable(&cpu->timer);
715 cpu->timer.function = intel_pstate_timer_func; 708 cpu->timer.function = intel_pstate_timer_func;
716 cpu->timer.data = 709 cpu->timer.data = (unsigned long)cpu;
717 (unsigned long)cpu;
718 cpu->timer.expires = jiffies + HZ/100; 710 cpu->timer.expires = jiffies + HZ/100;
719 intel_pstate_busy_pid_reset(cpu); 711 intel_pstate_busy_pid_reset(cpu);
720 intel_pstate_sample(cpu); 712 intel_pstate_sample(cpu);