OSDN Git Service

hid: clarify hid_keyboard_process_keycode
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 14 Jul 2015 09:18:06 +0000 (11:18 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Fri, 17 Jul 2015 06:44:41 +0000 (08:44 +0200)
commit562f93754b95fd6dc65ad9a2aa15a90b2da7e8a4
tree1a84f3aaa92ab174886266332573e4382c833e1a
parente2f6bac3010419426b636d2b307f66deecd60813
hid: clarify hid_keyboard_process_keycode

Coverity thinks the fallthroughs are smelly.  They are correct, but
everything else in this function is like "wut?".

Refer explicitly to bits 8 and 9 of hs->kbd.modifiers instead of
shifting right first and using (1 << 7).  Document what the scancode
is when hid_code is 0xe0.  And add plenty of comments.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
hw/input/hid.c