Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/pmladek...
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 21 Nov 2017 15:28:13 +0000 (05:28 -1000)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 21 Nov 2017 15:28:13 +0000 (05:28 -1000)
Pull printk updates from Petr Mladek:

 - print the warning about dropped messages on consoles on a separate
   line.   It makes it more legible.

 - one typo fix and small code clean up.

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/pmladek/printk:
  added new line symbol after warning about dropped messages
  printk: fix typo in printk_safe.c
  printk: simplify no_printk()

include/linux/printk.h
kernel/printk/printk.c
kernel/printk/printk_safe.c

index 905bba92f01598ae535b2d2cd737d1a78e739476..e9b603ee99532266a735555ffb784a939f18f5cf 100644 (file)
@@ -132,10 +132,8 @@ struct va_format {
  */
 #define no_printk(fmt, ...)                            \
 ({                                                     \
-       do {                                            \
-               if (0)                                  \
-                       printk(fmt, ##__VA_ARGS__);     \
-       } while (0);                                    \
+       if (0)                                          \
+               printk(fmt, ##__VA_ARGS__);             \
        0;                                              \
 })
 
index 512f7c2baedd59bef5300e361c22e92b7a4845a0..5d81206a572d721e7d96b129f160a4e16d2e2f2e 100644 (file)
@@ -2190,7 +2190,7 @@ again:
                }
 
                if (console_seq < log_first_seq) {
-                       len = sprintf(text, "** %u printk messages dropped ** ",
+                       len = sprintf(text, "** %u printk messages dropped **\n",
                                      (unsigned)(log_first_seq - console_seq));
 
                        /* messages are gone, move to first one */
index 724d9292d4b9614e62b78e7e0c27e0e8fb0dd49c..3e3c2004bb232661bae666e00e4645fad438aee6 100644 (file)
@@ -72,7 +72,7 @@ static void queue_flush_work(struct printk_safe_seq_buf *s)
  * have dedicated buffers, because otherwise printk-safe preempted by
  * NMI-printk would have overwritten the NMI messages.
  *
- * The messages are fushed from irq work (or from panic()), possibly,
+ * The messages are flushed from irq work (or from panic()), possibly,
  * from other CPU, concurrently with printk_safe_log_store(). Should this
  * happen, printk_safe_log_store() will notice the buffer->len mismatch
  * and repeat the write.