diff mbox series

[2/2] ASoC: rt5682: remove noisy debug messages

Message ID 20200317073321.12660-1-shumingf@realtek.com (mailing list archive)
State Accepted
Commit 243de01deb545e9c288459458e28e5ff0656ca1f
Headers show
Series [1/2] ASoC: rt5682: fix the random recording noise of headset | expand

Commit Message

Shuming [θŒƒζ›ΈιŠ˜] March 17, 2020, 7:33 a.m. UTC
From: Shuming Fan <shumingf@realtek.com>

Some debug messages are too noisy.
This patch removes it.

Signed-off-by: Shuming Fan <shumingf@realtek.com>
---
 sound/soc/codecs/rt5682.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Tzung-Bi Shih March 18, 2020, 3:22 p.m. UTC | #1
On Tue, Mar 17, 2020 at 3:35 PM <shumingf@realtek.com> wrote:
> Some debug messages are too noisy.
> This patch removes it.

Suggest to use other words.  For example, title: "ASoC: rt5682: make
output message less verbose"; message: "Makes output message less
verbose by reducing the log severity".

>         for (i = 0; i < size - 1; i++) {
> -               pr_info("div[%d]=%d\n", i, div[i]);
> +               dev_dbg(rt5682->component->dev, "div[%d]=%d\n", i, div[i]);
>                 if (target * div[i] == rt5682->sysclk)
>                         return i;
>                 if (target * div[i + 1] > rt5682->sysclk) {
> -                       pr_err("can't find div for sysclk %d\n",
> +                       dev_dbg(rt5682->component->dev, "can't find div for sysclk %d\n",
>                                 rt5682->sysclk);

Looking at around of the file, use pr_debug( ) here could be more consistent.
Mark Brown March 18, 2020, 3:37 p.m. UTC | #2
On Wed, Mar 18, 2020 at 11:22:47PM +0800, Tzung-Bi Shih wrote:
> On Tue, Mar 17, 2020 at 3:35 PM <shumingf@realtek.com> wrote:

> > +                       dev_dbg(rt5682->component->dev, "can't find div for sysclk %d\n",
> >                                 rt5682->sysclk);

> Looking at around of the file, use pr_debug( ) here could be more consistent.

It'd be better convert those pr_debug() to dev_dbg()s TBH.
diff mbox series

Patch

diff --git a/sound/soc/codecs/rt5682.c b/sound/soc/codecs/rt5682.c
index 023bc672274b..2ee01e782fe0 100644
--- a/sound/soc/codecs/rt5682.c
+++ b/sound/soc/codecs/rt5682.c
@@ -1197,11 +1197,11 @@  static int rt5682_div_sel(struct rt5682_priv *rt5682,
 	}
 
 	for (i = 0; i < size - 1; i++) {
-		pr_info("div[%d]=%d\n", i, div[i]);
+		dev_dbg(rt5682->component->dev, "div[%d]=%d\n", i, div[i]);
 		if (target * div[i] == rt5682->sysclk)
 			return i;
 		if (target * div[i + 1] > rt5682->sysclk) {
-			pr_err("can't find div for sysclk %d\n",
+			dev_dbg(rt5682->component->dev, "can't find div for sysclk %d\n",
 				rt5682->sysclk);
 			return i;
 		}