arch/sparc/kernel: Use set_cpus_allowed_ptr

Use set_cpus_allowed_ptr rather than set_cpus_allowed.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <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: Julia Lawall <julia@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by Julia Lawall and committed by David S. Miller d2566af8 7469a9ac

+10 -10
+2 -2
arch/sparc/kernel/sysfs.c
··· 107 107 unsigned long ret; 108 108 109 109 /* should return -EINVAL to userspace */ 110 - if (set_cpus_allowed(current, cpumask_of_cpu(cpu))) 110 + if (set_cpus_allowed_ptr(current, cpumask_of(cpu))) 111 111 return 0; 112 112 113 113 ret = func(arg); 114 114 115 - set_cpus_allowed(current, old_affinity); 115 + set_cpus_allowed_ptr(current, &old_affinity); 116 116 117 117 return ret; 118 118 }
+4 -4
arch/sparc/kernel/us2e_cpufreq.c
··· 238 238 return 0; 239 239 240 240 cpus_allowed = current->cpus_allowed; 241 - set_cpus_allowed(current, cpumask_of_cpu(cpu)); 241 + set_cpus_allowed_ptr(current, cpumask_of(cpu)); 242 242 243 243 clock_tick = sparc64_get_clock_tick(cpu) / 1000; 244 244 estar = read_hbreg(HBIRD_ESTAR_MODE_ADDR); 245 245 246 - set_cpus_allowed(current, cpus_allowed); 246 + set_cpus_allowed_ptr(current, &cpus_allowed); 247 247 248 248 return clock_tick / estar_to_divisor(estar); 249 249 } ··· 259 259 return; 260 260 261 261 cpus_allowed = current->cpus_allowed; 262 - set_cpus_allowed(current, cpumask_of_cpu(cpu)); 262 + set_cpus_allowed_ptr(current, cpumask_of(cpu)); 263 263 264 264 new_freq = clock_tick = sparc64_get_clock_tick(cpu) / 1000; 265 265 new_bits = index_to_estar_mode(index); ··· 281 281 282 282 cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); 283 283 284 - set_cpus_allowed(current, cpus_allowed); 284 + set_cpus_allowed_ptr(current, &cpus_allowed); 285 285 } 286 286 287 287 static int us2e_freq_target(struct cpufreq_policy *policy,
+4 -4
arch/sparc/kernel/us3_cpufreq.c
··· 86 86 return 0; 87 87 88 88 cpus_allowed = current->cpus_allowed; 89 - set_cpus_allowed(current, cpumask_of_cpu(cpu)); 89 + set_cpus_allowed_ptr(current, cpumask_of(cpu)); 90 90 91 91 reg = read_safari_cfg(); 92 92 ret = get_current_freq(cpu, reg); 93 93 94 - set_cpus_allowed(current, cpus_allowed); 94 + set_cpus_allowed_ptr(current, &cpus_allowed); 95 95 96 96 return ret; 97 97 } ··· 106 106 return; 107 107 108 108 cpus_allowed = current->cpus_allowed; 109 - set_cpus_allowed(current, cpumask_of_cpu(cpu)); 109 + set_cpus_allowed_ptr(current, cpumask_of(cpu)); 110 110 111 111 new_freq = sparc64_get_clock_tick(cpu) / 1000; 112 112 switch (index) { ··· 140 140 141 141 cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); 142 142 143 - set_cpus_allowed(current, cpus_allowed); 143 + set_cpus_allowed_ptr(current, &cpus_allowed); 144 144 } 145 145 146 146 static int us3_freq_target(struct cpufreq_policy *policy,