OSDN Git Service

tty/vt: consolemap: introduce UNI_*() macros
authorJiri Slaby <jslaby@suse.cz>
Tue, 7 Jun 2022 10:49:20 +0000 (12:49 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Jun 2022 11:37:01 +0000 (13:37 +0200)
commit9254365443f72838a276bb2d9a9935c802e3adc8
tree8b670d1ed8c0567f985d62c39ee078e10cd0204c
parentad8a2142ba57212b73e614d5d86160a9c0ff8617
tty/vt: consolemap: introduce UNI_*() macros

The code currently does shift, OR, and AND logic directly in the code.
It is not much obvious what happens there. Therefore define four macros
for that purpose and use them in the code. We use GENMASK() so that it
is clear which bits serve what purpose:
- UNI_GLYPH: bits  0.. 5
- UNI_ROW:   bits  6..10
- UNI_DIR:   bits 11..31

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Link: https://lore.kernel.org/r/20220607104946.18710-10-jslaby@suse.cz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/vt/consolemap.c