mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] printk: simplify no_printk()
@ 2017-09-17 15:01 Masahiro Yamada
  2017-09-17 18:31 ` Joe Perches
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Masahiro Yamada @ 2017-09-17 15:01 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Ingo Molnar, Masahiro Yamada, Sergey Senozhatsky, Steven Rostedt,
	Petr Mladek, linux-kernel

Commit 069f0cd00df0 ("printk: Make the printk*once() variants return
a value") surrounded the macro implementation with ({ ... }).

Now, the inner do { ... } while (0); is redundant.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 include/linux/printk.h | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/include/linux/printk.h b/include/linux/printk.h
index e10f27468322..7911f7364346 100644
--- a/include/linux/printk.h
+++ b/include/linux/printk.h
@@ -131,10 +131,8 @@ struct va_format {
  */
 #define no_printk(fmt, ...)				\
 ({							\
-	do {						\
-		if (0)					\
-			printk(fmt, ##__VA_ARGS__);	\
-	} while (0);					\
+	if (0)						\
+		printk(fmt, ##__VA_ARGS__);		\
 	0;						\
 })
 
-- 
2.7.4

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

end of thread, other threads:[~2017-10-19 13:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-17 15:01 [PATCH] printk: simplify no_printk() Masahiro Yamada
2017-09-17 18:31 ` Joe Perches
2017-09-26  6:43 ` Sergey Senozhatsky
2017-10-02 14:56 ` Petr Mladek
2017-10-19 10:48   ` Masahiro Yamada
2017-10-19 13:38     ` Petr Mladek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®