All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Amadeusz Sławiński" <amadeuszx.slawinski@linux.intel.com>
To: Johan Hovold <johan+linaro@kernel.org>,
	Mark Brown <broonie@kernel.org>, Vinod Koul <vkoul@kernel.org>
Cc: Bard Liao <yung-chuan.liao@linux.intel.com>,
	Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
	Sanyog Kale <sanyog.r.kale@intel.com>,
	Srinivas Kandagatla <srinivas.kandagatla@linaro.org>,
	Banajit Goswami <bgoswami@quicinc.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 7/8] ASoC: topology: suppress probe deferral errors
Date: Wed, 5 Jul 2023 17:07:22 +0200	[thread overview]
Message-ID: <ac232872-734f-d192-d46c-555ebe3625c5@linux.intel.com> (raw)
In-Reply-To: <20230705123018.30903-8-johan+linaro@kernel.org>

On 7/5/2023 2:30 PM, Johan Hovold wrote:
> Suppress probe deferral error messages when loading topologies and
> creating frontend links to avoid spamming the logs when a component has
> not yet been registered:
> 
>      snd-sc8280xp sound: ASoC: adding FE link failed
>      snd-sc8280xp sound: ASoC: topology: could not load header: -517
> 
> Note that dev_err_probe() is not used as the topology component can be
> probed and removed while the underlying platform device remains bound to
> its driver.

I'm not sure that I understand that argument... what's wrong with
dev_err_probe(tplg->dev, err, "ASoC: adding FE link failed\n");
instead of
dev_err(tplg->dev, "ASoC: adding FE link failed\n");
?
Personally I would prefer dev_err_probe() to be used as it also provides 
debug message.

> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
>   sound/soc/soc-topology.c | 10 +++++++---
>   1 file changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c
> index d0aca6b9058b..696c9647debe 100644
> --- a/sound/soc/soc-topology.c
> +++ b/sound/soc/soc-topology.c
> @@ -1751,7 +1751,8 @@ static int soc_tplg_fe_link_create(struct soc_tplg *tplg,
>   
>   	ret = snd_soc_add_pcm_runtimes(tplg->comp->card, link, 1);
>   	if (ret < 0) {
> -		dev_err(tplg->dev, "ASoC: adding FE link failed\n");
> +		if (ret != -EPROBE_DEFER)
> +			dev_err(tplg->dev, "ASoC: adding FE link failed\n");
>   		goto err;
>   	}
>   
> @@ -2514,8 +2515,11 @@ static int soc_tplg_process_headers(struct soc_tplg *tplg)
>   			/* load the header object */
>   			ret = soc_tplg_load_header(tplg, hdr);
>   			if (ret < 0) {
> -				dev_err(tplg->dev,
> -					"ASoC: topology: could not load header: %d\n", ret);
> +				if (ret != -EPROBE_DEFER) {
> +					dev_err(tplg->dev,
> +						"ASoC: topology: could not load header: %d\n",
> +						ret);
> +				}
>   				return ret;
>   			}
>   


  reply	other threads:[~2023-07-05 15:07 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-05 12:30 [PATCH 0/8] ASoC/soundwire/qdsp6/wcd: fix leaks and probe deferral Johan Hovold
2023-07-05 12:30 ` [PATCH 1/8] soundwire: fix enumeration completion Johan Hovold
2023-07-05 12:53   ` Pierre-Louis Bossart
2023-07-05 14:30     ` Johan Hovold
2023-07-05 14:44       ` Pierre-Louis Bossart
2023-07-05 12:30 ` [PATCH 2/8] ASoC: qdsp6: audioreach: fix topology probe deferral Johan Hovold
2023-07-06 11:09   ` Srinivas Kandagatla
2023-07-05 12:30 ` [PATCH 3/8] ASoC: codecs: wcd938x: fix missing clsh ctrl error handling Johan Hovold
2023-07-06 11:09   ` Srinivas Kandagatla
2023-07-05 12:30 ` [PATCH 4/8] ASoC: codecs: wcd938x: fix resource leaks on component remove Johan Hovold
2023-07-06 11:09   ` Srinivas Kandagatla
2023-07-05 12:30 ` [PATCH 5/8] ASoC: codecs: wcd934x: " Johan Hovold
2023-07-06 11:09   ` Srinivas Kandagatla
2023-07-05 12:30 ` [PATCH 6/8] ASoC: codecs: wcd-mbhc-v2: " Johan Hovold
2023-07-06 11:09   ` Srinivas Kandagatla
2023-07-05 12:30 ` [PATCH 7/8] ASoC: topology: suppress probe deferral errors Johan Hovold
2023-07-05 15:07   ` Amadeusz Sławiński [this message]
2023-07-06  6:14     ` Johan Hovold
2023-07-06  7:25       ` Amadeusz Sławiński
2023-07-10 12:01         ` Johan Hovold
2023-07-05 12:30 ` [PATCH 8/8] ASoC: core: " Johan Hovold
2023-07-10  8:53 ` (subset) [PATCH 0/8] ASoC/soundwire/qdsp6/wcd: fix leaks and probe deferral Vinod Koul
2023-07-11 20:44 ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ac232872-734f-d192-d46c-555ebe3625c5@linux.intel.com \
    --to=amadeuszx.slawinski@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=bgoswami@quicinc.com \
    --cc=broonie@kernel.org \
    --cc=johan+linaro@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=sanyog.r.kale@intel.com \
    --cc=srinivas.kandagatla@linaro.org \
    --cc=tiwai@suse.com \
    --cc=vkoul@kernel.org \
    --cc=yung-chuan.liao@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.