]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
printk: simplify no_printk()
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Sun, 17 Sep 2017 15:01:44 +0000 (00:01 +0900)
committerPetr Mladek <pmladek@suse.com>
Thu, 19 Oct 2017 13:29:24 +0000 (15:29 +0200)
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>
include/linux/printk.h

index e10f274683222358f892096c3bda5fbf7e896015..7911f736434619275d2c707f409c18b13b948f05 100644 (file)
@@ -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;                                              \
 })