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
Showing the changes to kernel/trace (1 of 1 file). Show all
Unified · Split
| @@ -3039,7 +3039,7 @@ int ring_buffer_write(struct ring_buffer *buffer, · 3038 unmodified lines | ||
| 3039 | 3039 | } |
| 3040 | 3040 | EXPORT_SYMBOL_GPL(ring_buffer_write); |
| 3041 | 3041 | |
| 3042 | −static int rb_per_cpu_empty(struct ring_buffer_per_cpu *cpu_buffer) | |
| 3042 | +static bool rb_per_cpu_empty(struct ring_buffer_per_cpu *cpu_buffer) | |
| 3043 | 3043 | { |
| 3044 | 3044 | struct buffer_page *reader = cpu_buffer->reader_page; |
| 3045 | 3045 | 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) · 1 unmodified line | ||
| 3047 | 3047 | |
| 3048 | 3048 | /* In case of error, head will be NULL */ |
| 3049 | 3049 | if (unlikely(!head)) |
| 3050 | − return 1; | |
| 3050 | + return true; | |
| 3051 | 3051 | |
| 3052 | 3052 | return reader->read == rb_page_commit(reader) && |
| 3053 | 3053 | (commit == reader || |