diff options
author | KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> | 2011-05-16 16:38:07 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-05-16 16:38:07 -0400 |
commit | fb1fece5da027d3c7e69cf44ca8e58aaf0faf520 (patch) | |
tree | e2c50029304ea0eebef9ca40e8e33888900b7b72 /arch/sparc/kernel/sysfs.c | |
parent | 55dd23eca666876e6028aa35d5e391cfced54871 (diff) |
sparc: convert old cpumask API into new one
Adapt new API. Almost change is trivial, most important change are to
remove following like =operator.
cpumask_t cpu_mask = *mm_cpumask(mm);
cpus_allowed = current->cpus_allowed;
Because cpumask_var_t is =operator unsafe. These usage might prevent
kernel core improvement.
No functional change.
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/kernel/sysfs.c')
-rw-r--r-- | arch/sparc/kernel/sysfs.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/sparc/kernel/sysfs.c b/arch/sparc/kernel/sysfs.c index 1eb8b00aed75..7408201d7efb 100644 --- a/arch/sparc/kernel/sysfs.c +++ b/arch/sparc/kernel/sysfs.c | |||
@@ -103,9 +103,10 @@ static unsigned long run_on_cpu(unsigned long cpu, | |||
103 | unsigned long (*func)(unsigned long), | 103 | unsigned long (*func)(unsigned long), |
104 | unsigned long arg) | 104 | unsigned long arg) |
105 | { | 105 | { |
106 | cpumask_t old_affinity = current->cpus_allowed; | 106 | cpumask_t old_affinity; |
107 | unsigned long ret; | 107 | unsigned long ret; |
108 | 108 | ||
109 | cpumask_copy(&old_affinity, tsk_cpus_allowed(current)); | ||
109 | /* should return -EINVAL to userspace */ | 110 | /* should return -EINVAL to userspace */ |
110 | if (set_cpus_allowed_ptr(current, cpumask_of(cpu))) | 111 | if (set_cpus_allowed_ptr(current, cpumask_of(cpu))) |
111 | return 0; | 112 | return 0; |