All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] ASoC: SOF: ipc: Small cleanups for message handler functions
@ 2021-09-17  8:58 Peter Ujfalusi
  2021-09-17  8:58 ` [PATCH 1/2] ASoC: SOF: ipc: Clarify the parameter name for ipc_trace_message() Peter Ujfalusi
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Peter Ujfalusi @ 2021-09-17  8:58 UTC (permalink / raw)
  To: lgirdwood, broonie, pierre-louis.bossart
  Cc: guennadi.liakhovetski, alsa-devel, kai.vehmanen,
	ranjani.sridharan, daniel.baluta, bard.liao

Hi,

Rename the parameter for ipc_trace_message() to match it's content and use
%#x" for hexadecimal prints in remaining places.

Regards,
Peter
---
Peter Ujfalusi (2):
  ASoC: SOF: ipc: Clarify the parameter name for ipc_trace_message()
  ASoC: SOF: ipc: Print 0x prefix for errors in
    ipc_trace/stream_message()

 sound/soc/sof/ipc.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

-- 
2.33.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/2] ASoC: SOF: ipc: Clarify the parameter name for ipc_trace_message()
  2021-09-17  8:58 [PATCH 0/2] ASoC: SOF: ipc: Small cleanups for message handler functions Peter Ujfalusi
@ 2021-09-17  8:58 ` Peter Ujfalusi
  2021-09-17  8:58 ` [PATCH 2/2] ASoC: SOF: ipc: Print 0x prefix for errors in ipc_trace/stream_message() Peter Ujfalusi
  2021-09-17 14:03 ` [PATCH 0/2] ASoC: SOF: ipc: Small cleanups for message handler functions Mark Brown
  2 siblings, 0 replies; 4+ messages in thread
From: Peter Ujfalusi @ 2021-09-17  8:58 UTC (permalink / raw)
  To: lgirdwood, broonie, pierre-louis.bossart
  Cc: guennadi.liakhovetski, alsa-devel, kai.vehmanen,
	ranjani.sridharan, daniel.baluta, bard.liao

ipc_trace_message() receives the type not the ID.
Use the same naming as the ipc_stream_message() function: msg_type to
help the reader to follow the code.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Reviewed-by: Bard Liao <bard.liao@intel.com>
---
 sound/soc/sof/ipc.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/sound/soc/sof/ipc.c b/sound/soc/sof/ipc.c
index a4fe007a0e4d..2d7e942a3c70 100644
--- a/sound/soc/sof/ipc.c
+++ b/sound/soc/sof/ipc.c
@@ -18,7 +18,7 @@
 #include "sof-audio.h"
 #include "ops.h"
 
-static void ipc_trace_message(struct snd_sof_dev *sdev, u32 msg_id);
+static void ipc_trace_message(struct snd_sof_dev *sdev, u32 msg_type);
 static void ipc_stream_message(struct snd_sof_dev *sdev, u32 msg_cmd);
 
 /*
@@ -454,19 +454,18 @@ EXPORT_SYMBOL(snd_sof_ipc_msgs_rx);
  * IPC trace mechanism.
  */
 
-static void ipc_trace_message(struct snd_sof_dev *sdev, u32 msg_id)
+static void ipc_trace_message(struct snd_sof_dev *sdev, u32 msg_type)
 {
 	struct sof_ipc_dma_trace_posn posn;
 
-	switch (msg_id) {
+	switch (msg_type) {
 	case SOF_IPC_TRACE_DMA_POSITION:
 		/* read back full message */
 		snd_sof_ipc_msg_data(sdev, NULL, &posn, sizeof(posn));
 		snd_sof_trace_update_pos(sdev, &posn);
 		break;
 	default:
-		dev_err(sdev->dev, "error: unhandled trace message %x\n",
-			msg_id);
+		dev_err(sdev->dev, "error: unhandled trace message %x\n", msg_type);
 		break;
 	}
 }
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] ASoC: SOF: ipc: Print 0x prefix for errors in ipc_trace/stream_message()
  2021-09-17  8:58 [PATCH 0/2] ASoC: SOF: ipc: Small cleanups for message handler functions Peter Ujfalusi
  2021-09-17  8:58 ` [PATCH 1/2] ASoC: SOF: ipc: Clarify the parameter name for ipc_trace_message() Peter Ujfalusi
@ 2021-09-17  8:58 ` Peter Ujfalusi
  2021-09-17 14:03 ` [PATCH 0/2] ASoC: SOF: ipc: Small cleanups for message handler functions Mark Brown
  2 siblings, 0 replies; 4+ messages in thread
From: Peter Ujfalusi @ 2021-09-17  8:58 UTC (permalink / raw)
  To: lgirdwood, broonie, pierre-louis.bossart
  Cc: guennadi.liakhovetski, alsa-devel, kai.vehmanen,
	ranjani.sridharan, daniel.baluta, bard.liao

The dev_err() in ipc_trace_message() and ipc_stream_message() is missing
the 0x prefix for the hexadecimal number when printed.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
---
 sound/soc/sof/ipc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/sof/ipc.c b/sound/soc/sof/ipc.c
index 2d7e942a3c70..a916812a0f64 100644
--- a/sound/soc/sof/ipc.c
+++ b/sound/soc/sof/ipc.c
@@ -465,7 +465,7 @@ static void ipc_trace_message(struct snd_sof_dev *sdev, u32 msg_type)
 		snd_sof_trace_update_pos(sdev, &posn);
 		break;
 	default:
-		dev_err(sdev->dev, "error: unhandled trace message %x\n", msg_type);
+		dev_err(sdev->dev, "error: unhandled trace message %#x\n", msg_type);
 		break;
 	}
 }
@@ -547,7 +547,7 @@ static void ipc_stream_message(struct snd_sof_dev *sdev, u32 msg_cmd)
 		ipc_xrun(sdev, msg_id);
 		break;
 	default:
-		dev_err(sdev->dev, "error: unhandled stream message %x\n",
+		dev_err(sdev->dev, "error: unhandled stream message %#x\n",
 			msg_id);
 		break;
 	}
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 0/2] ASoC: SOF: ipc: Small cleanups for message handler functions
  2021-09-17  8:58 [PATCH 0/2] ASoC: SOF: ipc: Small cleanups for message handler functions Peter Ujfalusi
  2021-09-17  8:58 ` [PATCH 1/2] ASoC: SOF: ipc: Clarify the parameter name for ipc_trace_message() Peter Ujfalusi
  2021-09-17  8:58 ` [PATCH 2/2] ASoC: SOF: ipc: Print 0x prefix for errors in ipc_trace/stream_message() Peter Ujfalusi
@ 2021-09-17 14:03 ` Mark Brown
  2 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2021-09-17 14:03 UTC (permalink / raw)
  To: lgirdwood, pierre-louis.bossart, Peter Ujfalusi
  Cc: guennadi.liakhovetski, alsa-devel, kai.vehmanen,
	ranjani.sridharan, Mark Brown, daniel.baluta, bard.liao

On Fri, 17 Sep 2021 11:58:21 +0300, Peter Ujfalusi wrote:
> Rename the parameter for ipc_trace_message() to match it's content and use
> %#x" for hexadecimal prints in remaining places.
> 
> Regards,
> Peter
> 

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/2] ASoC: SOF: ipc: Clarify the parameter name for ipc_trace_message()
      commit: 59fdde1d4e268dbb9df5df77a7569c7d987607b6
[2/2] ASoC: SOF: ipc: Print 0x prefix for errors in ipc_trace/stream_message()
      commit: b95b64510ac964429a265508e2da4eeb4f8a57dc

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-09-17 14:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-17  8:58 [PATCH 0/2] ASoC: SOF: ipc: Small cleanups for message handler functions Peter Ujfalusi
2021-09-17  8:58 ` [PATCH 1/2] ASoC: SOF: ipc: Clarify the parameter name for ipc_trace_message() Peter Ujfalusi
2021-09-17  8:58 ` [PATCH 2/2] ASoC: SOF: ipc: Print 0x prefix for errors in ipc_trace/stream_message() Peter Ujfalusi
2021-09-17 14:03 ` [PATCH 0/2] ASoC: SOF: ipc: Small cleanups for message handler functions Mark Brown

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.