diff options
author | Stephen Kitt <[email protected]> | 2022-02-17 14:27:55 +0100 |
---|---|---|
committer | Mark Brown <[email protected]> | 2022-02-17 17:13:36 +0000 |
commit | 4fe6a63077a6d3c143d68f6b96e4051f1d0740ac (patch) | |
tree | f09d17235e6594f0cefd4695631cea25644b64c5 /tools/perf/scripts/python | |
parent | 83bfc7e793b555291785136c3ae86abcdc046887 (diff) |
ASoC: SOF: Replace zero-length array with flexible-array member
There is a regular need in the kernel to provide a way to declare having
a dynamically sized set of trailing elements in a structure. Kernel code
should always use "flexible array members"[1] for these cases. The older
style of one-element or zero-length arrays should no longer be used[2].
This helps with the ongoing efforts to globally enable -Warray-bounds
and get us closer to being able to tighten the FORTIFY_SOURCE routines
on memcpy().
[1] https://en.wikipedia.org/wiki/Flexible_array_member
[2] https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays
Link: https://github.com/KSPP/linux/issues/78
Link: https://github.com/KSPP/linux/issues/180
Suggested-by: Gustavo A. R. Silva <[email protected]>
Signed-off-by: Stephen Kitt <[email protected]>
Acked-by: Pierre-Louis Bossart <[email protected]>
Reviewed-by: Gustavo A. R. Silva <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mark Brown <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions