]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
Input: rmi4 - change reg_size type to u32
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Tue, 5 May 2026 04:59:43 +0000 (21:59 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Fri, 12 Jun 2026 05:39:29 +0000 (22:39 -0700)
commit5fcb6013dd2e2c9b4db3c5a512639371cc04d04e
tree234766490cb2f3e258a52498495058efc99f3804
parent3d353b06d1151badda2fed7e02704f058cfbc812
Input: rmi4 - change reg_size type to u32

Change reg_size from unsigned long to u32 to save space and ensure
consistent size across 32-bit and 64-bit architectures, and use
DECLARE_BITMAP() for subpacket_map.

Also pack the structure by rearranging the members to avoid holes,
and use size_add() to prevent potential integer overflows when
calculating the total size of registers.

Assisted-by: Gemini:gemini-3.1-pro
Link: https://patch.msgid.link/20260505045952.1570713-13-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/rmi4/rmi_2d_sensor.h
drivers/input/rmi4/rmi_driver.c
drivers/input/rmi4/rmi_driver.h
drivers/input/rmi4/rmi_f11.c
drivers/input/rmi4/rmi_f12.c