diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-11-21 10:28:13 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-11-21 10:28:13 -0500 |
commit | 11ca75d2d6d18d5a7ee4d7ec1da6f864f5c8c8be (patch) | |
tree | ce03dc406fdb0e7a3d58e6506c1537c9fe9c98d3 | |
parent | e1d1ea549b57790a3d8cf6300e6ef86118d692a3 (diff) | |
parent | 9afe77ed849de6af8532b4c1b9310102eed9edf7 (diff) |
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()
-rw-r--r-- | include/linux/printk.h | 6 | ||||
-rw-r--r-- | kernel/printk/printk.c | 2 | ||||
-rw-r--r-- | kernel/printk/printk_safe.c | 2 |
3 files changed, 4 insertions, 6 deletions
diff --git a/include/linux/printk.h b/include/linux/printk.h index 905bba92f015..e9b603ee9953 100644 --- a/include/linux/printk.h +++ b/include/linux/printk.h | |||
@@ -132,10 +132,8 @@ struct va_format { | |||
132 | */ | 132 | */ |
133 | #define no_printk(fmt, ...) \ | 133 | #define no_printk(fmt, ...) \ |
134 | ({ \ | 134 | ({ \ |
135 | do { \ | 135 | if (0) \ |
136 | if (0) \ | 136 | printk(fmt, ##__VA_ARGS__); \ |
137 | printk(fmt, ##__VA_ARGS__); \ | ||
138 | } while (0); \ | ||
139 | 0; \ | 137 | 0; \ |
140 | }) | 138 | }) |
141 | 139 | ||
diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c index 512f7c2baedd..5d81206a572d 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c | |||
@@ -2190,7 +2190,7 @@ again: | |||
2190 | } | 2190 | } |
2191 | 2191 | ||
2192 | if (console_seq < log_first_seq) { | 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 | (unsigned)(log_first_seq - console_seq)); | 2194 | (unsigned)(log_first_seq - console_seq)); |
2195 | 2195 | ||
2196 | /* messages are gone, move to first one */ | 2196 | /* messages are gone, move to first one */ |
diff --git a/kernel/printk/printk_safe.c b/kernel/printk/printk_safe.c index 724d9292d4b9..3e3c2004bb23 100644 --- a/kernel/printk/printk_safe.c +++ b/kernel/printk/printk_safe.c | |||
@@ -72,7 +72,7 @@ static void queue_flush_work(struct printk_safe_seq_buf *s) | |||
72 | * have dedicated buffers, because otherwise printk-safe preempted by | 72 | * have dedicated buffers, because otherwise printk-safe preempted by |
73 | * NMI-printk would have overwritten the NMI messages. | 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 | * from other CPU, concurrently with printk_safe_log_store(). Should this | 76 | * from other CPU, concurrently with printk_safe_log_store(). Should this |
77 | * happen, printk_safe_log_store() will notice the buffer->len mismatch | 77 | * happen, printk_safe_log_store() will notice the buffer->len mismatch |
78 | * and repeat the write. | 78 | * and repeat the write. |