lkml.org 
[lkml]   [2017]   [Sep]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] printk: simplify no_printk()
Date
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
\
 
 \ /
  Last update: 2017-09-17 17:03    [W:0.061 / U:0.048 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site