• Ingo Molnar's avatar
    sched, cpusets: fix warning in kernel/cpuset.c · 1583715d
    Ingo Molnar authored
    this warning:
    
      kernel/cpuset.c: In function ‘generate_sched_domains’:
      kernel/cpuset.c:588: warning: ‘ndoms’ may be used uninitialized in this function
    
    triggers because GCC does not recognize that ndoms stays uninitialized
    only if doms is NULL - but that flow is covered at the end of
    generate_sched_domains().
    
    Help out GCC by initializing this variable to 0. (that's prudent anyway)
    
    Also, this function needs a splitup and code flow simplification:
    with 160 lines length it's clearly too long.
    Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
    1583715d
cpuset.c 70.7 KB