diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2008-10-27 11:03:10 +1100 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2008-10-27 11:03:10 +1100 |
commit | 5a4d2d4a3bb29f575c17b0da89f4f312b73733af (patch) | |
tree | d386bd023c8ef58559ec5e0c32fe10b16e3b69ef /lib | |
parent | a5f0c6822e6795927091d756c51b51320305654a (diff) |
cpumask:remove-min
Seems like this has been here forever, but I can't see why:
find_first_bit and find_next_bit both return >= NR_CPUS on failure.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Mike Travis <travis@sgi.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/cpumask.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/cpumask.c b/lib/cpumask.c index 8e6f1af99fa0..f468bde0125e 100644 --- a/lib/cpumask.c +++ b/lib/cpumask.c @@ -5,13 +5,13 @@ int __first_cpu(const cpumask_t *srcp) { - return min_t(int, NR_CPUS, find_first_bit(srcp->bits, NR_CPUS)); + return find_first_bit(srcp->bits, NR_CPUS); } EXPORT_SYMBOL(__first_cpu); int __next_cpu(int n, const cpumask_t *srcp) { - return min_t(int, NR_CPUS, find_next_bit(srcp->bits, NR_CPUS, n+1)); + return find_next_bit(srcp->bits, NR_CPUS, n+1); } EXPORT_SYMBOL(__next_cpu); @@ -27,8 +27,7 @@ EXPORT_SYMBOL(cpumask_next_and); #if NR_CPUS > 64 int __next_cpu_nr(int n, const cpumask_t *srcp) { - return min_t(int, nr_cpu_ids, - find_next_bit(srcp->bits, nr_cpu_ids, n+1)); + return find_next_bit(srcp->bits, nr_cpu_ids, n+1); } EXPORT_SYMBOL(__next_cpu_nr); #endif |