summaryrefslogtreecommitdiffstats
path: root/arch/sh/include/asm/mmu_context.h
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2015-03-05 01:19:19 +0100
committerRusty Russell <rusty@rustcorp.com.au>2015-03-10 04:24:42 +0100
commitc8ed00107b60b4a890798677d75e5c2910f393bb (patch)
tree48a0440907bbef7d8d1d71d090881ba00192ee65 /arch/sh/include/asm/mmu_context.h
parentcpumask: remove deprecated functions. (diff)
downloadlinux-c8ed00107b60b4a890798677d75e5c2910f393bb.tar.xz
linux-c8ed00107b60b4a890798677d75e5c2910f393bb.zip
Fix weird uses of num_online_cpus().
This may be OK in archs with contiguous CPU numbers and without hotplug CPUs, but it sets a terrible example. And open-coding it like drivers/scsi/hpsa.c is just weird. BTRFS has a weird comparison with num_online_cpus() too, but since BTRFS just screwed up my test machines' root partition, I'm not touching it :) Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Reported-by: Oleg Drokin <green@linuxhacker.ru>
Diffstat (limited to 'arch/sh/include/asm/mmu_context.h')
-rw-r--r--arch/sh/include/asm/mmu_context.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/sh/include/asm/mmu_context.h b/arch/sh/include/asm/mmu_context.h
index b9d9489a5012..9f417feaf6e8 100644
--- a/arch/sh/include/asm/mmu_context.h
+++ b/arch/sh/include/asm/mmu_context.h
@@ -99,7 +99,7 @@ static inline int init_new_context(struct task_struct *tsk,
{
int i;
- for (i = 0; i < num_online_cpus(); i++)
+ for_each_online_cpu(i)
cpu_context(i, mm) = NO_CONTEXT;
return 0;