linux/include/sound/sof
Stephen Kitt 4fe6a63077
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 <gustavoars@kernel.org>
Signed-off-by: Stephen Kitt <steve@sk2.org>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Link: https://lore.kernel.org/r/20220217132755.1786130-1-steve@sk2.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-17 17:13:36 +00:00
..
channel_map.h ASoC: SOF/Intel: clarify SPDX license with GPL-2.0-only 2020-05-01 17:45:24 +01:00
control.h ASoC: SOF/Intel: clarify SPDX license with GPL-2.0-only 2020-05-01 17:45:24 +01:00
dai-amd.h ASoC: SOF: topology: Add support for AMD ACP DAIs 2021-11-17 17:35:54 +00:00
dai-imx.h ASoC: SOF/Intel: clarify SPDX license with GPL-2.0-only 2020-05-01 17:45:24 +01:00
dai-intel.h ASoC: SOF: dai-intel: add SOF_DAI_INTEL_SSP_CLKCTRL_MCLK/BCLK_ES bits 2021-10-05 13:08:13 +01:00
dai-mediatek.h ASoC: SOF: topology: Add support for Mediatek AFE DAI 2021-11-18 13:57:37 +00:00
dai.h ASoC: SOF: IPC: dai: Expand DAI_CONFIG IPC flags 2021-11-26 13:24:24 +00:00
debug.h ipc: debug: Add shared memory heap to memory scan 2021-12-17 11:06:19 +00:00
ext_manifest.h ASoC: SOF: ext_manifest: use explicit number for elem_type 2021-02-10 17:17:13 +00:00
header.h ASoC: SOF: IPC: Add new IPC command to free trace DMA 2021-11-15 13:26:46 +00:00
info.h ASoC: SOF: add _D3_PERSISTENT flag to fw_ready message 2022-01-24 13:31:14 +00:00
pm.h ASoC: SOF/Intel: clarify SPDX license with GPL-2.0-only 2020-05-01 17:45:24 +01:00
stream.h ASoC: SOF/Intel: clarify SPDX license with GPL-2.0-only 2020-05-01 17:45:24 +01:00
topology.h ASoC: SOF: Replace zero-length array with flexible-array member 2022-02-17 17:13:36 +00:00
trace.h ASoC: SOF: trace: Add runtime trace filtering mechanism 2020-12-07 14:22:05 +00:00
xtensa.h ASoC: SOF/Intel: clarify SPDX license with GPL-2.0-only 2020-05-01 17:45:24 +01:00