From: Jyri Sarha Date: Mon, 31 Oct 2022 10:51:37 +0000 (+0200) Subject: ASoC: SOF: probes: Replace [0] union members with DECLARE_FLEX_ARRAY() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=b7b080cf3c33976eb2b51f73948dd9a6109a1107;p=linux.git ASoC: SOF: probes: Replace [0] union members with DECLARE_FLEX_ARRAY() Replace probes related [0] arrays, all found within unions, with DECLARE_FLEX_ARRAY() declarations. Signed-off-by: Jyri Sarha Reviewed-by: Péter Ujfalusi Reviewed-by: Kai Vehmanen Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Signed-off-by: Péter Ujfalusi Link: https://lore.kernel.org/r/20221031105141.19037-2-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown --- diff --git a/sound/soc/sof/sof-client-probes.c b/sound/soc/sof/sof-client-probes.c index ddeabbb5580e1..e767e53f53d13 100644 --- a/sound/soc/sof/sof-client-probes.c +++ b/sound/soc/sof/sof-client-probes.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include @@ -59,8 +60,8 @@ struct sof_ipc_probe_info_params { struct sof_ipc_reply rhdr; unsigned int num_elems; union { - struct sof_probe_dma dma[0]; - struct sof_probe_point_desc desc[0]; + DECLARE_FLEX_ARRAY(struct sof_probe_dma, dma); + DECLARE_FLEX_ARRAY(struct sof_probe_point_desc, desc); }; } __packed;