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.schnei...@fau.de>
Signed-off-by: Jannik Moritz <jannik.mor...@fau.de>
Cc: <linux-ker...@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

_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to