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/[email protected] Cc: Andrew Morton <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Masahiro Yamada <[email protected]> Cc: Steven Rostedt <[email protected]> Cc: [email protected] Signed-off-by: Masahiro Yamada <[email protected]> Reviewed-by: Sergey Senozhatsky <[email protected]> Signed-off-by: Petr Mladek <[email protected]>
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)