summaryrefslogtreecommitdiffstats
path: root/kernel/trace
diff options
context:
space:
mode:
authorWan Jiabing <wanjiabing@vivo.com>2022-04-26 09:06:28 +0200
committerSteven Rostedt (Google) <rostedt@goodmis.org>2022-04-26 23:58:52 +0200
commited888241a0ab9a3606bd986be6f0abafa1afdf19 (patch)
treedc379fcc31d1f19b6f7a594ec6dea0bb736444ea /kernel/trace
parenttracing: Use WARN instead of printk and WARN_ON (diff)
downloadlinux-ed888241a0ab9a3606bd986be6f0abafa1afdf19.tar.xz
linux-ed888241a0ab9a3606bd986be6f0abafa1afdf19.zip
ring-buffer: Simplify if-if to if-else
Use if and else instead of if(A) and if (!A). Link: https://lkml.kernel.org/r/20220426070628.167565-1-wanjiabing@vivo.com Signed-off-by: Wan Jiabing <wanjiabing@vivo.com> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace')
-rw-r--r--kernel/trace/ring_buffer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
index 05dfc7a12d3d..655d6db3e3c3 100644
--- a/kernel/trace/ring_buffer.c
+++ b/kernel/trace/ring_buffer.c
@@ -6011,10 +6011,10 @@ static __init int test_ringbuffer(void)
pr_info(" total events: %ld\n", total_lost + total_read);
pr_info(" recorded len bytes: %ld\n", total_len);
pr_info(" recorded size bytes: %ld\n", total_size);
- if (total_lost)
+ if (total_lost) {
pr_info(" With dropped events, record len and size may not match\n"
" alloced and written from above\n");
- if (!total_lost) {
+ } else {
if (RB_WARN_ON(buffer, total_len != total_alloc ||
total_size != total_written))
break;