diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2017-09-17 11:01:44 -0400 |
---|---|---|
committer | Petr Mladek <pmladek@suse.com> | 2017-10-19 09:29:24 -0400 |
commit | 93b138dd9d6e01cd360f347512b6c5bf6f0c4ce2 (patch) | |
tree | e801803461e9e88959b83efdb9cbdaf6175f9e1c | |
parent | cef5d0f952a03d42051141742632078d488b0c6b (diff) |
printk: simplify no_printk()
Commit 069f0cd00df0 ("printk: Make the printk*once() variants return
a value") surrounded the macro implementation with ({ ... }).
Now, the inner do { ... } while (0); is redundant.
Link: http://lkml.kernel.org/r/1505660504-11059-1-git-send-email-yamada.masahiro@socionext.com
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Signed-off-by: Petr Mladek <pmladek@suse.com>
-rw-r--r-- | include/linux/printk.h | 6 |
1 files 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 { | |||
131 | */ | 131 | */ |
132 | #define no_printk(fmt, ...) \ | 132 | #define no_printk(fmt, ...) \ |
133 | ({ \ | 133 | ({ \ |
134 | do { \ | 134 | if (0) \ |
135 | if (0) \ | 135 | printk(fmt, ##__VA_ARGS__); \ |
136 | printk(fmt, ##__VA_ARGS__); \ | ||
137 | } while (0); \ | ||
138 | 0; \ | 136 | 0; \ |
139 | }) | 137 | }) |
140 | 138 | ||