]> www.infradead.org Git - users/jedix/linux-maple.git/commit
HID: stop exporting hid_snto32()
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Thu, 3 Oct 2024 14:46:51 +0000 (07:46 -0700)
committerBenjamin Tissoires <bentiss@kernel.org>
Fri, 4 Oct 2024 08:39:00 +0000 (10:39 +0200)
commitc653ffc283404a6c1c0e65143a833180c7ff799b
treead0e74018bac7d62e5d27f6a05db55354400cb48
parentae9b956cb26c0fd5a365629f2d723ab2fb14df79
HID: stop exporting hid_snto32()

The only user of hid_snto32() is Logitech HID++ driver, which always
calls hid_snto32() with valid size (constant, either 12 or 8) and
therefore can simply use sign_extend32().

Make the switch and remove hid_snto32(). Move snto32() and s32ton() to
avoid introducing forward declaration.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Link: https://patch.msgid.link/20241003144656.3786064-2-dmitry.torokhov@gmail.com
[bentiss: fix checkpatch warning]
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
drivers/hid/hid-core.c
drivers/hid/hid-logitech-hidpp.c
include/linux/hid.h