From: Jiri Slaby Date: Tue, 14 Jun 2022 09:05:37 +0000 (+0200) Subject: tty/vt: consolemap: use E_TABSZ for the translations size X-Git-Tag: baikal/mips/sdk6.1~5078^2~84 X-Git-Url: https://git.baikalelectronics.ru/sdk/?a=commitdiff_plain;h=62604de0649d15049863505dca15c306d6582863;p=kernel.git tty/vt: consolemap: use E_TABSZ for the translations size The code expects "translations" to have 256 (E_TABSZ) values. Use the macro instead of the constant to be explicit about this. Suggested-by: Ilpo Järvinen Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20220614090537.15557-8-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/tty/vt/consolemap.c b/drivers/tty/vt/consolemap.c index 5f3e58165b989..f02d21e2a96e4 100644 --- a/drivers/tty/vt/consolemap.c +++ b/drivers/tty/vt/consolemap.c @@ -38,7 +38,7 @@ #include #include -static unsigned short translations[][256] = { +static unsigned short translations[][E_TABSZ] = { /* 8-bit Latin-1 mapped to Unicode -- trivial mapping */ [LAT1_MAP] = { 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,