[PATCH] media: bcm2048: Macros with complex values should be enclosed in parentheses

Lukas Schneider lukas.s.schneider at fau.de
Thu Jun 27 12:15:15 UTC 2019


Fix ERROR: Macros with complex values should be enclosed in parentheses,
reported by checkpatch.

Add a do {...} while (0) loop around the macro.

Signed-off-by: Lukas Schneider <lukas.s.schneider at fau.de>
Signed-off-by: Jannik Moritz <jannik.moritz at fau.de>
Cc: <linux-kernel at i4.cs.fau.de>
---
 drivers/staging/media/bcm2048/radio-bcm2048.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/media/bcm2048/radio-bcm2048.c b/drivers/staging/media/bcm2048/radio-bcm2048.c
index 2c60a1fb6350..206f2a662f92 100644
--- a/drivers/staging/media/bcm2048/radio-bcm2048.c
+++ b/drivers/staging/media/bcm2048/radio-bcm2048.c
@@ -2001,8 +2001,10 @@ static ssize_t bcm2048_##prop##_read(struct device *dev,		\
 }
 
 #define DEFINE_SYSFS_PROPERTY(prop, prop_type, mask, check)		\
-property_write(prop, prop_type, mask, check)				\
-property_read(prop, mask)						\
+do {									\
+	property_write(prop, prop_type, mask, check)			\
+	property_read(prop, mask)					\
+} while (0)								\
 
 #define property_str_read(prop, size)					\
 static ssize_t bcm2048_##prop##_read(struct device *dev,		\
-- 
2.22.0



More information about the devel mailing list