Skip to content

Commit 93b138d

Browse files
masahir0ypmladek
authored andcommitted
printk: simplify no_printk()
Commit 069f0cd ("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>
1 parent cef5d0f commit 93b138d

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

include/linux/printk.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,8 @@ struct va_format {
131131
*/
132132
#define no_printk(fmt, ...) \
133133
({ \
134-
do { \
135-
if (0) \
136-
printk(fmt, ##__VA_ARGS__); \
137-
} while (0); \
134+
if (0) \
135+
printk(fmt, ##__VA_ARGS__); \
138136
0; \
139137
})
140138

0 commit comments

Comments
 (0)