* [PATCH v3 2/2] ASoC: amd: Use dev_probe_err helper
2021-07-22 13:27 [PATCH v3 1/2] ASoC: amd: Don't show messages about deferred probing by default Mario Limonciello
@ 2021-07-22 13:27 ` Mario Limonciello
2021-07-23 12:38 ` [PATCH v3 1/2] ASoC: amd: Don't show messages about deferred probing by default Mark Brown
2021-07-23 17:01 ` Mark Brown
2 siblings, 0 replies; 6+ messages in thread
From: Mario Limonciello @ 2021-07-22 13:27 UTC (permalink / raw)
To: broonie, alsa-devel, Vijendar.Mukunda
Cc: Mario Limonciello, Liam Girdwood, Jaroslav Kysela, Takashi Iwai,
Kuninori Morimoto, Chuhong Yuan, Ravulapati Vishnu vardhan rao,
Tzung-Bi Shih, Akshu Agrawal, open list
Replace the pattern of check for err to match -EPROBE_DEFER and only
output errors to use the dev_err_probe helper instead.
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
sound/soc/amd/acp-da7219-max98357a.c | 12 +++---------
sound/soc/amd/acp3x-rt5682-max9836.c | 14 ++++----------
2 files changed, 7 insertions(+), 19 deletions(-)
diff --git a/sound/soc/amd/acp-da7219-max98357a.c b/sound/soc/amd/acp-da7219-max98357a.c
index 84e3906abd4f..c130eeb07cdf 100644
--- a/sound/soc/amd/acp-da7219-max98357a.c
+++ b/sound/soc/amd/acp-da7219-max98357a.c
@@ -746,15 +746,9 @@ static int cz_probe(struct platform_device *pdev)
snd_soc_card_set_drvdata(card, machine);
ret = devm_snd_soc_register_card(&pdev->dev, card);
if (ret) {
- if (ret != -EPROBE_DEFER)
- dev_err(&pdev->dev,
- "devm_snd_soc_register_card(%s) failed: %d\n",
- card->name, ret);
- else
- dev_dbg(&pdev->dev,
- "devm_snd_soc_register_card(%s) probe deferred: %d\n",
- card->name, ret);
- return ret;
+ return dev_err_probe(&pdev->dev, ret,
+ "devm_snd_soc_register_card(%s) failed\n",
+ card->name);
}
bt_uart_enable = !device_property_read_bool(&pdev->dev,
"bt-pad-enable");
diff --git a/sound/soc/amd/acp3x-rt5682-max9836.c b/sound/soc/amd/acp3x-rt5682-max9836.c
index d9980aba2910..e561464f7d60 100644
--- a/sound/soc/amd/acp3x-rt5682-max9836.c
+++ b/sound/soc/amd/acp3x-rt5682-max9836.c
@@ -512,17 +512,11 @@ static int acp3x_probe(struct platform_device *pdev)
ret = devm_snd_soc_register_card(&pdev->dev, card);
if (ret) {
- if (ret != -EPROBE_DEFER)
- dev_err(&pdev->dev,
- "devm_snd_soc_register_card(%s) failed: %d\n",
- card->name, ret);
- else
- dev_dbg(&pdev->dev,
- "devm_snd_soc_register_card(%s) probe deferred: %d\n",
- card->name, ret);
+ return dev_err_probe(&pdev->dev, ret,
+ "devm_snd_soc_register_card(%s) failed\n",
+ card->name);
}
-
- return ret;
+ return 0;
}
static const struct acpi_device_id acp3x_audio_acpi_match[] = {
--
2.25.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v3 1/2] ASoC: amd: Don't show messages about deferred probing by default
2021-07-22 13:27 [PATCH v3 1/2] ASoC: amd: Don't show messages about deferred probing by default Mario Limonciello
2021-07-22 13:27 ` [PATCH v3 2/2] ASoC: amd: Use dev_probe_err helper Mario Limonciello
@ 2021-07-23 12:38 ` Mark Brown
2021-07-23 13:04 ` Limonciello, Mario
2021-07-23 17:01 ` Mark Brown
2 siblings, 1 reply; 6+ messages in thread
From: Mark Brown @ 2021-07-23 12:38 UTC (permalink / raw)
To: Mario Limonciello
Cc: alsa-devel, Vijendar.Mukunda, markpearson, Liam Girdwood,
Jaroslav Kysela, Takashi Iwai, open list
[-- Attachment #1: Type: text/plain, Size: 472 bytes --]
On Thu, Jul 22, 2021 at 08:27:27AM -0500, Mario Limonciello wrote:
> This isn't useful to a user, especially as probing will run again.
> Use the dev_err_probe helper to hide the deferrerd probing messages.
The reason we have these error messages is that they are very useful to
users if they ever find that the device isn't instantiating due to some
missing dependency or something that leaves it stuck in probe deferral,
they give some hint as to what might be wrong.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v3 1/2] ASoC: amd: Don't show messages about deferred probing by default
2021-07-22 13:27 [PATCH v3 1/2] ASoC: amd: Don't show messages about deferred probing by default Mario Limonciello
2021-07-22 13:27 ` [PATCH v3 2/2] ASoC: amd: Use dev_probe_err helper Mario Limonciello
2021-07-23 12:38 ` [PATCH v3 1/2] ASoC: amd: Don't show messages about deferred probing by default Mark Brown
@ 2021-07-23 17:01 ` Mark Brown
2 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2021-07-23 17:01 UTC (permalink / raw)
To: alsa-devel, Vijendar.Mukunda, Mario Limonciello
Cc: Mark Brown, Jaroslav Kysela, Liam Girdwood, Takashi Iwai,
open list, markpearson
On Thu, 22 Jul 2021 08:27:27 -0500, Mario Limonciello wrote:
> 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.
> Use the dev_err_probe helper to hide the deferrerd probing messages.
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/2] ASoC: amd: Don't show messages about deferred probing by default
commit: af7dc6f194a866cb3e991ef5248ffdeb3ef5c46a
[2/2] ASoC: amd: Use dev_probe_err helper
commit: 718693352d8bcea65276615f4f8c8d531246b644
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
^ permalink raw reply [flat|nested] 6+ messages in thread