ASoC: SOF: ipc: Clarify the parameter name for ipc_trace_message()
authorPeter Ujfalusi <peter.ujfalusi@linux.intel.com>
Fri, 17 Sep 2021 08:58:22 +0000 (11:58 +0300)
committerMark Brown <broonie@kernel.org>
Fri, 17 Sep 2021 12:17:43 +0000 (13:17 +0100)
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>
Link: https://lore.kernel.org/r/20210917085823.27222-2-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/ipc.c

index 8145b0d5564a578d9083bbd20127e71558d97b2f..85435780b33a963f666e499629299167f56a0a80 100644 (file)
@@ -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);
 
 /*
@@ -477,19 +477,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;
        }
 }