aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/util/c++/clang-test.cpp
diff options
context:
space:
mode:
authorJonathan Cameron <[email protected]>2020-06-07 16:53:57 +0100
committerJonathan Cameron <[email protected]>2020-07-05 14:22:48 +0100
commit8db4afe163bbdd93dca6fcefbb831ef12ecc6b4d (patch)
tree3f2876b1ccc07084d5f0f3903acdea803ff18f46 /tools/perf/util/c++/clang-test.cpp
parent5c49056ad9f3c786f7716da2dd47e4488fc6bd25 (diff)
iio:pressure:ms5611 Fix buffer element alignment
One of a class of bugs pointed out by Lars in a recent review. iio_push_to_buffers_with_timestamp assumes the buffer used is aligned to the size of the timestamp (8 bytes). This is not guaranteed in this driver which uses an array of smaller elements on the stack. Here there is no data leak possibility so use an explicit structure on the stack to ensure alignment and nice readable fashion. The forced alignment of ts isn't strictly necessary in this driver as the padding will be correct anyway (there isn't any). However it is probably less fragile to have it there and it acts as documentation of the requirement. Fixes: 713bbb4efb9dc ("iio: pressure: ms5611: Add triggered buffer support") Reported-by: Lars-Peter Clausen <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]> Acked-by: Tomasz Duszynski <[email protected]> Cc: <[email protected]>
Diffstat (limited to 'tools/perf/util/c++/clang-test.cpp')
0 files changed, 0 insertions, 0 deletions