* [PATCH] ASoC: soc-core: remove error due to probe deferral
@ 2019-01-18 9:55 Stefan Agner
2019-01-18 18:38 ` Applied "ASoC: soc-core: remove error due to probe deferral" to the asoc tree Mark Brown
0 siblings, 1 reply; 10+ messages in thread
From: Stefan Agner @ 2019-01-18 9:55 UTC (permalink / raw)
To: perex, lgirdwood, broonie; +Cc: tiwai, alsa-devel, linux-kernel, Stefan Agner
Deferred probes shouldn't cause error messages in the boot log, so
change the dev_err() to the more harmless dev_info().
Signed-off-by: Stefan Agner <stefan@agner.ch>
---
sound/soc/soc-core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index b29d0f65611e..ba9b09517c5f 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -903,8 +903,8 @@ static int soc_bind_dai_link(struct snd_soc_card *card,
for (i = 0; i < rtd->num_codecs; i++) {
codec_dais[i] = snd_soc_find_dai(&codecs[i]);
if (!codec_dais[i]) {
- dev_err(card->dev, "ASoC: CODEC DAI %s not registered\n",
- codecs[i].dai_name);
+ dev_info(card->dev, "ASoC: CODEC DAI %s not registered\n",
+ codecs[i].dai_name);
goto _err_defer;
}
snd_soc_rtdcom_add(rtd, codec_dais[i]->component);
--
2.20.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Applied "ASoC: soc-core: remove error due to probe deferral" to the asoc tree
2019-01-18 9:55 [PATCH] ASoC: soc-core: remove error due to probe deferral Stefan Agner
@ 2019-01-18 18:38 ` Mark Brown
0 siblings, 0 replies; 10+ messages in thread
From: Mark Brown @ 2019-01-18 18:38 UTC (permalink / raw)
To: Stefan Agner
Cc: Mark Brown, perex, lgirdwood, broonie, alsa-devel, tiwai,
linux-kernel, alsa-devel
The patch
ASoC: soc-core: remove error due to probe deferral
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
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
From 7c7e2d6a9ca3c74ba7ed4da2a75916b2f9ae38f0 Mon Sep 17 00:00:00 2001
From: Stefan Agner <stefan@agner.ch>
Date: Fri, 18 Jan 2019 10:55:04 +0100
Subject: [PATCH] ASoC: soc-core: remove error due to probe deferral
Deferred probes shouldn't cause error messages in the boot log, so
change the dev_err() to the more harmless dev_info().
Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
sound/soc/soc-core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 0462b3ec977a..98bb05f6ed56 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -903,8 +903,8 @@ static int soc_bind_dai_link(struct snd_soc_card *card,
for (i = 0; i < rtd->num_codecs; i++) {
codec_dais[i] = snd_soc_find_dai(&codecs[i]);
if (!codec_dais[i]) {
- dev_err(card->dev, "ASoC: CODEC DAI %s not registered\n",
- codecs[i].dai_name);
+ dev_info(card->dev, "ASoC: CODEC DAI %s not registered\n",
+ codecs[i].dai_name);
goto _err_defer;
}
snd_soc_rtdcom_add(rtd, codec_dais[i]->component);
--
2.20.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH] ASoC: soc-core: remove error due to probe deferral
@ 2019-08-08 12:36 Stefan Agner
2019-08-08 12:44 ` Mark Brown
0 siblings, 1 reply; 10+ messages in thread
From: Stefan Agner @ 2019-08-08 12:36 UTC (permalink / raw)
To: perex, tiwai; +Cc: lgirdwood, broonie, alsa-devel, linux-kernel, Stefan Agner
From: Stefan Agner <stefan.agner@toradex.com>
Deferred probes shouldn't cause error messages in the boot log. Avoid
printing with dev_err() in case EPROBE_DEFER is the return value.
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
---
sound/soc/soc-core.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index fd6eaae6c0ed..98e1e80b5493 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1985,9 +1985,11 @@ static int snd_soc_instantiate_card(struct snd_soc_card *card)
mutex_lock(&client_mutex);
for_each_card_prelinks(card, i, dai_link) {
ret = soc_init_dai_link(card, dai_link);
- if (ret) {
+ if (ret && ret != -EPROBE_DEFER) {
dev_err(card->dev, "ASoC: failed to init link %s: %d\n",
dai_link->name, ret);
+ }
+ if (ret) {
mutex_unlock(&client_mutex);
return ret;
}
--
2.22.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH] ASoC: soc-core: remove error due to probe deferral
2019-08-08 12:36 [PATCH] ASoC: soc-core: remove error due to probe deferral Stefan Agner
@ 2019-08-08 12:44 ` Mark Brown
2019-08-08 12:59 ` Stefan Agner
2019-08-08 13:00 ` Takashi Iwai
0 siblings, 2 replies; 10+ messages in thread
From: Mark Brown @ 2019-08-08 12:44 UTC (permalink / raw)
To: Stefan Agner
Cc: perex, tiwai, lgirdwood, alsa-devel, linux-kernel, Stefan Agner
[-- Attachment #1: Type: text/plain, Size: 441 bytes --]
On Thu, Aug 08, 2019 at 02:36:55PM +0200, Stefan Agner wrote:
> From: Stefan Agner <stefan.agner@toradex.com>
>
> Deferred probes shouldn't cause error messages in the boot log. Avoid
> printing with dev_err() in case EPROBE_DEFER is the return value.
No, they absolutely should tell the user why they are deferring so the
user has some information to go on when they're trying to figure out why
their device isn't instantiating.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] ASoC: soc-core: remove error due to probe deferral
2019-08-08 12:44 ` Mark Brown
@ 2019-08-08 12:59 ` Stefan Agner
2019-08-08 13:00 ` Takashi Iwai
1 sibling, 0 replies; 10+ messages in thread
From: Stefan Agner @ 2019-08-08 12:59 UTC (permalink / raw)
To: Mark Brown
Cc: perex, tiwai, lgirdwood, alsa-devel, linux-kernel, Stefan Agner
On 2019-08-08 14:44, Mark Brown wrote:
> On Thu, Aug 08, 2019 at 02:36:55PM +0200, Stefan Agner wrote:
>> From: Stefan Agner <stefan.agner@toradex.com>
>>
>> Deferred probes shouldn't cause error messages in the boot log. Avoid
>> printing with dev_err() in case EPROBE_DEFER is the return value.
>
> No, they absolutely should tell the user why they are deferring so the
> user has some information to go on when they're trying to figure out why
> their device isn't instantiating.
Hm, I see, if the driver defers and does not manage in the end, then the
messages are indeed helpful.
But can we lower severity, e.g. to dev_info? In my case it succeeds in
the end, just defers about 6 times. I have 3 links which then leads to
18 error messages which confuse users... From what I can see
soc_init_dai_link() would print dev_err in case there is an actual
error.
--
Stefan
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] ASoC: soc-core: remove error due to probe deferral
2019-08-08 12:44 ` Mark Brown
2019-08-08 12:59 ` Stefan Agner
@ 2019-08-08 13:00 ` Takashi Iwai
2019-08-08 13:02 ` Mark Brown
1 sibling, 1 reply; 10+ messages in thread
From: Takashi Iwai @ 2019-08-08 13:00 UTC (permalink / raw)
To: Mark Brown
Cc: Stefan Agner, alsa-devel, lgirdwood, perex, Stefan Agner, linux-kernel
On Thu, 08 Aug 2019 14:44:37 +0200,
Mark Brown wrote:
>
> On Thu, Aug 08, 2019 at 02:36:55PM +0200, Stefan Agner wrote:
> > From: Stefan Agner <stefan.agner@toradex.com>
> >
> > Deferred probes shouldn't cause error messages in the boot log. Avoid
> > printing with dev_err() in case EPROBE_DEFER is the return value.
>
> No, they absolutely should tell the user why they are deferring so the
> user has some information to go on when they're trying to figure out why
> their device isn't instantiating.
But it's no real error that *must* be printed on the console, either.
Maybe downgrading the printk level?
thanks,
Takashi
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] ASoC: soc-core: remove error due to probe deferral
2019-08-08 13:00 ` Takashi Iwai
@ 2019-08-08 13:02 ` Mark Brown
2019-08-08 13:14 ` Takashi Iwai
0 siblings, 1 reply; 10+ messages in thread
From: Mark Brown @ 2019-08-08 13:02 UTC (permalink / raw)
To: Takashi Iwai
Cc: Stefan Agner, alsa-devel, lgirdwood, perex, Stefan Agner, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 443 bytes --]
On Thu, Aug 08, 2019 at 03:00:06PM +0200, Takashi Iwai wrote:
> Mark Brown wrote:
> > No, they absolutely should tell the user why they are deferring so the
> > user has some information to go on when they're trying to figure out why
> > their device isn't instantiating.
> But it's no real error that *must* be printed on the console, either.
> Maybe downgrading the printk level?
Yes, downgrading can be OK though it does bloat the code.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] ASoC: soc-core: remove error due to probe deferral
2019-08-08 13:02 ` Mark Brown
@ 2019-08-08 13:14 ` Takashi Iwai
2019-08-08 13:16 ` Stefan Agner
0 siblings, 1 reply; 10+ messages in thread
From: Takashi Iwai @ 2019-08-08 13:14 UTC (permalink / raw)
To: Mark Brown
Cc: Stefan Agner, alsa-devel, lgirdwood, perex, Stefan Agner, linux-kernel
On Thu, 08 Aug 2019 15:02:17 +0200,
Mark Brown wrote:
>
> On Thu, Aug 08, 2019 at 03:00:06PM +0200, Takashi Iwai wrote:
> > Mark Brown wrote:
>
> > > No, they absolutely should tell the user why they are deferring so the
> > > user has some information to go on when they're trying to figure out why
> > > their device isn't instantiating.
>
> > But it's no real error that *must* be printed on the console, either.
> > Maybe downgrading the printk level?
>
> Yes, downgrading can be OK though it does bloat the code.
I guess we can use dev_printk() with the conditional level choice.
Takashi
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] ASoC: soc-core: remove error due to probe deferral
2019-08-08 13:14 ` Takashi Iwai
@ 2019-08-08 13:16 ` Stefan Agner
2019-08-08 19:27 ` Mark Brown
0 siblings, 1 reply; 10+ messages in thread
From: Stefan Agner @ 2019-08-08 13:16 UTC (permalink / raw)
To: Takashi Iwai
Cc: Mark Brown, alsa-devel, lgirdwood, perex, Stefan Agner, linux-kernel
On 2019-08-08 15:14, Takashi Iwai wrote:
> On Thu, 08 Aug 2019 15:02:17 +0200,
> Mark Brown wrote:
>>
>> On Thu, Aug 08, 2019 at 03:00:06PM +0200, Takashi Iwai wrote:
>> > Mark Brown wrote:
>>
>> > > No, they absolutely should tell the user why they are deferring so the
>> > > user has some information to go on when they're trying to figure out why
>> > > their device isn't instantiating.
>>
>> > But it's no real error that *must* be printed on the console, either.
>> > Maybe downgrading the printk level?
>>
>> Yes, downgrading can be OK though it does bloat the code.
>
> I guess we can use dev_printk() with the conditional level choice.
>
How about use dev_info always? We get a dev_err message from
soc_init_dai_link in error cases...
ret = soc_init_dai_link(card, dai_link);
if (ret && ret != -EPROBE_DEFER) {
dev_info(card->dev, "ASoC: failed to init link %s: %d\n",
dai_link->name, ret);
}
if (ret) {
soc_cleanup_platform(card);
mutex_unlock(&client_mutex);
return ret;
}
--
Stefan
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] ASoC: soc-core: remove error due to probe deferral
2019-08-08 13:16 ` Stefan Agner
@ 2019-08-08 19:27 ` Mark Brown
0 siblings, 0 replies; 10+ messages in thread
From: Mark Brown @ 2019-08-08 19:27 UTC (permalink / raw)
To: Stefan Agner
Cc: Takashi Iwai, alsa-devel, lgirdwood, perex, Stefan Agner, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1013 bytes --]
On Thu, Aug 08, 2019 at 03:16:53PM +0200, Stefan Agner wrote:
> On 2019-08-08 15:14, Takashi Iwai wrote:
> > Mark Brown wrote:
> > I guess we can use dev_printk() with the conditional level choice.
> How about use dev_info always? We get a dev_err message from
> soc_init_dai_link in error cases...
> ret = soc_init_dai_link(card, dai_link);
> if (ret && ret != -EPROBE_DEFER) {
> dev_info(card->dev, "ASoC: failed to init link %s: %d\n",
> dai_link->name, ret);
> }
Well, if there's adequate error reporting in init_dai_link() it's a bit
different - we can just remove the print entirely regardless of what the
return code is. The point is to ensure that we don't just silently
fail. Unfortunately there's no prints in the probe deferral case there
so they need adding, that'll actually improve things though since we can
make it print the name of the thing it's mising which will be useful to
people trying to figure out what's going on (we used to do that but it
got lost in reshufflings).
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2019-08-08 19:27 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-18 9:55 [PATCH] ASoC: soc-core: remove error due to probe deferral Stefan Agner
2019-01-18 18:38 ` Applied "ASoC: soc-core: remove error due to probe deferral" to the asoc tree Mark Brown
2019-08-08 12:36 [PATCH] ASoC: soc-core: remove error due to probe deferral Stefan Agner
2019-08-08 12:44 ` Mark Brown
2019-08-08 12:59 ` Stefan Agner
2019-08-08 13:00 ` Takashi Iwai
2019-08-08 13:02 ` Mark Brown
2019-08-08 13:14 ` Takashi Iwai
2019-08-08 13:16 ` Stefan Agner
2019-08-08 19:27 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).