]> www.infradead.org Git - users/hch/misc.git/commitdiff
ASoC: SOF: Intel: Use str_yes_no() to improve bdw_dump()
authorThorsten Blum <thorsten.blum@linux.dev>
Tue, 7 Jan 2025 11:08:59 +0000 (12:08 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 13 Jan 2025 16:00:19 +0000 (16:00 +0000)
Remove hard-coded strings by using the str_yes_no() helper function.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Link: https://patch.msgid.link/20250107110900.3716-2-thorsten.blum@linux.dev
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/intel/bdw.c

index c4d92f3508b6c57fd87ad7add2555f66a04721f9..5282c0071534d47e1029bd1e46285283ba9881b7 100644 (file)
@@ -266,20 +266,20 @@ static void bdw_dump(struct snd_sof_dev *sdev, u32 flags)
        imrd = snd_sof_dsp_read(sdev, BDW_DSP_BAR, SHIM_IMRD);
        dev_err(sdev->dev,
                "error: ipc host -> DSP: pending %s complete %s raw 0x%8.8x\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%8.8x\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%8.8x\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%8.8x\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);
 }
 
 /*