All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] staging: greybus: fix coding style of greybus/loopback.c
@ 2021-02-16 11:13 Du Cheng
  2021-02-16 11:25 ` Dan Carpenter
  2021-02-16 11:28 ` Greg Kroah-Hartman
  0 siblings, 2 replies; 4+ messages in thread
From: Du Cheng @ 2021-02-16 11:13 UTC (permalink / raw)
  To: Bryan O'Donoghue; +Cc: devel, Greg Kroah-Hartman, Du Cheng

fix macro gb_loopback_stats_attrs by wrapping its multi-line definition
inside a do {} while(0) block, in compliance to scripts/checkpatch.pl.

Signed-off-by: Du Cheng <ducheng2@gmail.com>
---
changes v2:
* relign backslashes with tabstop=8
* improve description and subject

changes v1:
* fix coding style of the macro

 drivers/staging/greybus/loopback.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/greybus/loopback.c b/drivers/staging/greybus/loopback.c
index 2471448ba42a..24b769688817 100644
--- a/drivers/staging/greybus/loopback.c
+++ b/drivers/staging/greybus/loopback.c
@@ -163,9 +163,11 @@ static ssize_t name##_avg_show(struct device *dev,		\
 static DEVICE_ATTR_RO(name##_avg)
 
 #define gb_loopback_stats_attrs(field)				\
+do {								\
 	gb_loopback_ro_stats_attr(field, min, u);		\
 	gb_loopback_ro_stats_attr(field, max, u);		\
-	gb_loopback_ro_avg_attr(field)
+	gb_loopback_ro_avg_attr(field);				\
+} while (0)
 
 #define gb_loopback_attr(field, type)					\
 static ssize_t field##_show(struct device *dev,				\
-- 
2.27.0

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

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

end of thread, other threads:[~2021-02-16 13:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-16 11:13 [PATCH v2] staging: greybus: fix coding style of greybus/loopback.c Du Cheng
2021-02-16 11:25 ` Dan Carpenter
2021-02-16 11:28 ` Greg Kroah-Hartman
2021-02-16 13:12   ` Du Cheng

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.