soundwire: wrap macro argument in parenthesis
authorVinod Koul <vkoul@kernel.org>
Thu, 2 May 2019 10:59:28 +0000 (16:29 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 2 May 2019 15:17:51 +0000 (17:17 +0200)
macro argument should be inside a parenthesis to avoid precedence
issues

checkpatch complains:
CHECK: Macro argument 'n' may be better as '(n)' to avoid
precedence issues

Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/linux/soundwire/sdw.h

index 41c4963..35662d9 100644 (file)
@@ -36,7 +36,7 @@ struct sdw_slave;
 #define SDW_FRAME_CTRL_BITS            48
 #define SDW_MAX_DEVICES                        11
 
-#define SDW_VALID_PORT_RANGE(n)                (n <= 14 && n >= 1)
+#define SDW_VALID_PORT_RANGE(n)                ((n) <= 14 && (n) >= 1)
 
 #define SDW_DAI_ID_RANGE_START         100
 #define SDW_DAI_ID_RANGE_END           200