[alsa-devel] [PATCH 12/14] soundwire: wrap macro argument in	parenthesis
    Vinod Koul 
    vkoul at kernel.org
       
    Thu May  2 12:59:28 CEST 2019
    
    
  
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 at kernel.org>
---
 include/linux/soundwire/sdw.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/soundwire/sdw.h b/include/linux/soundwire/sdw.h
index 41c49631288a..35662d9c2c62 100644
--- a/include/linux/soundwire/sdw.h
+++ b/include/linux/soundwire/sdw.h
@@ -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
-- 
2.20.1
    
    
More information about the Alsa-devel
mailing list