All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: fsl_asrc: protect macro argument
@ 2017-08-07  6:36 Stefan Agner
  2017-08-07  7:08 ` Nicolin Chen
  2017-12-06 15:29   ` Mark Brown
  0 siblings, 2 replies; 11+ messages in thread
From: Stefan Agner @ 2017-08-07  6:36 UTC (permalink / raw)
  To: timur, nicoleotsuka, Xiubo.Lee
  Cc: fabio.estevam, alsa-devel, linux-kernel, Stefan Agner

Protect macro argument with parentheses to avoid ambiguity.
This fixes a warning seen with clang:
  warning: logical not is only applied to the left hand side of this comparison

Signed-off-by: Stefan Agner <stefan@agner.ch>
---
 sound/soc/fsl/fsl_asrc.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/fsl/fsl_asrc.h b/sound/soc/fsl/fsl_asrc.h
index 0f163abe4ba3..ec33dab4b909 100644
--- a/sound/soc/fsl/fsl_asrc.h
+++ b/sound/soc/fsl/fsl_asrc.h
@@ -57,7 +57,7 @@
 #define REG_ASRDOC			0x74
 #define REG_ASRDI(i)			(REG_ASRDIA + (i << 3))
 #define REG_ASRDO(i)			(REG_ASRDOA + (i << 3))
-#define REG_ASRDx(x, i)			(x == IN ? REG_ASRDI(i) : REG_ASRDO(i))
+#define REG_ASRDx(x, i)			((x) == IN ? REG_ASRDI(i) : REG_ASRDO(i))
 
 #define REG_ASRIDRHA			0x80
 #define REG_ASRIDRLA			0x84
-- 
2.13.3

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2017-12-06 15:29 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-07  6:36 [PATCH] ASoC: fsl_asrc: protect macro argument Stefan Agner
2017-08-07  7:08 ` Nicolin Chen
2017-12-06 13:53   ` Stefan Agner
2017-12-06 14:11     ` Mark Brown
2017-12-06 14:25       ` Stefan Agner
2017-12-06 14:39         ` Mark Brown
2017-12-06 14:39           ` Mark Brown
2017-12-06 15:03           ` Stefan Agner
2017-12-06 15:03             ` Stefan Agner
2017-12-06 15:29 ` Applied "ASoC: fsl_asrc: protect macro argument" to the asoc tree Mark Brown
2017-12-06 15:29   ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.