summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2024-10-03 17:46:51 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-09-09 19:58:04 +0300
commitd6cfa97a4d6f31b29a5c0994283d1e97ca6ba925 (patch)
tree3342fd66cba4003252a8357a43f85d1bdcca6aaf /include
parent7a7ba33110698166b488a06cdc04a16ca3dba176 (diff)
downloadlinux-d6cfa97a4d6f31b29a5c0994283d1e97ca6ba925.tar.xz
HID: stop exporting hid_snto32()
[ Upstream commit c653ffc283404a6c1c0e65143a833180c7ff799b ] 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> Stable-dep-of: a6b87bfc2ab5 ("HID: core: Harden s32ton() against conversion to 0 bits") Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/hid.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/include/linux/hid.h b/include/linux/hid.h
index 017d31f1d27b..7d8d09318fa9 100644
--- a/include/linux/hid.h
+++ b/include/linux/hid.h
@@ -978,7 +978,6 @@ const struct hid_device_id *hid_match_device(struct hid_device *hdev,
struct hid_driver *hdrv);
bool hid_compare_device_paths(struct hid_device *hdev_a,
struct hid_device *hdev_b, char separator);
-s32 hid_snto32(__u32 value, unsigned n);
__u32 hid_field_extract(const struct hid_device *hid, __u8 *report,
unsigned offset, unsigned n);