Closed GustavoARSilva closed 2 years ago
Yes, data
can no longer be used as a pointer in that way:
diff --git a/sound/soc/sof/topology.c b/sound/soc/sof/topology.c
index e72dcae5e7ee..1d119d1dd69d 100644
--- a/sound/soc/sof/topology.c
+++ b/sound/soc/sof/topology.c
@@ -2164,7 +2164,7 @@ static int sof_process_load(struct snd_soc_component *scomp, int index,
*/
if (ipc_data_size) {
for (i = 0; i < widget->num_kcontrols; i++) {
- memcpy(&process->data + offset,
+ memcpy(&process->data[offset],
wdata[i].pdata->data,
wdata[i].pdata->size);
offset += wdata[i].pdata->size;
Yes,
data
can no longer be used as a pointer in that way:diff --git a/sound/soc/sof/topology.c b/sound/soc/sof/topology.c index e72dcae5e7ee..1d119d1dd69d 100644 --- a/sound/soc/sof/topology.c +++ b/sound/soc/sof/topology.c @@ -2164,7 +2164,7 @@ static int sof_process_load(struct snd_soc_component *scomp, int index, */ if (ipc_data_size) { for (i = 0; i < widget->num_kcontrols; i++) { - memcpy(&process->data + offset, + memcpy(&process->data[offset], wdata[i].pdata->data, wdata[i].pdata->size); offset += wdata[i].pdata->size;
Yep; please, feel free to send a proper patch for this if you wish to (and add a link to this issue in the changelog text). :)
Thanks, I’ll take care of it in the next day or two.
Mark Brown just took a fix for this issue in his -next tree: https://lore.kernel.org/lkml/164512273904.3993052.15786188783009967860.b4-ty@kernel.org/
The following patch causes an 'invalid use of flexible array member' error:
error: invalid use of flexible array member: