]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ASoC: SOF: Intel: Use str_yes_no() helper in atom_dump()
authorThorsten Blum <thorsten.blum@linux.dev>
Mon, 30 Dec 2024 08:57:15 +0000 (09:57 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 6 Jan 2025 13:08:33 +0000 (13:08 +0000)
Remove hard-coded strings by using the str_yes_no() helper function.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Acked-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://patch.msgid.link/20241230085717.785718-2-thorsten.blum@linux.dev
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/intel/atom.c

index 30e981c558c649e2aab6a7db59fbf2df3462b3d7..0d364bcdcfa9ba371b5fa0c30400d875b886b769 100644 (file)
@@ -78,20 +78,20 @@ void atom_dump(struct snd_sof_dev *sdev, u32 flags)
        imrd = snd_sof_dsp_read64(sdev, DSP_BAR, SHIM_IMRD);
        dev_err(sdev->dev,
                "error: ipc host -> DSP: pending %s complete %s raw 0x%llx\n",
-               (panic & SHIM_IPCX_BUSY) ? "yes" : "no",
-               (panic & SHIM_IPCX_DONE) ? "yes" : "no", panic);
+               str_yes_no(panic & SHIM_IPCX_BUSY),
+               str_yes_no(panic & SHIM_IPCX_DONE), panic);
        dev_err(sdev->dev,
                "error: mask host: pending %s complete %s raw 0x%llx\n",
-               (imrx & SHIM_IMRX_BUSY) ? "yes" : "no",
-               (imrx & SHIM_IMRX_DONE) ? "yes" : "no", imrx);
+               str_yes_no(imrx & SHIM_IMRX_BUSY),
+               str_yes_no(imrx & SHIM_IMRX_DONE), imrx);
        dev_err(sdev->dev,
                "error: ipc DSP -> host: pending %s complete %s raw 0x%llx\n",
-               (status & SHIM_IPCD_BUSY) ? "yes" : "no",
-               (status & SHIM_IPCD_DONE) ? "yes" : "no", status);
+               str_yes_no(status & SHIM_IPCD_BUSY),
+               str_yes_no(status & SHIM_IPCD_DONE), status);
        dev_err(sdev->dev,
                "error: mask DSP: pending %s complete %s raw 0x%llx\n",
-               (imrd & SHIM_IMRD_BUSY) ? "yes" : "no",
-               (imrd & SHIM_IMRD_DONE) ? "yes" : "no", imrd);
+               str_yes_no(imrd & SHIM_IMRD_BUSY),
+               str_yes_no(imrd & SHIM_IMRD_DONE), imrd);
 
 }
 EXPORT_SYMBOL_NS(atom_dump, "SND_SOC_SOF_INTEL_ATOM_HIFI_EP");