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

From: Lukas Schneider
Date: Thu Jun 27 2019 - 08:15:42 EST


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@xxxxxx>
Signed-off-by: Jannik Moritz <jannik.moritz@xxxxxx>
Cc: <linux-kernel@xxxxxxxxxxxx>
---
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