]> git.proxmox.com Git - mirror_ubuntu-bionic-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)
committerSeth Forshee <seth.forshee@canonical.com>
Fri, 23 Feb 2018 14:27:08 +0000 (08:27 -0600)
commit62734cf45a7906d6060d1a41848a8ac7142d9e12
treededa7eb572d757f6e43605d3259f1901555037ae
parentecad7915ee67fa864d17c0c9855ca851c3d6290a
x86/cpu: Change type of x86_cache_size variable to unsigned int

BugLink: http://bugs.launchpad.net/bugs/1751131
commit 24dbc6000f4b9b0ef5a9daecb161f1907733765a upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
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