Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1235185

[PATCH 6/8] kernel/trace: rb_event_is_commit can be boolean

From Yaowei Bai <bywxiaobai@163.com>
Newsgroups linux.kernel
Subject [PATCH 6/8] kernel/trace: rb_event_is_commit can be boolean
Date 2015-09-29 16:50 +0200
Message-ID <qe4ob-ZN-53@gated-at.bofh.it> (permalink)
References <qe4oa-ZN-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


This patch makes rb_event_is_commit return bool to improve readability
due to this particular function only using either one or zero as its
return value.

No functional change.

Signed-off-by: Yaowei Bai <bywxiaobai@163.com>
---
 kernel/trace/ring_buffer.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
index a228789..75f1d05 100644
--- a/kernel/trace/ring_buffer.c
+++ b/kernel/trace/ring_buffer.c
@@ -2270,7 +2270,7 @@ rb_add_time_stamp(struct ring_buffer_event *event, u64 delta)
 	return skip_time_extend(event);
 }
 
-static inline int rb_event_is_commit(struct ring_buffer_per_cpu *cpu_buffer,
+static inline bool rb_event_is_commit(struct ring_buffer_per_cpu *cpu_buffer,
 				     struct ring_buffer_event *event);
 
 /**
@@ -2498,7 +2498,7 @@ static inline void rb_event_discard(struct ring_buffer_event *event)
 		event->time_delta = 1;
 }
 
-static inline int
+static inline bool
 rb_event_is_commit(struct ring_buffer_per_cpu *cpu_buffer,
 		   struct ring_buffer_event *event)
 {
-- 
1.9.1


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/8] cleanups for trace Yaowei Bai <bywxiaobai@163.com> - 2015-09-29 16:50 +0200
  [PATCH 4/8] kernel/ring_buffer: ring_buffer_empty{cpu} can be boolean Yaowei Bai <bywxiaobai@163.com> - 2015-09-29 16:50 +0200
  [PATCH 2/8] kernel/trace: report_latency in trace_irqsoff.c can be boolean Yaowei Bai <bywxiaobai@163.com> - 2015-09-29 16:50 +0200
  [PATCH 8/8] kernel/trace: ftrace_event_is_function can be boolean Yaowei Bai <bywxiaobai@163.com> - 2015-09-29 16:50 +0200
  [PATCH 1/8] kernel/trace: report_latency in trace_sched_wakeup.c can be boolean Yaowei Bai <bywxiaobai@163.com> - 2015-09-29 16:50 +0200
  [PATCH 6/8] kernel/trace: rb_event_is_commit can be boolean Yaowei Bai <bywxiaobai@163.com> - 2015-09-29 16:50 +0200
  [PATCH 5/8] kernel/ring_buffer: rb_per_cpu_empty can be boolean Yaowei Bai <bywxiaobai@163.com> - 2015-09-29 16:50 +0200
  [PATCH 7/8] kernel/trace: is_legal_op can be boolean Yaowei Bai <bywxiaobai@163.com> - 2015-09-29 16:50 +0200
  [PATCH 3/8] kernel/trace: rb_is_reader_page can be boolean Yaowei Bai <bywxiaobai@163.com> - 2015-09-29 16:50 +0200

csiph-web