From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: alsa-devel@alsa-project.org
Cc: linux-kernel@vger.kernel.org, tiwai@suse.de, broonie@kernel.org,
vkoul@kernel.org, gregkh@linuxfoundation.org,
liam.r.girdwood@linux.intel.com, jank@cadence.com,
joe@perches.com, srinivas.kandagatla@linaro.org,
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
Sanyog Kale <sanyog.r.kale@intel.com>
Subject: [PATCH v4 16/22] soundwire: intel: protect macro parameters
Date: Wed, 1 May 2019 10:57:39 -0500 [thread overview]
Message-ID: <20190501155745.21806-17-pierre-louis.bossart@linux.intel.com> (raw)
In-Reply-To: <20190501155745.21806-1-pierre-louis.bossart@linux.intel.com>
Extra parentheses required here
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
---
drivers/soundwire/intel.c | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/drivers/soundwire/intel.c b/drivers/soundwire/intel.c
index 56d6c1dda0ff..8c653a563534 100644
--- a/drivers/soundwire/intel.c
+++ b/drivers/soundwire/intel.c
@@ -24,18 +24,18 @@
#define SDW_SHIM_IPPTR 0x8
#define SDW_SHIM_SYNC 0xC
-#define SDW_SHIM_CTLSCAP(x) (0x010 + 0x60 * x)
-#define SDW_SHIM_CTLS0CM(x) (0x012 + 0x60 * x)
-#define SDW_SHIM_CTLS1CM(x) (0x014 + 0x60 * x)
-#define SDW_SHIM_CTLS2CM(x) (0x016 + 0x60 * x)
-#define SDW_SHIM_CTLS3CM(x) (0x018 + 0x60 * x)
-#define SDW_SHIM_PCMSCAP(x) (0x020 + 0x60 * x)
-
-#define SDW_SHIM_PCMSYCHM(x, y) (0x022 + (0x60 * x) + (0x2 * y))
-#define SDW_SHIM_PCMSYCHC(x, y) (0x042 + (0x60 * x) + (0x2 * y))
-#define SDW_SHIM_PDMSCAP(x) (0x062 + 0x60 * x)
-#define SDW_SHIM_IOCTL(x) (0x06C + 0x60 * x)
-#define SDW_SHIM_CTMCTL(x) (0x06E + 0x60 * x)
+#define SDW_SHIM_CTLSCAP(x) (0x010 + 0x60 * (x))
+#define SDW_SHIM_CTLS0CM(x) (0x012 + 0x60 * (x))
+#define SDW_SHIM_CTLS1CM(x) (0x014 + 0x60 * (x))
+#define SDW_SHIM_CTLS2CM(x) (0x016 + 0x60 * (x))
+#define SDW_SHIM_CTLS3CM(x) (0x018 + 0x60 * (x))
+#define SDW_SHIM_PCMSCAP(x) (0x020 + 0x60 * (x))
+
+#define SDW_SHIM_PCMSYCHM(x, y) (0x022 + (0x60 * (x)) + (0x2 * (y)))
+#define SDW_SHIM_PCMSYCHC(x, y) (0x042 + (0x60 * (x)) + (0x2 * (y)))
+#define SDW_SHIM_PDMSCAP(x) (0x062 + 0x60 * (x))
+#define SDW_SHIM_IOCTL(x) (0x06C + 0x60 * (x))
+#define SDW_SHIM_CTMCTL(x) (0x06E + 0x60 * (x))
#define SDW_SHIM_WAKEEN 0x190
#define SDW_SHIM_WAKESTS 0x192
@@ -82,7 +82,7 @@
#define SDW_SHIM_WAKESTS_STATUS BIT(0)
/* Intel ALH Register definitions */
-#define SDW_ALH_STRMZCFG(x) (0x000 + (0x4 * x))
+#define SDW_ALH_STRMZCFG(x) (0x000 + (0x4 * (x)))
#define SDW_ALH_STRMZCFG_DMAT_VAL 0x3
#define SDW_ALH_STRMZCFG_DMAT GENMASK(7, 0)
--
2.17.1
next prev parent reply other threads:[~2019-05-01 15:59 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-01 15:57 [PATCH v4 00/22] soundwire: code cleanup Pierre-Louis Bossart
2019-05-01 15:57 ` [PATCH v4 01/22] soundwire: Kconfig: fix help format Pierre-Louis Bossart
2019-05-01 15:57 ` [PATCH v4 02/22] soundwire: fix SPDX license for header files Pierre-Louis Bossart
2019-05-01 16:05 ` Greg KH
2019-05-02 5:16 ` Vinod Koul
2019-05-02 6:31 ` Greg KH
2019-05-02 6:44 ` Vinod Koul
2019-05-01 15:57 ` [PATCH v4 03/22] soundwire: fix alignment issues in " Pierre-Louis Bossart
2019-05-02 5:25 ` Vinod Koul
2019-05-01 15:57 ` [PATCH v4 04/22] soundwire: bus: fix alignment issues Pierre-Louis Bossart
2019-05-01 15:57 ` [PATCH v4 05/22] soundwire: bus: fix typos in comments Pierre-Louis Bossart
2019-05-01 15:57 ` [PATCH v4 06/22] soundwire: bus: remove useless parentheses Pierre-Louis Bossart
2019-05-02 5:32 ` Vinod Koul
2019-05-01 15:57 ` [PATCH v4 07/22] soundwire: bus: fix boolean comparisons Pierre-Louis Bossart
2019-05-01 15:57 ` [PATCH v4 08/22] soundwire: bus: remove spurious newline Pierre-Louis Bossart
2019-05-01 15:57 ` [PATCH v4 09/22] soundwire: bus_type: fix alignment issues Pierre-Louis Bossart
2019-05-01 15:57 ` [PATCH v4 10/22] soundwire: mipi_disco: " Pierre-Louis Bossart
2019-05-02 5:34 ` Vinod Koul
2019-05-01 15:57 ` [PATCH v4 11/22] soundwire: mipi_disco: fix boolean comparisons Pierre-Louis Bossart
2019-05-01 15:57 ` [PATCH v4 12/22] soundwire: stream: fix alignment issues Pierre-Louis Bossart
2019-05-01 15:57 ` [PATCH v4 13/22] soundwire: slave: " Pierre-Louis Bossart
2019-05-01 15:57 ` [PATCH v4 14/22] soundwire: intel_init: " Pierre-Louis Bossart
2019-05-01 15:57 ` [PATCH v4 15/22] soundwire: intel: " Pierre-Louis Bossart
2019-05-01 15:57 ` Pierre-Louis Bossart [this message]
2019-05-01 15:57 ` [PATCH v4 17/22] soundwire: intel: fix boolean comparison Pierre-Louis Bossart
2019-05-01 15:57 ` [PATCH v4 18/22] soundwire: cadence_master: fix alignment issues Pierre-Louis Bossart
2019-05-01 15:57 ` [PATCH v4 19/22] soundwire: cadence_master: balance parentheses Pierre-Louis Bossart
2019-05-01 15:57 ` [PATCH v4 20/22] soundwire: cadence_master: fix boolean comparisons Pierre-Louis Bossart
2019-05-01 15:57 ` [PATCH v4 21/22] soundwire: cadence_master: remove spurious newline Pierre-Louis Bossart
2019-05-01 15:57 ` [PATCH v4 22/22] soundwire: add missing newlines in dynamic debug logs Pierre-Louis Bossart
2019-05-02 5:37 ` Vinod Koul
2019-05-02 6:32 ` Greg KH
2019-05-02 14:55 ` [alsa-devel] " Pierre-Louis Bossart
2019-05-01 16:07 ` [PATCH v4 00/22] soundwire: code cleanup Greg KH
2019-05-02 5:39 ` Vinod Koul
2019-05-02 5:58 ` Vinod Koul
2019-05-02 7:07 ` [alsa-devel] " Vinod Koul
2019-05-02 15:19 ` Greg KH
Reply instructions:
You may reply publicly 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=20190501155745.21806-17-pierre-louis.bossart@linux.intel.com \
--to=pierre-louis.bossart@linux.intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=jank@cadence.com \
--cc=joe@perches.com \
--cc=liam.r.girdwood@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sanyog.r.kale@intel.com \
--cc=srinivas.kandagatla@linaro.org \
--cc=tiwai@suse.de \
--cc=vkoul@kernel.org \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®