summaryrefslogtreecommitdiff
path: root/drivers/tty/vt/consolemap.c
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2022-06-14 12:05:37 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-06-27 15:17:12 +0300
commit2a9c56cceec04c50490befd5662423e3bb8c476f (patch)
tree585c1a73bf0df23454b05ebee69d255e6563dfe9 /drivers/tty/vt/consolemap.c
parenta666c70c0c2c63a60b5672a14b022da9376cffb9 (diff)
downloadlinux-2a9c56cceec04c50490befd5662423e3bb8c476f.tar.xz
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 <ilpo.jarvinen@linux.intel.com> Signed-off-by: Jiri Slaby <jslaby@suse.cz> Link: https://lore.kernel.org/r/20220614090537.15557-8-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/vt/consolemap.c')
-rw-r--r--drivers/tty/vt/consolemap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/tty/vt/consolemap.c b/drivers/tty/vt/consolemap.c
index 5f3e58165b98..f02d21e2a96e 100644
--- a/drivers/tty/vt/consolemap.c
+++ b/drivers/tty/vt/consolemap.c
@@ -38,7 +38,7 @@
#include <linux/vt_kern.h>
#include <linux/string.h>
-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,