Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1504164 > unrolled thread
| Started by | Javier Martinez Canillas <javier@osg.samsung.com> |
|---|---|
| First post | 2016-10-19 19:30 +0200 |
| Last post | 2016-10-24 20:40 +0200 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[RFC PATCH 1/2] ASoC: core: Print one-time messages if missing resources when binding DAIs Javier Martinez Canillas <javier@osg.samsung.com> - 2016-10-19 19:30 +0200
Re: [RFC PATCH 1/2] ASoC: core: Print one-time messages if missing resources when binding DAIs Mark Brown <broonie@kernel.org> - 2016-10-24 19:30 +0200
Re: [RFC PATCH 1/2] ASoC: core: Print one-time messages if missing resources when binding DAIs Javier Martinez Canillas <javier@osg.samsung.com> - 2016-10-24 20:40 +0200
| From | Javier Martinez Canillas <javier@osg.samsung.com> |
|---|---|
| Date | 2016-10-19 19:30 +0200 |
| Subject | [RFC PATCH 1/2] ASoC: core: Print one-time messages if missing resources when binding DAIs |
| Message-ID | <su2QG-4lW-31@gated-at.bofh.it> |
If snd_soc_find_dai() doesn't find a DAI in soc_bind_dai_link(), a
error message is printed and an -EPROBE_DEFER errno code returned to
the caller.
But since many probe retries can happen before a resource is available,
the printed messages can spam the kernel log buffer and slow the boot.
The information is useful to know that a dependency was not meet and a
defer happened, but isn't necessary to print it on each probe deferral.
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
---
sound/soc/soc-core.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index c0bbcd903261..4679c07e0ff6 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1013,8 +1013,8 @@ static int soc_bind_dai_link(struct snd_soc_card *card,
cpu_dai_component.dai_name = dai_link->cpu_dai_name;
rtd->cpu_dai = snd_soc_find_dai(&cpu_dai_component);
if (!rtd->cpu_dai) {
- dev_err(card->dev, "ASoC: CPU DAI %s not registered\n",
- dai_link->cpu_dai_name);
+ dev_err_once(card->dev, "ASoC: CPU DAI %s not registered\n",
+ dai_link->cpu_dai_name);
goto _err_defer;
}
@@ -1025,8 +1025,9 @@ 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_err_once(card->dev,
+ "ASoC: CODEC DAI %s not registered\n",
+ codecs[i].dai_name);
goto _err_defer;
}
}
@@ -1054,8 +1055,8 @@ static int soc_bind_dai_link(struct snd_soc_card *card,
rtd->platform = platform;
}
if (!rtd->platform) {
- dev_err(card->dev, "ASoC: platform %s not registered\n",
- dai_link->platform_name);
+ dev_err_once(card->dev, "ASoC: platform %s not registered\n",
+ dai_link->platform_name);
goto _err_defer;
}
--
2.7.4
[toc] | [next] | [standalone]
| From | Mark Brown <broonie@kernel.org> |
|---|---|
| Date | 2016-10-24 19:30 +0200 |
| Subject | Re: [RFC PATCH 1/2] ASoC: core: Print one-time messages if missing resources when binding DAIs |
| Message-ID | <svRep-2gd-17@gated-at.bofh.it> |
| In reply to | #1504164 |
[Multipart message — attachments visible in raw view] — view raw
On Wed, Oct 19, 2016 at 02:21:05PM -0300, Javier Martinez Canillas wrote: > If snd_soc_find_dai() doesn't find a DAI in soc_bind_dai_link(), a > error message is printed and an -EPROBE_DEFER errno code returned to > the caller. > But since many probe retries can happen before a resource is available, > the printed messages can spam the kernel log buffer and slow the boot. > The information is useful to know that a dependency was not meet and a > defer happened, but isn't necessary to print it on each probe deferral. This then turns any subsequent failure into a silent one which isn't great for diagnostics. It'd be better to look into trying to avoid the retries in the first place, Raphael's dependency graph stuff looks very promising here.
[toc] | [prev] | [next] | [standalone]
| From | Javier Martinez Canillas <javier@osg.samsung.com> |
|---|---|
| Date | 2016-10-24 20:40 +0200 |
| Subject | Re: [RFC PATCH 1/2] ASoC: core: Print one-time messages if missing resources when binding DAIs |
| Message-ID | <svSka-2XX-25@gated-at.bofh.it> |
| In reply to | #1507481 |
Hello Mark, On 10/24/2016 02:21 PM, Mark Brown wrote: > On Wed, Oct 19, 2016 at 02:21:05PM -0300, Javier Martinez Canillas wrote: >> If snd_soc_find_dai() doesn't find a DAI in soc_bind_dai_link(), a >> error message is printed and an -EPROBE_DEFER errno code returned to >> the caller. > >> But since many probe retries can happen before a resource is available, >> the printed messages can spam the kernel log buffer and slow the boot. > >> The information is useful to know that a dependency was not meet and a >> defer happened, but isn't necessary to print it on each probe deferral. > > This then turns any subsequent failure into a silent one which isn't > great for diagnostics. It'd be better to look into trying to avoid the > retries in the first place, Raphael's dependency graph stuff looks very > promising here. > Ok, thanks for your feedback. I'll also investigate why the number of probes/retries increased that much from v4.8. Best regards, -- Javier Martinez Canillas Open Source Group Samsung Research America
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web