ASoC: SOF: IPC3 topology: Print the conflicting bytes sizes
Subsystems (3)
Peter Ujfalusi
maintainerPATCH 1/1 ASoC: SOF: IPC3 topology: Print the conflicting bytes sizes
From: Seppo Ingalsuo <[email protected]>
The error "Conflict in bytes vs. priv size." is too brief. With the printed sizes it's a lot easier to find the size issue in for binary control if such happens.
--- sound/soc/sof/ipc3-topology.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
sound/soc/sof/ipc3-topology.c +5 -2
@@ -1651,6 +1651,7 @@ static int sof_ipc3_route_setup(struct snd_sof_dev *sdev, struct snd_sof_route *static int sof_ipc3_control_load_bytes (struct snd_sof_dev *sdev,struct snd_sof_control *scontrol) {struct sof_ipc_ctrl_data *cdata; +size_t priv_size_check;int ret;if (scontrol->max_size < (sizeof (*cdata) +sizeof (struct sof_abi_hdr ))) {
@@ -1694,8 +1695,10 @@ static int sof_ipc3_control_load_bytes(struct snd_sof_dev *sdev, struct snd_sof_ goto err; } -if (cdata->data->size +sizeof (struct sof_abi_hdr ) != scontrol->priv_size) { -dev_err (sdev->dev,"Conflict in bytes vs. priv size.\n" ); + priv_size_check = cdata->data->size +sizeof (struct sof_abi_hdr ); +if (priv_size_check != scontrol->priv_size) { +dev_err (sdev->dev,"Conflict in bytes (%zu) vs. priv size (%zu).\n" , + priv_size_check, scontrol->priv_size); ret = -EINVAL ; goto err; }
Signature · 1 line
2.39.0
Mark Brown
maintainerQuoted 5 lines · Peter Ujfalusi
The error "Conflict in bytes vs. priv size." is too brief. With the printed sizes it's a lot easier to find the size issue in for binary control if such happens.
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoC: SOF: IPC3 topology: Print the conflicting bytes sizes
commit: 8a0eb06e0c9a613fce989e9d94de3f290b81e356
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark