vt: keyboard.c: make console an unsigned int
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 26 Jul 2021 13:43:22 +0000 (15:43 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 27 Jul 2021 10:23:20 +0000 (12:23 +0200)
commit3df15d6f37246d2f12f53d915c41d806289d3d46
treec7958e806b0367c8f0fa1c1076fc70a08d207459
parentc92bbbfe21efaa4344871bd2fb5a7649c0b07b84
vt: keyboard.c: make console an unsigned int

The console variable is used everywhere in some fun pointer path and
array indexes and for some reason isn't always declared as unsigned.
This plays havoc with some static analysis tools so mark the variable as
unsigned so we "know" we can not wrap the arrays backwards here.

Cc: Jiri Slaby <jirislaby@kernel.org>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reported-by: Jordy Zomer <jordy@pwning.systems>
Link: https://lore.kernel.org/r/20210726134322.2274919-2-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/vt/keyboard.c
include/linux/vt_kern.h