diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2023-07-14 12:17:48 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2023-07-14 16:44:39 +0300 |
commit | 75e308ffc4f0d36b895f1110ece8b77d4116fdb1 (patch) | |
tree | 3c3f612b0c248bcc5740b0376fc6effed9081fe8 /drivers/spi/spi-imx.c | |
parent | 169f5312dc46deb986e368b6828bedbedd297f6e (diff) | |
download | linux-75e308ffc4f0d36b895f1110ece8b77d4116fdb1.tar.xz |
spi: Use struct_size() helper
The Documentation/process/deprecated.rst suggests to use flexible array
members to provide a way to declare having a dynamically sized set of
trailing elements in a structure.This makes code robust agains bunch of
the issues described in the documentation, main of which is about the
correctness of the sizeof() calculation for this data structure.
Due to above, prefer struct_size() over open-coded versions.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20230714091748.89681-5-andriy.shevchenko@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-imx.c')
0 files changed, 0 insertions, 0 deletions