Skip to contentSkip to conversation

ASoC: fsl_asrc: protect macro argument

PATCH RESEND New Stefan Agner 1 participant 1 message Dec 6, 2017

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/1 ASoC: fsl_asrc: protect macro argument

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

---
 sound/soc/fsl/fsl_asrc.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/fsl/fsl_asrc.h +1 -1
index 0f163abe4ba3..ec33dab4b909 100644
@@ -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
Signature · 1 line
2.13.3