• Gautham R Shenoy's avatar
    sched: Replace first_cpu() with cpumask_first() in ILB nomination code · 6e29ec57
    Gautham R Shenoy authored
    Stephen Rothwell reported this build warning:
    
    >  kernel/sched.c: In function 'find_new_ilb':
    >  kernel/sched.c:4355: warning: passing argument 1 of '__first_cpu' from incompatible pointer type
    >
    > Possibly caused by commit f711f609
    > ("sched: Nominate idle load balancer from a semi-idle package") from
    > the sched tree.  Should this call to first_cpu be cpumask_first?
    
    For !(CONFIG_SCHED_MC || CONFIG_SCHED_SMT), find_new_ilb() nominates the
    Idle load balancer as the first cpu from the nohz.cpu_mask.
    
    This code uses the older API first_cpu(). Replace it with cpumask_first(),
    which is the correct API here.
    
    [ Impact: cleanup, address build warning ]
    Reported-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
    Signed-off-by: default avatarGautham R Shenoy <ego@in.ibm.com>
    Cc: Rusty Russell <rusty@rustcorp.com.au>
    LKML-Reference: <20090421031049.GA4140@in.ibm.com>
    Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
    6e29ec57
sched.c 253 KB