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>
This commit is contained in:
Wan Jiabing 2022-04-26 15:06:28 +08:00 committed by Steven Rostedt (Google)
parent 4ee51101e9
commit ed888241a0
1 changed files with 2 additions and 2 deletions

View File

@ -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;