tty/vt: Use KVAL instead of use bit operation
authorAlexey Gladkov <legion@kernel.org>
Fri, 21 Feb 2025 12:43:52 +0000 (13:43 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 25 Apr 2025 14:28:44 +0000 (16:28 +0200)
The K_HANDLERS always gets KVAL as an argument. It is better to use the
KVAL macro itself instead of bit operation.

Signed-off-by: Alexey Gladkov <legion@kernel.org>
Link: https://lore.kernel.org/r/4f199d90c7f0bc86bcaafd2f25da4cd006adcc80.1740141518.git.legion@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/vt/keyboard.c

index ae92e6a50a65a0dcfd9b9713c6b318b8fb2b5b22..ce2dcf3c824ac2f2bf1f8956d86a541b1438ea75 100644 (file)
@@ -1519,7 +1519,7 @@ static void kbd_keycode(unsigned int keycode, int down, bool hw_raw)
        if ((raw_mode || kbd->kbdmode == VC_OFF) && type != KT_SPEC && type != KT_SHIFT)
                return;
 
-       (*k_handler[type])(vc, keysym & 0xff, !down);
+       (*k_handler[type])(vc, KVAL(keysym), !down);
 
        param.ledstate = kbd->ledflagstate;
        atomic_notifier_call_chain(&keyboard_notifier_list, KBD_POST_KEYSYM, &param);