linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] media: bcm2048: Macros with complex values should be enclosed in parentheses
@ 2019-06-27 12:15 Lukas Schneider
  2019-06-27 12:30 ` Dan Carpenter
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Lukas Schneider @ 2019-06-27 12:15 UTC (permalink / raw)
  To: mchehab, gregkh, hverkuil-cisco, st5pub, gabrielfanelli61, code,
	linux-media, devel, linux-kernel
  Cc: Lukas Schneider, Jannik Moritz, linux-kernel

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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-07-04 22:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-27 12:15 [PATCH] media: bcm2048: Macros with complex values should be enclosed in parentheses Lukas Schneider
2019-06-27 12:30 ` Dan Carpenter
2019-06-27 17:32 ` kbuild test robot
2019-07-04 22:29 ` kbuild test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).