]> www.infradead.org Git - users/jedix/linux-maple.git/commit
HID: simplify code in fetch_item()
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Tue, 1 Oct 2024 15:42:36 +0000 (08:42 -0700)
committerBenjamin Tissoires <bentiss@kernel.org>
Fri, 4 Oct 2024 08:36:39 +0000 (10:36 +0200)
commit61595012f28036a58293df5a2ab75f80ca15c327
treea119b068e20e1918a7026df18dc61aa8a749aa38
parentf23aa4c0761a70bfd046dd5755281667f0769a94
HID: simplify code in fetch_item()

We can easily calculate the size of the item using arithmetic (shifts).
This allows to pull duplicated code out of the switch statement, making
it cleaner.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Link: https://patch.msgid.link/ZvwYbESMZ667QZqY@google.com
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
drivers/hid/hid-core.c