summaryrefslogtreecommitdiffstats
path: root/sound/soc
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@linux.intel.com>2021-10-06 14:06:42 +0300
committerMark Brown <broonie@kernel.org>2021-10-07 15:45:38 +0100
commite51838909b69a8c941629a6f86804f8e189103e2 (patch)
treec454c7322fd5c595d966b19b23c895aa7f97a2c5 /sound/soc
parent4fade25dfbe121f8ef61458b4655966f133b1907 (diff)
downloadlinux-stable-e51838909b69a8c941629a6f86804f8e189103e2.tar.gz
linux-stable-e51838909b69a8c941629a6f86804f8e189103e2.tar.bz2
linux-stable-e51838909b69a8c941629a6f86804f8e189103e2.zip
ASoC: SOF: core: Clean up snd_sof_get_status() prints
Clean up the error prints when decoding the status in snd_sof_get_status(): Drop the "error:" prefixes from the prints, Use %# to print hexadecimal numbers, Reword some of the messages to be more precise, For a known error print out the panic code as well, For unknown error print only the panic code without the magic Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20211006110645.26679-17-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/sof/core.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/sound/soc/sof/core.c b/sound/soc/sof/core.c
index ce377ff35030..b5ffcd438c1c 100644
--- a/sound/soc/sof/core.c
+++ b/sound/soc/sof/core.c
@@ -67,7 +67,7 @@ void snd_sof_get_status(struct snd_sof_dev *sdev, u32 panic_code,
/* is firmware dead ? */
if ((panic_code & SOF_IPC_PANIC_MAGIC_MASK) != SOF_IPC_PANIC_MAGIC) {
- dev_err(sdev->dev, "error: unexpected fault 0x%8.8x trace 0x%8.8x\n",
+ dev_err(sdev->dev, "unexpected fault %#010x trace %#010x\n",
panic_code, tracep_code);
return; /* no fault ? */
}
@@ -76,20 +76,20 @@ void snd_sof_get_status(struct snd_sof_dev *sdev, u32 panic_code,
for (i = 0; i < ARRAY_SIZE(panic_msg); i++) {
if (panic_msg[i].id == code) {
- dev_err(sdev->dev, "error: %s\n", panic_msg[i].msg);
- dev_err(sdev->dev, "error: trace point %8.8x\n",
- tracep_code);
+ dev_err(sdev->dev, "reason: %s (%#x)\n", panic_msg[i].msg,
+ code & SOF_IPC_PANIC_CODE_MASK);
+ dev_err(sdev->dev, "trace point: %#010x\n", tracep_code);
goto out;
}
}
/* unknown error */
- dev_err(sdev->dev, "error: unknown reason %8.8x\n", panic_code);
- dev_err(sdev->dev, "error: trace point %8.8x\n", tracep_code);
+ dev_err(sdev->dev, "unknown panic code: %#x\n", code & SOF_IPC_PANIC_CODE_MASK);
+ dev_err(sdev->dev, "trace point: %#010x\n", tracep_code);
out:
- dev_err(sdev->dev, "error: panic at %s:%d\n",
- panic_info->filename, panic_info->linenum);
+ dev_err(sdev->dev, "panic at %s:%d\n", panic_info->filename,
+ panic_info->linenum);
sof_oops(sdev, oops);
sof_stack(sdev, oops, stack, stack_words);
}