Skip to contentSkip to conversation

ASoC: sophgo: Drop redundant error messages

PATCH In review [email protected] 2 participants 3 messages Aug 3 – Aug 7

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

PATCH 1/2 ASoC: sophgo: Drop redundant error messages

From: bui duc phuc <[email protected]>

The called functions already log failures where appropriate. Return the original error directly and avoid duplicate error messages.

---
 sound/soc/sophgo/cv1800b-tdm.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
sound/soc/sophgo/cv1800b-tdm.c +1 -3
index 4cbac8c1160f..a97f775aeddc 100644
@@ -677,10 +677,8 @@ static int cv1800b_i2s_probe(struct platform_device *pdev)
 		return ret;
 
 	ret = devm_snd_dmaengine_pcm_register(dev, &cv1800b_i2s_pcm_config, 0);
-	if (ret) {
-		dev_err(dev, "dmaengine_pcm_register failed: %d\n", ret);
+	if (ret)
 		return ret;
-	}
 
 	return 0;
 }
Signature · 1 line
2.43.0
#1 lore raw

PATCH 2/2 ASoC: sophgo: remove unneeded devm_kmemdup() for DAI driver

From: bui duc phuc <[email protected]>

cv1800b_i2s_dai_template is never modified on a per-instance basis, so there is no need to duplicate it before registering the component.

Pass the template directly to devm_snd_soc_register_component(), remove the now-unused local dai pointer, and drop the template's const qualifier to match the current ASoC API.

---
 sound/soc/sophgo/cv1800b-tdm.c | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)
sound/soc/sophgo/cv1800b-tdm.c +3 -9
index a97f775aeddc..4badb6e3e08b 100644
@@ -558,7 +558,7 @@ static const struct snd_soc_dai_ops cv1800b_i2s_dai_ops = {
 	.set_sysclk = cv1800b_i2s_dai_set_sysclk,
 };
 
-static const struct snd_soc_dai_driver cv1800b_i2s_dai_template = {
+static struct snd_soc_dai_driver cv1800b_i2s_dai_template = {
 	.name = "cv1800b-i2s",
 	.playback = {
 		.stream_name = "Playback",
@@ -636,7 +636,6 @@ static int cv1800b_i2s_probe(struct platform_device *pdev)
 	struct cv1800b_i2s *i2s;
 	struct resource *res;
 	void __iomem *regs;
-	struct snd_soc_dai_driver *dai;
 	int ret;
 
 	i2s = devm_kzalloc(dev, sizeof(*i2s), GFP_KERNEL);
@@ -666,13 +665,8 @@ static int cv1800b_i2s_probe(struct platform_device *pdev)
 	platform_set_drvdata(pdev, i2s);
 	cv1800b_i2s_setup_tdm(i2s);
 
-	dai = devm_kmemdup(dev, &cv1800b_i2s_dai_template, sizeof(*dai),
-			   GFP_KERNEL);
-	if (!dai)
-		return -ENOMEM;
-
-	ret = devm_snd_soc_register_component(dev, &cv1800b_i2s_component, dai,
-					      1);
+	ret = devm_snd_soc_register_component(dev, &cv1800b_i2s_component,
+					      &cv1800b_i2s_dai_template, 1);
 	if (ret)
 		return ret;
 
Signature · 1 line
2.43.0
maintainer
#2 lore raw
In reply to [email protected]
Quoted 1 line · On Mon, 03 Aug 2026 13:16:04 +0700, [email protected] wrote:

ASoC: sophgo: Drop redundant error messages

Applied to

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

Thanks!

[1/2] ASoC: sophgo: Drop redundant error messages

      https://git.kernel.org/broonie/sound/c/85665ff342c7
[2/2] ASoC: sophgo: remove unneeded devm_kmemdup() for DAI driver
      https://git.kernel.org/broonie/sound/c/6d0451f9bf1a

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