]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
iio: adc: rockchip: correct alignment of timestamp
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 15 Dec 2024 18:29:11 +0000 (18:29 +0000)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 28 Dec 2024 14:28:16 +0000 (14:28 +0000)
commitec2253b064b4b1b074a5a2e0ca0f89fcec323418
tree2fa898a10111429cd1a5a540a18643fd62a1cfd9
parent27e6ddf291b1c05bfcc3534e8212ed6c46447c60
iio: adc: rockchip: correct alignment of timestamp

I assume this device is only used on architectures where a 8 byte
integer type is always 8 byte aligned.  However, I would prefer IIO
drivers to never make that assumption as the code gets copied into
new drivers which are not so tightly couple to one driver and those
can run on architectures that align these types to only 4 bytes in which
case this structure may be 4 byte to small leading to a buffer overrun.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20241215182912.481706-21-jic23@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/rockchip_saradc.c