Alsa-Devel Archive on lore.kernel.org
 help / color / Atom feed
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: alsa-devel@alsa-project.org
Cc: tiwai@suse.de, broonie@kernel.org,
	Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Subject: [alsa-devel] [PATCH 2/4] ASoC: SOF: Intel: bdw: fix operator precedence warnings
Date: Fri, 11 Oct 2019 11:43:10 -0500
Message-ID: <20191011164312.7988-3-pierre-louis.bossart@linux.intel.com> (raw)
In-Reply-To: <20191011164312.7988-1-pierre-louis.bossart@linux.intel.com>

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>
---
 sound/soc/sof/intel/bdw.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/sound/soc/sof/intel/bdw.c b/sound/soc/sof/intel/bdw.c
index f395d0638876..bf961a8798a7 100644
--- a/sound/soc/sof/intel/bdw.c
+++ b/sound/soc/sof/intel/bdw.c
@@ -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);
 }
 
 /*
-- 
2.20.1

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

  parent reply index

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-11 16:43 [alsa-devel] [PATCH 0/4] ASoC: SOF: fix static analysis warnings Pierre-Louis Bossart
2019-10-11 16:43 ` [alsa-devel] [PATCH 1/4] ASoC: SOF: Intel: byt: fix operator precedence warnings Pierre-Louis Bossart
2019-10-14 12:04   ` [alsa-devel] Applied "ASoC: SOF: Intel: byt: fix operator precedence warnings" to the asoc tree Mark Brown
2019-10-11 16:43 ` Pierre-Louis Bossart [this message]
2019-10-14 12:04   ` [alsa-devel] Applied "ASoC: SOF: Intel: bdw: " Mark Brown
2019-10-11 16:43 ` [alsa-devel] [PATCH 3/4] ASoC: SOF: topology: remove always-true redundant test Pierre-Louis Bossart
2019-10-14 12:04   ` [alsa-devel] Applied "ASoC: SOF: topology: remove always-true redundant test" to the asoc tree Mark Brown
2019-10-11 16:43 ` [alsa-devel] [PATCH 4/4] ASoC: SOF: topology: check errors when parsing LED tokens Pierre-Louis Bossart
2019-10-14 12:04   ` [alsa-devel] Applied "ASoC: SOF: topology: check errors when parsing LED tokens" to the asoc tree Mark Brown

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191011164312.7988-3-pierre-louis.bossart@linux.intel.com \
    --to=pierre-louis.bossart@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Alsa-Devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/alsa-devel/0 alsa-devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 alsa-devel alsa-devel/ https://lore.kernel.org/alsa-devel \
		alsa-devel@alsa-project.org alsa-devel@archiver.kernel.org
	public-inbox-index alsa-devel

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.alsa-project.alsa-devel


AGPL code for this site: git clone https://public-inbox.org/ public-inbox