aboutsummaryrefslogtreecommitdiff
path: root/scripts/gdb
diff options
context:
space:
mode:
authorJonathan Cameron <[email protected]>2020-09-20 12:27:40 +0100
committerJonathan Cameron <[email protected]>2020-12-03 19:40:28 +0000
commit198cf32f0503d2ad60d320b95ef6fb8243db857f (patch)
treea28558594026d7a167976ff04f5cd9c6c1afcc3b /scripts/gdb
parent7b6b51234df6cd8b04fe736b0b89c25612d896b8 (diff)
iio:pressure:mpl3115: Force alignment of buffer
Whilst this is another case of the issue Lars reported with an array of elements of smaller than 8 bytes being passed to iio_push_to_buffers_with_timestamp(), the solution here is a bit different from the other cases and relies on __aligned working on the stack (true since 4.6?) This one is unusual. We have to do an explicit memset() each time as we are reading 3 bytes into a potential 4 byte channel which may sometimes be a 2 byte channel depending on what is enabled. As such, moving the buffer to the heap in the iio_priv structure doesn't save us much. We can't use a nice explicit structure on the stack either as the data channels have different storage sizes and are all separately controlled. Fixes: cc26ad455f57 ("iio: Add Freescale MPL3115A2 pressure / temperature sensor driver") Reported-by: Lars-Peter Clausen <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Reviewed-by: Alexandru Ardelean <[email protected]> Cc: Peter Meerwald <[email protected]> Cc: <[email protected]> Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'scripts/gdb')
0 files changed, 0 insertions, 0 deletions