tty/vt: consolemap: use ARRAY_SIZE(), part II.
authorJiri Slaby <jslaby@suse.cz>
Tue, 14 Jun 2022 09:05:30 +0000 (11:05 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 27 Jun 2022 12:17:11 +0000 (14:17 +0200)
commit139f39be42fcd5f88366d6f3e6f05002027d3514
treedf1eb4c947f90850fba049a739924ade7ff02a62
parentdf36f3e3fbb76d30d623a1623e31e3ce9c2fa750
tty/vt: consolemap: use ARRAY_SIZE(), part II.

The code still uses constants (macros) as bounds in loops after commit
17945d317a52 (tty/vt: consolemap: use ARRAY_SIZE()). The contants are at
least macros used also in the definition of the arrays. But use
ARRAY_SIZE() on two more places to ensure the loops never run out of
bounds even if the array definition change.

Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Link: https://lore.kernel.org/r/20220614090537.15557-1-jslaby@suse.cz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/vt/consolemap.c