Skip to content

Commit

Permalink
ring-buffer: rb_event_is_commit() can return boolean
Browse files Browse the repository at this point in the history
Make 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.

Link: http://lkml.kernel.org/r/1443537816-5788-7-git-send-email-bywxiaobai@163.com

Signed-off-by: Yaowei Bai <bywxiaobai@163.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
  • Loading branch information
Yaowei Bai authored and Steven Rostedt committed Nov 2, 2015
1 parent da58834 commit cdb2a0a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kernel/trace/ring_buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

/**
Expand Down Expand Up @@ -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)
{
Expand Down

0 comments on commit cdb2a0a

Please sign in to comment.