lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ac232872-734f-d192-d46c-555ebe3625c5@linux.intel.com>
Date:   Wed, 5 Jul 2023 17:07:22 +0200
From:   Amadeusz Sławiński 
        <amadeuszx.slawinski@...ux.intel.com>
To:     Johan Hovold <johan+linaro@...nel.org>,
        Mark Brown <broonie@...nel.org>, Vinod Koul <vkoul@...nel.org>
Cc:     Bard Liao <yung-chuan.liao@...ux.intel.com>,
        Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>,
        Sanyog Kale <sanyog.r.kale@...el.com>,
        Srinivas Kandagatla <srinivas.kandagatla@...aro.org>,
        Banajit Goswami <bgoswami@...cinc.com>,
        Liam Girdwood <lgirdwood@...il.com>,
        Jaroslav Kysela <perex@...ex.cz>,
        Takashi Iwai <tiwai@...e.com>, alsa-devel@...a-project.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 7/8] ASoC: topology: suppress probe deferral errors

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@...nel.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;
>   			}
>   

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ