diff mbox series

[13/28] ASoC: soc-core: remove verbose debug message from soc_bind_dai_link()

Message ID 87imrb2ify.wl-kuninori.morimoto.gx@renesas.com (mailing list archive)
State New, archived
Headers show
Series ASoC: cleanup patches for soc-core | expand

Commit Message

Kuninori Morimoto Aug. 6, 2019, 1:29 a.m. UTC
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

soc_bind_dai_link() will print debug message if dai_link was
already binded. But it is very verbose. Print dai_link name when
first binding is very enough.
This patch removes verbose debug message

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/soc-core.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

Comments

Pierre-Louis Bossart Aug. 6, 2019, 2:54 p.m. UTC | #1
On 8/5/19 8:29 PM, Kuninori Morimoto wrote:
> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> 
> soc_bind_dai_link() will print debug message if dai_link was
> already binded. But it is very verbose. Print dai_link name when
> first binding is very enough.
> This patch removes verbose debug message
> 
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
>   sound/soc/soc-core.c | 9 +++------
>   1 file changed, 3 insertions(+), 6 deletions(-)
> 
> diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
> index df0c22e..838a843 100644
> --- a/sound/soc/soc-core.c
> +++ b/sound/soc/soc-core.c
> @@ -864,13 +864,10 @@ static int soc_bind_dai_link(struct snd_soc_card *card,
>   	if (dai_link->ignore)
>   		return 0;
>   
> -	dev_dbg(card->dev, "ASoC: binding %s\n", dai_link->name);
> -
> -	if (soc_is_dai_link_bound(card, dai_link)) {
> -		dev_dbg(card->dev, "ASoC: dai link %s already bound\n",
> -			dai_link->name);
> +	if (soc_is_dai_link_bound(card, dai_link))
>   		return 0;
> -	}
> +
> +	dev_dbg(card->dev, "ASoC: binding %s\n", dai_link->name);

If you want to reduce verbosity, I would have kept the other message 
which tells you about a configuration error. Here you are reducing the 
ability to debug really.

>   
>   	rtd = soc_new_pcm_runtime(card, dai_link);
>   	if (!rtd)
>
Kuninori Morimoto Aug. 7, 2019, 12:13 a.m. UTC | #2
Hi Pierre-Louis

Thank you for your feedback !!

> > @@ -864,13 +864,10 @@ static int soc_bind_dai_link(struct snd_soc_card *card,
> >   	if (dai_link->ignore)
> >   		return 0;
> >   -	dev_dbg(card->dev, "ASoC: binding %s\n", dai_link->name);
> > -
> > -	if (soc_is_dai_link_bound(card, dai_link)) {
> > -		dev_dbg(card->dev, "ASoC: dai link %s already bound\n",
> > -			dai_link->name);
> > +	if (soc_is_dai_link_bound(card, dai_link))
> >   		return 0;
> > -	}
> > +
> > +	dev_dbg(card->dev, "ASoC: binding %s\n", dai_link->name);
> 
> If you want to reduce verbosity, I would have kept the other message
> which tells you about a configuration error. Here you are reducing the
> ability to debug really.

I thought it is verbose.
But, let's keep it, if some one need it.


Thank you for your help !!
Best regards
---
Kuninori Morimoto
diff mbox series

Patch

diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index df0c22e..838a843 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -864,13 +864,10 @@  static int soc_bind_dai_link(struct snd_soc_card *card,
 	if (dai_link->ignore)
 		return 0;
 
-	dev_dbg(card->dev, "ASoC: binding %s\n", dai_link->name);
-
-	if (soc_is_dai_link_bound(card, dai_link)) {
-		dev_dbg(card->dev, "ASoC: dai link %s already bound\n",
-			dai_link->name);
+	if (soc_is_dai_link_bound(card, dai_link))
 		return 0;
-	}
+
+	dev_dbg(card->dev, "ASoC: binding %s\n", dai_link->name);
 
 	rtd = soc_new_pcm_runtime(card, dai_link);
 	if (!rtd)