All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: amd: Don't show messages about deferred probing by default
@ 2021-06-11 18:51 Mario Limonciello
  2021-07-21 16:49 ` Limonciello, Mario
  0 siblings, 1 reply; 2+ messages in thread
From: Mario Limonciello @ 2021-06-11 18:51 UTC (permalink / raw)
  To: Takashi Iwai,
	moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM...
  Cc: markpearson, Mario Limonciello, Vijendar Mukunda

Nearly every boot with a Lenovo P14s is showing
acp_pdm_mach acp_pdm_mach.0: snd_soc_register_card(acp) failed: -517

This isn't useful to a user, especially as probing will run again.
Downgrade the message to debug, and only show errors.

CC: markpearson@lenovo.com
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
 sound/soc/amd/renoir/acp3x-rn.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/sound/soc/amd/renoir/acp3x-rn.c b/sound/soc/amd/renoir/acp3x-rn.c
index 306134b89a82..e785994de614 100644
--- a/sound/soc/amd/renoir/acp3x-rn.c
+++ b/sound/soc/amd/renoir/acp3x-rn.c
@@ -54,9 +54,14 @@ static int acp_probe(struct platform_device *pdev)
 	snd_soc_card_set_drvdata(card, machine);
 	ret = devm_snd_soc_register_card(&pdev->dev, card);
 	if (ret) {
-		dev_err(&pdev->dev,
-			"snd_soc_register_card(%s) failed: %d\n",
-			acp_card.name, ret);
+		if (ret != -EPROBE_DEFER)
+			dev_err(&pdev->dev,
+				"snd_soc_register_card(%s) failed: %d\n",
+				card->name, ret);
+		else
+			dev_dbg(&pdev->dev,
+				"snd_soc_register_card(%s) probe deferred: %d\n",
+				card->name, ret);
 		return ret;
 	}
 	return 0;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* RE: [PATCH] ASoC: amd: Don't show messages about deferred probing by default
  2021-06-11 18:51 [PATCH] ASoC: amd: Don't show messages about deferred probing by default Mario Limonciello
@ 2021-07-21 16:49 ` Limonciello, Mario
  0 siblings, 0 replies; 2+ messages in thread
From: Limonciello, Mario @ 2021-07-21 16:49 UTC (permalink / raw)
  To: Limonciello, Mario, Takashi Iwai,
	moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM...
  Cc: markpearson, Mukunda, Vijendar

[Public]

> -----Original Message-----
> From: Limonciello, Mario <mario.limonciello@amd.com>
> Sent: Friday, June 11, 2021 13:52
> To: Takashi Iwai <tiwai@suse.com>; moderated list:SOUND - SOC LAYER /
> DYNAMIC AUDIO POWER MANAGEM... <alsa-devel@alsa-project.org>
> Cc: Mukunda, Vijendar <Vijendar.Mukunda@amd.com>; Limonciello, Mario
> <Mario.Limonciello@amd.com>; markpearson@lenovo.com
> Subject: [PATCH] ASoC: amd: Don't show messages about deferred probing by
> default
> 
> Nearly every boot with a Lenovo P14s is showing
> acp_pdm_mach acp_pdm_mach.0: snd_soc_register_card(acp) failed: -517
> 
> This isn't useful to a user, especially as probing will run again.
> Downgrade the message to debug, and only show errors.
> 
> CC: markpearson@lenovo.com
> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
> ---
>  sound/soc/amd/renoir/acp3x-rn.c | 11 ++++++++---
>  1 file changed, 8 insertions(+), 3 deletions(-)
> 
> diff --git a/sound/soc/amd/renoir/acp3x-rn.c b/sound/soc/amd/renoir/acp3x-
> rn.c
> index 306134b89a82..e785994de614 100644
> --- a/sound/soc/amd/renoir/acp3x-rn.c
> +++ b/sound/soc/amd/renoir/acp3x-rn.c
> @@ -54,9 +54,14 @@ static int acp_probe(struct platform_device *pdev)
>  	snd_soc_card_set_drvdata(card, machine);
>  	ret = devm_snd_soc_register_card(&pdev->dev, card);
>  	if (ret) {
> -		dev_err(&pdev->dev,
> -			"snd_soc_register_card(%s) failed: %d\n",
> -			acp_card.name, ret);
> +		if (ret != -EPROBE_DEFER)
> +			dev_err(&pdev->dev,
> +				"snd_soc_register_card(%s) failed: %d\n",
> +				card->name, ret);
> +		else
> +			dev_dbg(&pdev->dev,
> +				"snd_soc_register_card(%s) probe deferred:
> %d\n",
> +				card->name, ret);
>  		return ret;
>  	}
>  	return 0;
> --
> 2.25.1

Hi Takashi, Vijendar,

Did you see this?

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-07-21 16:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-11 18:51 [PATCH] ASoC: amd: Don't show messages about deferred probing by default Mario Limonciello
2021-07-21 16:49 ` Limonciello, Mario

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.