]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
ASoC: fsl_asrc: protect macro argument
authorStefan Agner <stefan@agner.ch>
Wed, 6 Dec 2017 15:17:27 +0000 (16:17 +0100)
committerMark Brown <broonie@kernel.org>
Wed, 6 Dec 2017 15:24:58 +0000 (15:24 +0000)
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>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/fsl/fsl_asrc.h

index 0f163abe4ba37d93bec022afd0842b20423f2361..ec33dab4b9092c486e6d80c861adb02eb7ab5573 100644 (file)
@@ -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