OSDN Git Service

ASoC: SOF: Intel: bdw: fix operator precedence warnings
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Fri, 11 Oct 2019 16:43:10 +0000 (11:43 -0500)
committerMark Brown <broonie@kernel.org>
Mon, 14 Oct 2019 11:58:26 +0000 (12:58 +0100)
Address cppcheck warnings

sound/soc/sof/intel/bdw.c:265:26: style: Clarify calculation precedence
for '&' and '?'. [clarifyCalculation]
  panic & SHIM_IPCX_BUSY ? "yes" : "no",
                         ^

sound/soc/sof/intel/bdw.c:266:26: style: Clarify calculation
precedence for '&' and '?'. [clarifyCalculation]
  panic & SHIM_IPCX_DONE ? "yes" : "no", panic);
                         ^

sound/soc/sof/intel/bdw.c:269:25: style: Clarify calculation
precedence for '&' and '?'. [clarifyCalculation]
  imrx & SHIM_IMRX_BUSY ? "yes" : "no",
                        ^

sound/soc/sof/intel/bdw.c:270:25: style: Clarify calculation
precedence for '&' and '?'. [clarifyCalculation]
  imrx & SHIM_IMRX_DONE ? "yes" : "no", imrx);
                        ^

sound/soc/sof/intel/bdw.c:273:27: style: Clarify calculation
precedence for '&' and '?'. [clarifyCalculation]
  status & SHIM_IPCD_BUSY ? "yes" : "no",
                          ^

sound/soc/sof/intel/bdw.c:274:27: style: Clarify calculation
precedence for '&' and '?'. [clarifyCalculation]
  status & SHIM_IPCD_DONE ? "yes" : "no", status);
                          ^

sound/soc/sof/intel/bdw.c:277:25: style: Clarify calculation
precedence for '&' and '?'. [clarifyCalculation]
  imrd & SHIM_IMRD_BUSY ? "yes" : "no",
                        ^

sound/soc/sof/intel/bdw.c:278:25: style: Clarify calculation
precedence for '&' and '?'. [clarifyCalculation]
  imrd & SHIM_IMRD_DONE ? "yes" : "no", imrd);
                        ^

Fixes: 3a9e204d4e369 ("ASoC: SOF: Intel: Add context data to any IPC timeout.")
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20191011164312.7988-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/intel/bdw.c

index f395d06..bf961a8 100644 (file)
@@ -262,20 +262,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);
+               (panic & SHIM_IPCX_BUSY) ? "yes" : "no",
+               (panic & SHIM_IPCX_DONE) ? "yes" : "no", 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);
+               (imrx & SHIM_IMRX_BUSY) ? "yes" : "no",
+               (imrx & SHIM_IMRX_DONE) ? "yes" : "no", 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);
+               (status & SHIM_IPCD_BUSY) ? "yes" : "no",
+               (status & SHIM_IPCD_DONE) ? "yes" : "no", 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);
+               (imrd & SHIM_IMRD_BUSY) ? "yes" : "no",
+               (imrd & SHIM_IMRD_DONE) ? "yes" : "no", imrd);
 }
 
 /*