aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHimangi Saraogi <himangi774@gmail.com>2014-08-03 06:15:40 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-08-06 18:23:22 -0400
commit18360d6ed9877d81aa7b3ab811e7e14f3fb0ac61 (patch)
tree82d3bfe3e2f78bafdeb1934e5eb566b3832212ca
parent1bfb425b3b6bf30f5d4b851049b2057dce860bfd (diff)
cpufreq: integrator: Use set_cpus_allowed_ptr
Several years ago there was an effort to convert all uses of set_cpus_allowed to use set_cpus_allowed_ptr with the goal of eventually removing the current definition of set_cpus_allowed and renaming set_cpus_allowed_ptr as set_cpus_allowed (https://lkml.org/lkml/2010/3/26/59). This is another step in this direction. The Coccinelle semantic patch that makes this change is as follows: // <smpl> @@ expression E1,E2; @@ - set_cpus_allowed(E1, cpumask_of_cpu(E2)) + set_cpus_allowed_ptr(E1, cpumask_of(E2)) @@ expression E; identifier I; @@ - set_cpus_allowed(E, I) + set_cpus_allowed_ptr(E, &I) // </smpl> Signed-off-by: Himangi Saraogi <himangi774@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r--drivers/cpufreq/integrator-cpufreq.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/cpufreq/integrator-cpufreq.c b/drivers/cpufreq/integrator-cpufreq.c
index e5122f1bfe78..c1320528b9d0 100644
--- a/drivers/cpufreq/integrator-cpufreq.c
+++ b/drivers/cpufreq/integrator-cpufreq.c
@@ -92,7 +92,7 @@ static int integrator_set_target(struct cpufreq_policy *policy,
92 * Bind to the specified CPU. When this call returns, 92 * Bind to the specified CPU. When this call returns,
93 * we should be running on the right CPU. 93 * we should be running on the right CPU.
94 */ 94 */
95 set_cpus_allowed(current, cpumask_of_cpu(cpu)); 95 set_cpus_allowed_ptr(current, cpumask_of(cpu));
96 BUG_ON(cpu != smp_processor_id()); 96 BUG_ON(cpu != smp_processor_id());
97 97
98 /* get current setting */ 98 /* get current setting */
@@ -118,7 +118,7 @@ static int integrator_set_target(struct cpufreq_policy *policy,
118 freqs.new = icst_hz(&cclk_params, vco) / 1000; 118 freqs.new = icst_hz(&cclk_params, vco) / 1000;
119 119
120 if (freqs.old == freqs.new) { 120 if (freqs.old == freqs.new) {
121 set_cpus_allowed(current, cpus_allowed); 121 set_cpus_allowed_ptr(current, &cpus_allowed);
122 return 0; 122 return 0;
123 } 123 }
124 124
@@ -141,7 +141,7 @@ static int integrator_set_target(struct cpufreq_policy *policy,
141 /* 141 /*
142 * Restore the CPUs allowed mask. 142 * Restore the CPUs allowed mask.
143 */ 143 */
144 set_cpus_allowed(current, cpus_allowed); 144 set_cpus_allowed_ptr(current, &cpus_allowed);
145 145
146 cpufreq_freq_transition_end(policy, &freqs, 0); 146 cpufreq_freq_transition_end(policy, &freqs, 0);
147 147
@@ -157,7 +157,7 @@ static unsigned int integrator_get(unsigned int cpu)
157 157
158 cpus_allowed = current->cpus_allowed; 158 cpus_allowed = current->cpus_allowed;
159 159
160 set_cpus_allowed(current, cpumask_of_cpu(cpu)); 160 set_cpus_allowed_ptr(current, cpumask_of(cpu));
161 BUG_ON(cpu != smp_processor_id()); 161 BUG_ON(cpu != smp_processor_id());
162 162
163 /* detect memory etc. */ 163 /* detect memory etc. */
@@ -173,7 +173,7 @@ static unsigned int integrator_get(unsigned int cpu)
173 173
174 current_freq = icst_hz(&cclk_params, vco) / 1000; /* current freq */ 174 current_freq = icst_hz(&cclk_params, vco) / 1000; /* current freq */
175 175
176 set_cpus_allowed(current, cpus_allowed); 176 set_cpus_allowed_ptr(current, &cpus_allowed);
177 177
178 return current_freq; 178 return current_freq;
179} 179}