projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3d4e204
)
ring-buffer: rb_per_cpu_empty() can return boolean
author
Yaowei Bai
<bywxiaobai@163.com>
Tue, 29 Sep 2015 14:43:33 +0000
(22:43 +0800)
committer
Steven Rostedt
<rostedt@goodmis.org>
Mon, 2 Nov 2015 19:24:27 +0000
(14:24 -0500)
Makes rb_per_cpu_empty() return bool to improve readability.
No functional change.
Link:
http://lkml.kernel.org/r/1443537816-5788-6-git-send-email-bywxiaobai@163.com
Signed-off-by: Yaowei Bai <bywxiaobai@163.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
kernel/trace/ring_buffer.c
patch
|
blob
|
blame
|
history
diff --git
a/kernel/trace/ring_buffer.c
b/kernel/trace/ring_buffer.c
index fc9ce12666be7bdae4339217a38b053c0f98b98c..a22878923a303c53bddc63f674afad9ba35c1a3d 100644
(file)
--- a/
kernel/trace/ring_buffer.c
+++ b/
kernel/trace/ring_buffer.c
@@
-3039,7
+3039,7
@@
int ring_buffer_write(struct ring_buffer *buffer,
}
EXPORT_SYMBOL_GPL(ring_buffer_write);
-static
int
rb_per_cpu_empty(struct ring_buffer_per_cpu *cpu_buffer)
+static
bool
rb_per_cpu_empty(struct ring_buffer_per_cpu *cpu_buffer)
{
struct buffer_page *reader = cpu_buffer->reader_page;
struct buffer_page *head = rb_set_head_page(cpu_buffer);
@@
-3047,7
+3047,7
@@
static int rb_per_cpu_empty(struct ring_buffer_per_cpu *cpu_buffer)
/* In case of error, head will be NULL */
if (unlikely(!head))
- return
1
;
+ return
true
;
return reader->read == rb_page_commit(reader) &&
(commit == reader ||