Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/pmladek/printk

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()

+4 -6
+2 -4
include/linux/printk.h
··· 132 132 */ 133 133 #define no_printk(fmt, ...) \ 134 134 ({ \ 135 - do { \ 136 - if (0) \ 137 - printk(fmt, ##__VA_ARGS__); \ 138 - } while (0); \ 135 + if (0) \ 136 + printk(fmt, ##__VA_ARGS__); \ 139 137 0; \ 140 138 }) 141 139
+1 -1
kernel/printk/printk.c
··· 2190 2190 } 2191 2191 2192 2192 if (console_seq < log_first_seq) { 2193 - len = sprintf(text, "** %u printk messages dropped ** ", 2193 + len = sprintf(text, "** %u printk messages dropped **\n", 2194 2194 (unsigned)(log_first_seq - console_seq)); 2195 2195 2196 2196 /* messages are gone, move to first one */
+1 -1
kernel/printk/printk_safe.c
··· 72 72 * have dedicated buffers, because otherwise printk-safe preempted by 73 73 * NMI-printk would have overwritten the NMI messages. 74 74 * 75 - * The messages are fushed from irq work (or from panic()), possibly, 75 + * The messages are flushed from irq work (or from panic()), possibly, 76 76 * from other CPU, concurrently with printk_safe_log_store(). Should this 77 77 * happen, printk_safe_log_store() will notice the buffer->len mismatch 78 78 * and repeat the write.