x86, amd: Initialize variable properly
authorBorislav Petkov <bp@amd64.org>
Mon, 14 Feb 2011 17:14:51 +0000 (18:14 +0100)
committerIngo Molnar <mingo@elte.hu>
Tue, 15 Feb 2011 02:03:19 +0000 (03:03 +0100)
commit9e81509efc4fefcdd75cc6a4121672fa71ae8745
tree49326656ff61876e62cda0712b41ef99643af5cd
parent691269f0d918cd72454c254f97722f194c07b9a8
x86, amd: Initialize variable properly

Commit d518573de63f ("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: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
Cc: Andreas Herrmann <andreas.herrmann3@amd.com>
LKML-Reference: <20110214171451.GB10076@kryptos.osrc.amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/cpu/amd.c