tty: sysrq: use switch in sysrq_key_table_key2index()
authorJiri Slaby <jirislaby@kernel.org>
Wed, 12 Jul 2023 08:18:05 +0000 (10:18 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 25 Jul 2023 17:21:03 +0000 (19:21 +0200)
commita27f3b72337dd6884a5c8761574503cfdd9cf37e
tree5a49770bd6c762b37b0e10f99341bf3fd8c7f6e0
parent8ac20a03da56d56a54b01dd0b62254826a84474d
tty: sysrq: use switch in sysrq_key_table_key2index()

Using switch with range cases makes the code more aligned and readable.
Expand also that 36 as explicit addition of 10 + 26 to make the source
of the constant more obvious.

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