]> www.infradead.org Git - users/willy/xarray.git/commit
HID: change return type of report_fixup() to const
authorThomas Weißschuh <linux@weissschuh.net>
Sat, 3 Aug 2024 12:34:22 +0000 (14:34 +0200)
committerBenjamin Tissoires <bentiss@kernel.org>
Tue, 27 Aug 2024 14:29:55 +0000 (16:29 +0200)
commitfe73965d078670406acee0218f118c0870d6a58b
treeb343efa1c3955abb57b534b7c320780fac3c9c8c
parent3593630c89d7d3963c42262694f8aa8b4727a0ad
HID: change return type of report_fixup() to const

By allowing the drivers to return a "const *" they can constify their
static report arrays.
This makes it clear to driver authors that the HID core will not modify
those reports and they can be reused for multiple devices.
Furthermore security is slightly improved as those reports are protected
against accidental or malicious modifications.

[bentiss: fixup hid-cougar.c and hid-multitouch.c for latest version of
the master branch]

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://patch.msgid.link/20240803-hid-const-fixup-v2-6-f53d7a7b29d8@weissschuh.net
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
51 files changed:
drivers/hid/hid-apple.c
drivers/hid/hid-asus.c
drivers/hid/hid-aureal.c
drivers/hid/hid-bigbenff.c
drivers/hid/hid-cherry.c
drivers/hid/hid-chicony.c
drivers/hid/hid-cmedia.c
drivers/hid/hid-corsair.c
drivers/hid/hid-cougar.c
drivers/hid/hid-cypress.c
drivers/hid/hid-dr.c
drivers/hid/hid-elecom.c
drivers/hid/hid-gembird.c
drivers/hid/hid-glorious.c
drivers/hid/hid-holtek-kbd.c
drivers/hid/hid-holtek-mouse.c
drivers/hid/hid-ite.c
drivers/hid/hid-keytouch.c
drivers/hid/hid-kye.c
drivers/hid/hid-lenovo.c
drivers/hid/hid-lg.c
drivers/hid/hid-logitech-hidpp.c
drivers/hid/hid-macally.c
drivers/hid/hid-magicmouse.c
drivers/hid/hid-maltron.c
drivers/hid/hid-microsoft.c
drivers/hid/hid-monterey.c
drivers/hid/hid-multitouch.c
drivers/hid/hid-nti.c
drivers/hid/hid-ortek.c
drivers/hid/hid-petalynx.c
drivers/hid/hid-prodikeys.c
drivers/hid/hid-pxrc.c
drivers/hid/hid-redragon.c
drivers/hid/hid-saitek.c
drivers/hid/hid-samsung.c
drivers/hid/hid-semitek.c
drivers/hid/hid-sensor-hub.c
drivers/hid/hid-sigmamicro.c
drivers/hid/hid-sony.c
drivers/hid/hid-steelseries.c
drivers/hid/hid-sunplus.c
drivers/hid/hid-topre.c
drivers/hid/hid-uclogic-core.c
drivers/hid/hid-viewsonic.c
drivers/hid/hid-vrc2.c
drivers/hid/hid-waltop.c
drivers/hid/hid-winwing.c
drivers/hid/hid-xiaomi.c
drivers/hid/hid-zydacron.c
include/linux/hid.h