In one case it was redundant with the operation it got combined with,
and in the other it could easily be replaced by range checking the
result of a subsequent operation. (When running on big systems,
operations on CPU masks aren't cheap enough to use them carelessly.)
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
Reviewed-by: George Dunlap <george.dunlap@eu.citrix.com>
cpu = cpumask_test_cpu(vc->processor, &cpus)
? vc->processor
: cpumask_cycle(vc->processor, &cpus);
- ASSERT( !cpumask_empty(&cpus) && cpumask_test_cpu(cpu, &cpus) );
+ ASSERT(cpumask_test_cpu(cpu, &cpus));
/*
* Try to find an idle processor within the above constraints.
cpumask_and(&workers, &workers, &node_to_cpumask(peer_node));
cpumask_clear_cpu(cpu, &workers);
- if ( cpumask_empty(&workers) )
- goto next_node;
-
peer_cpu = cpumask_first(&workers);
+ if ( peer_cpu >= nr_cpu_ids )
+ goto next_node;
do
{
/*