tty: vt: decrypt magic constants in vc_is_control()
authorJiri Slaby (SUSE) <jirislaby@kernel.org>
Fri, 2 Feb 2024 06:56:08 +0000 (07:56 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 6 Feb 2024 14:37:39 +0000 (14:37 +0000)
commit6cc3028f797a549f256d593867a769ab6a8265f2
treee16375e5f706057d3f5ccd383d99f04fbd1f444d
parent3701400a39d5964be767f9c085dffb9dd21c7f59
tty: vt: decrypt magic constants in vc_is_control()

0x0d00ff81 and 0x0800f501 are bitmasks of ASCII characters. Spell them
explicitly using BIT() + ASCII constants. GENMASK() is used for the
9-bit range in CTRL_ACTION.

This also modifies the 'if' checking if the masks should be applied.
>From a "random" ' ' to the actual size of the bitmasks' type.

Signed-off-by: "Jiri Slaby (SUSE)" <jirislaby@kernel.org>
Link: https://lore.kernel.org/r/20240202065608.14019-23-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/vt/vt.c