Commit d6cfa97a authored by Dmitry Torokhov's avatar Dmitry Torokhov Committed by Greg Kroah-Hartman
Browse files

HID: stop exporting hid_snto32()



[ Upstream commit c653ffc2 ]

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: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
Link: https://patch.msgid.link/20241003144656.3786064-2-dmitry.torokhov@gmail.com


[bentiss: fix checkpatch warning]
Signed-off-by: default avatarBenjamin Tissoires <bentiss@kernel.org>
Stable-dep-of: a6b87bfc ("HID: core: Harden s32ton() against conversion to 0 bits")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 7a7ba331
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment