• Borislav Petkov's avatar
    x86, amd: Initialize variable properly · 9e81509e
    Borislav Petkov authored
    Commit d518573d
    
     ("x86, amd: Normalize compute unit IDs on
    multi-node processors") introduced compute unit normalization
    but causes a compiler warning:
    
     arch/x86/kernel/cpu/amd.c: In function 'amd_detect_cmp':
     arch/x86/kernel/cpu/amd.c:268: warning: 'cores_per_cu' may be used uninitialized in this function
     arch/x86/kernel/cpu/amd.c:268: note: 'cores_per_cu' was declared here
    
    The compiler is right - initialize it with a proper value.
    
    Also, fix up a comment while at it.
    Reported-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarBorislav Petkov <borislav.petkov@amd.com>
    Cc: Andreas Herrmann <andreas.herrmann3@amd.com>
    LKML-Reference: <20110214171451.GB10076@kryptos.osrc.amd.com>
    Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
    9e81509e
amd.c 17.3 KB