Skip to content

Commit 11ca75d

Browse files
committed
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()
2 parents e1d1ea5 + 9afe77e commit 11ca75d

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

include/linux/printk.h

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

kernel/printk/printk.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2190,7 +2190,7 @@ void console_unlock(void)
21902190
}
21912191

21922192
if (console_seq < log_first_seq) {
2193-
len = sprintf(text, "** %u printk messages dropped ** ",
2193+
len = sprintf(text, "** %u printk messages dropped **\n",
21942194
(unsigned)(log_first_seq - console_seq));
21952195

21962196
/* messages are gone, move to first one */

kernel/printk/printk_safe.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ static void queue_flush_work(struct printk_safe_seq_buf *s)
7272
* have dedicated buffers, because otherwise printk-safe preempted by
7373
* NMI-printk would have overwritten the NMI messages.
7474
*
75-
* The messages are fushed from irq work (or from panic()), possibly,
75+
* The messages are flushed from irq work (or from panic()), possibly,
7676
* from other CPU, concurrently with printk_safe_log_store(). Should this
7777
* happen, printk_safe_log_store() will notice the buffer->len mismatch
7878
* and repeat the write.

0 commit comments

Comments
 (0)