Commit e837f9b5 authored by Joe Perches's avatar Joe Perches Committed by Rafael J. Wysocki

cpufreq: Reformat printk() statements

 - Add missing newlines
 - Coalesce format fragments
 - Convert printks to pr_<level>
 - Align arguments
Based-on-patch-by: default avatarSören Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: default avatarJoe Perches <joe@perches.com>
Acked-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent d351cb31
...@@ -182,8 +182,8 @@ unsigned int cpufreq_generic_get(unsigned int cpu) ...@@ -182,8 +182,8 @@ unsigned int cpufreq_generic_get(unsigned int cpu)
struct cpufreq_policy *policy = per_cpu(cpufreq_cpu_data, cpu); struct cpufreq_policy *policy = per_cpu(cpufreq_cpu_data, cpu);
if (!policy || IS_ERR(policy->clk)) { if (!policy || IS_ERR(policy->clk)) {
pr_err("%s: No %s associated to cpu: %d\n", __func__, pr_err("%s: No %s associated to cpu: %d\n",
policy ? "clk" : "policy", cpu); __func__, policy ? "clk" : "policy", cpu);
return 0; return 0;
} }
...@@ -255,15 +255,15 @@ static void adjust_jiffies(unsigned long val, struct cpufreq_freqs *ci) ...@@ -255,15 +255,15 @@ static void adjust_jiffies(unsigned long val, struct cpufreq_freqs *ci)
if (!l_p_j_ref_freq) { if (!l_p_j_ref_freq) {
l_p_j_ref = loops_per_jiffy; l_p_j_ref = loops_per_jiffy;
l_p_j_ref_freq = ci->old; l_p_j_ref_freq = ci->old;
pr_debug("saving %lu as reference value for loops_per_jiffy; " pr_debug("saving %lu as reference value for loops_per_jiffy; freq is %u kHz\n",
"freq is %u kHz\n", l_p_j_ref, l_p_j_ref_freq); l_p_j_ref, l_p_j_ref_freq);
} }
if ((val == CPUFREQ_POSTCHANGE && ci->old != ci->new) || if ((val == CPUFREQ_POSTCHANGE && ci->old != ci->new) ||
(val == CPUFREQ_RESUMECHANGE || val == CPUFREQ_SUSPENDCHANGE)) { (val == CPUFREQ_RESUMECHANGE || val == CPUFREQ_SUSPENDCHANGE)) {
loops_per_jiffy = cpufreq_scale(l_p_j_ref, l_p_j_ref_freq, loops_per_jiffy = cpufreq_scale(l_p_j_ref, l_p_j_ref_freq,
ci->new); ci->new);
pr_debug("scaling loops_per_jiffy to %lu " pr_debug("scaling loops_per_jiffy to %lu for frequency %u kHz\n",
"for frequency %u kHz\n", loops_per_jiffy, ci->new); loops_per_jiffy, ci->new);
} }
} }
#else #else
...@@ -295,8 +295,7 @@ static void __cpufreq_notify_transition(struct cpufreq_policy *policy, ...@@ -295,8 +295,7 @@ static void __cpufreq_notify_transition(struct cpufreq_policy *policy,
if (!(cpufreq_driver->flags & CPUFREQ_CONST_LOOPS)) { if (!(cpufreq_driver->flags & CPUFREQ_CONST_LOOPS)) {
if ((policy) && (policy->cpu == freqs->cpu) && if ((policy) && (policy->cpu == freqs->cpu) &&
(policy->cur) && (policy->cur != freqs->old)) { (policy->cur) && (policy->cur != freqs->old)) {
pr_debug("Warning: CPU frequency is" pr_debug("Warning: CPU frequency is %u, cpufreq assumed %u kHz\n",
" %u, cpufreq assumed %u kHz.\n",
freqs->old, policy->cur); freqs->old, policy->cur);
freqs->old = policy->cur; freqs->old = policy->cur;
} }
...@@ -308,8 +307,8 @@ static void __cpufreq_notify_transition(struct cpufreq_policy *policy, ...@@ -308,8 +307,8 @@ static void __cpufreq_notify_transition(struct cpufreq_policy *policy,
case CPUFREQ_POSTCHANGE: case CPUFREQ_POSTCHANGE:
adjust_jiffies(CPUFREQ_POSTCHANGE, freqs); adjust_jiffies(CPUFREQ_POSTCHANGE, freqs);
pr_debug("FREQ: %lu - CPU: %lu", (unsigned long)freqs->new, pr_debug("FREQ: %lu - CPU: %lu\n",
(unsigned long)freqs->cpu); (unsigned long)freqs->new, (unsigned long)freqs->cpu);
trace_cpu_frequency(freqs->new, freqs->cpu); trace_cpu_frequency(freqs->new, freqs->cpu);
srcu_notifier_call_chain(&cpufreq_transition_notifier_list, srcu_notifier_call_chain(&cpufreq_transition_notifier_list,
CPUFREQ_POSTCHANGE, freqs); CPUFREQ_POSTCHANGE, freqs);
...@@ -369,13 +368,13 @@ static ssize_t store_boost(struct kobject *kobj, struct attribute *attr, ...@@ -369,13 +368,13 @@ static ssize_t store_boost(struct kobject *kobj, struct attribute *attr,
return -EINVAL; return -EINVAL;
if (cpufreq_boost_trigger_state(enable)) { if (cpufreq_boost_trigger_state(enable)) {
pr_err("%s: Cannot %s BOOST!\n", __func__, pr_err("%s: Cannot %s BOOST!\n",
enable ? "enable" : "disable"); __func__, enable ? "enable" : "disable");
return -EINVAL; return -EINVAL;
} }
pr_debug("%s: cpufreq BOOST %s\n", __func__, pr_debug("%s: cpufreq BOOST %s\n",
enable ? "enabled" : "disabled"); __func__, enable ? "enabled" : "disabled");
return count; return count;
} }
...@@ -1264,7 +1263,7 @@ static int cpufreq_nominate_new_policy_cpu(struct cpufreq_policy *policy, ...@@ -1264,7 +1263,7 @@ static int cpufreq_nominate_new_policy_cpu(struct cpufreq_policy *policy,
sysfs_remove_link(&cpu_dev->kobj, "cpufreq"); sysfs_remove_link(&cpu_dev->kobj, "cpufreq");
ret = kobject_move(&policy->kobj, &cpu_dev->kobj); ret = kobject_move(&policy->kobj, &cpu_dev->kobj);
if (ret) { if (ret) {
pr_err("%s: Failed to move kobj: %d", __func__, ret); pr_err("%s: Failed to move kobj: %d\n", __func__, ret);
down_write(&policy->rwsem); down_write(&policy->rwsem);
cpumask_set_cpu(old_cpu, policy->cpus); cpumask_set_cpu(old_cpu, policy->cpus);
...@@ -1455,8 +1454,8 @@ static void cpufreq_out_of_sync(unsigned int cpu, unsigned int old_freq, ...@@ -1455,8 +1454,8 @@ static void cpufreq_out_of_sync(unsigned int cpu, unsigned int old_freq,
struct cpufreq_freqs freqs; struct cpufreq_freqs freqs;
unsigned long flags; unsigned long flags;
pr_debug("Warning: CPU frequency out of sync: cpufreq and timing " pr_debug("Warning: CPU frequency out of sync: cpufreq and timing core thinks of %u, is %u kHz\n",
"core thinks of %u, is %u kHz.\n", old_freq, new_freq); old_freq, new_freq);
freqs.old = old_freq; freqs.old = old_freq;
freqs.new = new_freq; freqs.new = new_freq;
...@@ -1825,8 +1824,7 @@ int __cpufreq_driver_target(struct cpufreq_policy *policy, ...@@ -1825,8 +1824,7 @@ int __cpufreq_driver_target(struct cpufreq_policy *policy,
freqs.flags = 0; freqs.flags = 0;
pr_debug("%s: cpu: %d, oldfreq: %u, new freq: %u\n", pr_debug("%s: cpu: %d, oldfreq: %u, new freq: %u\n",
__func__, policy->cpu, freqs.old, __func__, policy->cpu, freqs.old, freqs.new);
freqs.new);
cpufreq_notify_transition(policy, &freqs, cpufreq_notify_transition(policy, &freqs,
CPUFREQ_PRECHANGE); CPUFREQ_PRECHANGE);
...@@ -1891,11 +1889,8 @@ static int __cpufreq_governor(struct cpufreq_policy *policy, ...@@ -1891,11 +1889,8 @@ static int __cpufreq_governor(struct cpufreq_policy *policy,
if (!gov) if (!gov)
return -EINVAL; return -EINVAL;
else { else {
printk(KERN_WARNING "%s governor failed, too long" pr_warn("%s governor failed, too long transition latency of HW, fallback to %s governor\n",
" transition latency of HW, fallback" policy->governor->name, gov->name);
" to %s governor\n",
policy->governor->name,
gov->name);
policy->governor = gov; policy->governor = gov;
} }
} }
...@@ -2033,8 +2028,8 @@ static int cpufreq_set_policy(struct cpufreq_policy *policy, ...@@ -2033,8 +2028,8 @@ static int cpufreq_set_policy(struct cpufreq_policy *policy,
struct cpufreq_governor *old_gov; struct cpufreq_governor *old_gov;
int ret; int ret;
pr_debug("setting new policy for CPU %u: %u - %u kHz\n", new_policy->cpu, pr_debug("setting new policy for CPU %u: %u - %u kHz\n",
new_policy->min, new_policy->max); new_policy->cpu, new_policy->min, new_policy->max);
memcpy(&new_policy->cpuinfo, &policy->cpuinfo, sizeof(policy->cpuinfo)); memcpy(&new_policy->cpuinfo, &policy->cpuinfo, sizeof(policy->cpuinfo));
...@@ -2158,7 +2153,7 @@ int cpufreq_update_policy(unsigned int cpu) ...@@ -2158,7 +2153,7 @@ int cpufreq_update_policy(unsigned int cpu)
} }
if (!policy->cur) { if (!policy->cur) {
pr_debug("Driver did not initialize current freq"); pr_debug("Driver did not initialize current freq\n");
policy->cur = new_policy.cur; policy->cur = new_policy.cur;
} else { } else {
if (policy->cur != new_policy.cur && has_target()) if (policy->cur != new_policy.cur && has_target())
...@@ -2260,8 +2255,8 @@ int cpufreq_boost_trigger_state(int state) ...@@ -2260,8 +2255,8 @@ int cpufreq_boost_trigger_state(int state)
cpufreq_driver->boost_enabled = !state; cpufreq_driver->boost_enabled = !state;
write_unlock_irqrestore(&cpufreq_driver_lock, flags); write_unlock_irqrestore(&cpufreq_driver_lock, flags);
pr_err("%s: Cannot %s BOOST\n", __func__, pr_err("%s: Cannot %s BOOST\n",
state ? "enable" : "disable"); __func__, state ? "enable" : "disable");
} }
return ret; return ret;
......
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