All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
To: Mark Brown <broonie@kernel.org>
Cc: Linux-ALSA <alsa-devel@alsa-project.org>
Subject: [PATCH v2 06/11] ASoC: rsnd: incidate irq error message
Date: 27 May 2021 11:41:28 +0900	[thread overview]
Message-ID: <87zgwglwyv.wl-kuninori.morimoto.gx@renesas.com> (raw)
In-Reply-To: <878s40nbmc.wl-kuninori.morimoto.gx@renesas.com>


From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

Current rsnd is using dev_dbg() if irq error happen,
but it makes debug very difficult if some strange things happen.
This patch uses dev_info() for it, and rename the macro name.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/sh/rcar/rsnd.h |  5 +++--
 sound/soc/sh/rcar/src.c  |  6 +++---
 sound/soc/sh/rcar/ssi.c  | 14 +++++++-------
 3 files changed, 13 insertions(+), 12 deletions(-)

diff --git a/sound/soc/sh/rcar/rsnd.h b/sound/soc/sh/rcar/rsnd.h
index aec54552474d..9736a94b9c39 100644
--- a/sound/soc/sh/rcar/rsnd.h
+++ b/sound/soc/sh/rcar/rsnd.h
@@ -881,9 +881,10 @@ void rsnd_mod_make_sure(struct rsnd_mod *mod, enum rsnd_mod_type type);
  *
  * #define RSND_DEBUG_NO_IRQ_STATUS 1
  */
-#define rsnd_dbg_irq_status(dev, param...)		\
+#define rsnd_print_irq_status(dev, param...) do {	\
 	if (!IS_BUILTIN(RSND_DEBUG_NO_IRQ_STATUS))	\
-		dev_dbg(dev, param)
+		dev_info(dev, param);			\
+} while (0)
 
 /*
  * If you don't need rsnd_dai_call debug message,
diff --git a/sound/soc/sh/rcar/src.c b/sound/soc/sh/rcar/src.c
index 628af8f3920d..7a7d6dc335a4 100644
--- a/sound/soc/sh/rcar/src.c
+++ b/sound/soc/sh/rcar/src.c
@@ -17,7 +17,7 @@
 /*
  * you can enable below define if you don't need
  * SSI interrupt status debug message when debugging
- * see rsnd_dbg_irq_status()
+ * see rsnd_print_irq_status()
  *
  * #define RSND_DEBUG_NO_IRQ_STATUS 1
  */
@@ -421,8 +421,8 @@ static bool rsnd_src_error_occurred(struct rsnd_mod *mod)
 	status0 = rsnd_mod_read(mod, SCU_SYS_STATUS0);
 	status1 = rsnd_mod_read(mod, SCU_SYS_STATUS1);
 	if ((status0 & val0) || (status1 & val1)) {
-		rsnd_dbg_irq_status(dev, "%s err status : 0x%08x, 0x%08x\n",
-			rsnd_mod_name(mod), status0, status1);
+		rsnd_print_irq_status(dev, "%s err status : 0x%08x, 0x%08x\n",
+				      rsnd_mod_name(mod), status0, status1);
 
 		ret = true;
 	}
diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c
index 2dceac994b37..ac920800af37 100644
--- a/sound/soc/sh/rcar/ssi.c
+++ b/sound/soc/sh/rcar/ssi.c
@@ -11,7 +11,7 @@
 /*
  * you can enable below define if you don't need
  * SSI interrupt status debug message when debugging
- * see rsnd_dbg_irq_status()
+ * see rsnd_print_irq_status()
  *
  * #define RSND_DEBUG_NO_IRQ_STATUS 1
  */
@@ -418,8 +418,8 @@ static bool rsnd_ssi_busif_err_status_clear(struct rsnd_mod *mod)
 			status &= 0xf << (id * 4);
 
 			if (status) {
-				rsnd_dbg_irq_status(dev, "%s err status : 0x%08x\n",
-						    rsnd_mod_name(mod), status);
+				rsnd_print_irq_status(dev, "%s err status : 0x%08x\n",
+						      rsnd_mod_name(mod), status);
 				rsnd_mod_write(mod,
 					       SSI_SYS_STATUS(i * 2),
 					       0xf << (id * 4));
@@ -433,8 +433,8 @@ static bool rsnd_ssi_busif_err_status_clear(struct rsnd_mod *mod)
 			status &= 0xf << 4;
 
 			if (status) {
-				rsnd_dbg_irq_status(dev, "%s err status : 0x%08x\n",
-						    rsnd_mod_name(mod), status);
+				rsnd_print_irq_status(dev, "%s err status : 0x%08x\n",
+						      rsnd_mod_name(mod), status);
 				rsnd_mod_write(mod,
 					       SSI_SYS_STATUS((i * 2) + 1),
 					       0xf << 4);
@@ -782,8 +782,8 @@ static void __rsnd_ssi_interrupt(struct rsnd_mod *mod,
 
 	/* DMA only */
 	if (is_dma && (status & (UIRQ | OIRQ))) {
-		rsnd_dbg_irq_status(dev, "%s err status : 0x%08x\n",
-			rsnd_mod_name(mod), status);
+		rsnd_print_irq_status(dev, "%s err status : 0x%08x\n",
+				      rsnd_mod_name(mod), status);
 
 		stop = true;
 	}
-- 
2.25.1


  parent reply	other threads:[~2021-05-27  2:43 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-27  2:39 [PATCH v2 00/11] ASoC: rsnd: tidyup and fixup rare MIXer issue Kuninori Morimoto
2021-05-27  2:40 ` [PATCH v2 01/11] ASoC: rsnd: call unregister for null_hw when removed Kuninori Morimoto
2021-05-27  2:40 ` [PATCH v2 02/11] ASoC: rsnd: ignore runtime NULL case at rsnd_runtime_channel_original_with_params() Kuninori Morimoto
2021-05-27  2:40 ` [PATCH v2 03/11] ASoC: rsnd: attach SSIU when SSI was DMA mode Kuninori Morimoto
2021-05-27  2:41 ` [PATCH v2 04/11] ASoC: rsnd: check BUIF error everytime Kuninori Morimoto
2021-05-27  2:41 ` [PATCH v2 05/11] ASoC: rsnd: indicate unknown error at rsnd_dai_call() Kuninori Morimoto
2021-05-27  2:41 ` Kuninori Morimoto [this message]
2021-05-27  2:41 ` [PATCH v2 07/11] ASoC: rsnd: add debugfs support Kuninori Morimoto
2021-05-27  2:41 ` [PATCH v2 08/11] ASoC: rsnd: protect mod->status Kuninori Morimoto
2021-05-27  2:41 ` [PATCH v2 09/11] ASoC: rsnd: implement BUSIF related code in ssiu.c Kuninori Morimoto
2021-05-27  2:41 ` [PATCH v2 10/11] ASoC: rsnd: tidyup rsnd_ssiu_busif_err_status_clear() Kuninori Morimoto
2021-05-27  2:42 ` [PATCH v2 11/11] ASoC: rsnd: tidyup rsnd_ssiu_busif_err_irq_ctrl() Kuninori Morimoto
2021-05-28 16:04 ` [PATCH v2 00/11] ASoC: rsnd: tidyup and fixup rare MIXer issue 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=87zgwglwyv.wl-kuninori.morimoto.gx@renesas.com \
    --to=kuninori.morimoto.gx@renesas.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    /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.