Skip to contentSkip to conversation

ASoC: SDCA: correct the calculation of the maximum init table size

PATCH In review [email protected] 3 participants 3 messages Jul 21, 2025

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 ASoC: SDCA: correct the calculation of the maximum init table size

From: Shuming Fan <[email protected]>

One initial setting is 5 bytes, so num_init_writes should divide by 5.

---
 sound/soc/sdca/sdca_functions.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/sdca/sdca_functions.c +1 -1
index 4b6da587c4ac..93767e73bc5f 100644
@@ -212,7 +212,7 @@ static int find_sdca_init_table(struct device *dev,
 	} else if (num_init_writes % sizeof(*raw) != 0) {
 		dev_err(dev, "%pfwP: init table size invalid\n", function_node);
 		return -EINVAL;
-	} else if (num_init_writes > SDCA_MAX_INIT_COUNT) {
+	} else if ((num_init_writes / sizeof(*raw)) > SDCA_MAX_INIT_COUNT) {
 		dev_err(dev, "%pfwP: maximum init table size exceeded\n", function_node);
 		return -EINVAL;
 	}
Signature · 1 line
2.34.1
maintainer
#2 lore raw
In reply to [email protected]
Quoted 3 lines · On Mon, 21 Jul 2025 19:23:34 +0800, [email protected] wrote:

One initial setting is 5 bytes, so num_init_writes should divide by 5.

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/2] ASoC: SDCA: correct the calculation of the maximum init table size

      commit: 9e55f1192648a5b327f03c60e411126b3d19c5c5

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