Skip to content

Commit

Permalink
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/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()
  • Loading branch information
torvalds committed Nov 21, 2017
2 parents e1d1ea5 + 9afe77e commit 11ca75d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
6 changes: 2 additions & 4 deletions include/linux/printk.h
Original file line number Diff line number Diff line change
Expand Up @@ -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; \
})

Expand Down
2 changes: 1 addition & 1 deletion kernel/printk/printk.c
Original file line number Diff line number Diff line change
Expand Up @@ -2190,7 +2190,7 @@ void console_unlock(void)
}

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 */
Expand Down
2 changes: 1 addition & 1 deletion kernel/printk/printk_safe.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 11ca75d

Please sign in to comment.