[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190627121515.32029-1-lukas.s.schneider@fau.de>
Date: Thu, 27 Jun 2019 14:15:15 +0200
From: Lukas Schneider <lukas.s.schneider@....de>
To: mchehab@...nel.org, gregkh@...uxfoundation.org,
hverkuil-cisco@...all.nl, st5pub@...dex.ru,
gabrielfanelli61@...il.com, code@...ofe.uk,
linux-media@...r.kernel.org, devel@...verdev.osuosl.org,
linux-kernel@...r.kernel.org
Cc: Lukas Schneider <lukas.s.schneider@....de>,
Jannik Moritz <jannik.moritz@....de>, linux-kernel@...cs.fau.de
Subject: [PATCH] media: bcm2048: Macros with complex values should be enclosed in parentheses
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@....de>
Signed-off-by: Jannik Moritz <jannik.moritz@....de>
Cc: <linux-kernel@...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
Powered by blists - more mailing lists