]> git.baikalelectronics.ru Git - kernel.git/commit
x86/cpu: Change type of x86_cache_size variable to unsigned int
authorGustavo A. R. Silva <garsilva@embeddedor.com>
Tue, 13 Feb 2018 19:22:08 +0000 (13:22 -0600)
committerIngo Molnar <mingo@kernel.org>
Thu, 15 Feb 2018 00:15:53 +0000 (01:15 +0100)
commitb797e0c44a3c848292bfc2c345eddac683e01254
tree52877d24a97802248319ff3525ea151510e3f529
parent8a5a236fc0261aedcedc9d15678d40e0bb43352a
x86/cpu: Change type of x86_cache_size variable to unsigned int

Currently, x86_cache_size is of type int, which makes no sense as we
will never have a valid cache size equal or less than 0. So instead of
initializing this variable to -1, it can perfectly be initialized to 0
and use it as an unsigned variable instead.

Suggested-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Addresses-Coverity-ID: 1464429
Link: http://lkml.kernel.org/r/20180213192208.GA26414@embeddedor.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/include/asm/processor.h
arch/x86/kernel/cpu/common.c
arch/x86/kernel/cpu/microcode/intel.c
arch/x86/kernel/cpu/proc.c