[PATCH 1/5] ASoC: SOF: probes: Replace [0] union members with DECLARE_FLEX_ARRAY()
Peter Ujfalusi
peter.ujfalusi at linux.intel.com
Mon Oct 31 11:51:37 CET 2022
From: Jyri Sarha <jyri.sarha at intel.com>
Replace probes related [0] arrays, all found within unions, with
DECLARE_FLEX_ARRAY() declarations.
Signed-off-by: Jyri Sarha <jyri.sarha at intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi at linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen at linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart at linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan at linux.intel.com>
Signed-off-by: Péter Ujfalusi <peter.ujfalusi at linux.intel.com>
---
sound/soc/sof/sof-client-probes.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/sound/soc/sof/sof-client-probes.c b/sound/soc/sof/sof-client-probes.c
index ddeabbb5580e..e767e53f53d1 100644
--- a/sound/soc/sof/sof-client-probes.c
+++ b/sound/soc/sof/sof-client-probes.c
@@ -13,6 +13,7 @@
#include <linux/module.h>
#include <linux/pm_runtime.h>
#include <linux/string_helpers.h>
+#include <linux/stddef.h>
#include <sound/soc.h>
#include <sound/sof/header.h>
@@ -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;
--
2.38.1
More information about the Alsa-devel
mailing list