lib/cpumask.c: remove __any_online_cpu()

__any_online_cpu() is not optimal and also unnecessary.  So, replace its
use by faster cpumask_* operations.

Signed-off-by: Srivatsa S. Bhat <[email protected]>
Cc: Eric Dumazet <[email protected]>
Cc: Venkatesh Pallipadi <[email protected]>
Cc: Rusty Russell <[email protected]>
Cc: KOSAKI Motohiro <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
Srivatsa S. Bhat 2012-03-28 14:42:46 -07:00 • committed by Linus Torvalds
commit 38b93780a5
2 changed files with 1 additions and 14 deletions

View file

@ -26,18 +26,6 @@ int __next_cpu_nr(int n, const cpumask_t *srcp)
EXPORT_SYMBOL(__next_cpu_nr);
#endif
int __any_online_cpu(const cpumask_t *mask)
{
int cpu;
for_each_cpu(cpu, mask) {
if (cpu_online(cpu))
break;
}
return cpu;
}
EXPORT_SYMBOL(__any_online_cpu);
/**
* cpumask_next_and - get the next cpu in *src1p & *src2p
* @n: the cpu prior to the place to search (ie. return will be > @n)