summaryrefslogtreecommitdiff
path: root/drivers/platform
diff options
context:
space:
mode:
authorGustavo A. R. Silva <gustavoars@kernel.org>2023-03-06 23:59:04 +0300
committerTzung-Bi Shih <tzungbi@kernel.org>2023-04-24 08:35:11 +0300
commit32d2a15ec54a3d8b708b343e50072ccb0e5da83f (patch)
tree87dee3788924eace1c7f9a14262005aea4ea440f /drivers/platform
parent7e364e56293bb98cae1b55fd835f5991c4e96e7d (diff)
downloadlinux-32d2a15ec54a3d8b708b343e50072ccb0e5da83f.tar.xz
platform/chrome: Replace fake flexible arrays with flexible-array member
Zero-length arrays as fake flexible arrays are deprecated and we are moving towards adopting C99 flexible-array members instead. Use the DECLARE_FLEX_ARRAY() helper macro to transform zero-length arrays in unions with flexible-array members. Address the following warning found with GCC-13 and -fstrict-flex-arrays=3 enabled: drivers/iio/accel/cros_ec_accel_legacy.c:66:46: warning: array subscript <unknown> is outside array bounds of ‘struct ec_response_motion_sensor_data[0]’ [-Warray-bounds=] This helps with the ongoing efforts to tighten the FORTIFY_SOURCE routines on memcpy() and help us make progress towards globally enabling -fstrict-flex-arrays=3 [1]. Link: https://github.com/KSPP/linux/issues/21 Link: https://github.com/KSPP/linux/issues/193 Link: https://github.com/KSPP/linux/issues/262 Link: https://gcc.gnu.org/pipermail/gcc-patches/2022-October/602902.html [1] Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org> Link: https://lore.kernel.org/r/ZAZUGBmSLc5wg7AK@work
Diffstat (limited to 'drivers/platform')
0 files changed, 0 insertions, 0 deletions