[PATCH 3/5] ring-buffer: Remove add_ts_default to simplify code

From: sunliming
Date: Tue Oct 18 2022 - 08:03:20 EST


The variable add_ts_default is not necessary when absolute timestamp is
removed, so remove it to simplify code.

Signed-off-by: sunliming <sunliming@xxxxxxxxxx>
---
kernel/trace/ring_buffer.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
index ab0aef15f82a..cb261456216f 100644
--- a/kernel/trace/ring_buffer.c
+++ b/kernel/trace/ring_buffer.c
@@ -3666,7 +3666,6 @@ rb_reserve_next_event(struct trace_buffer *buffer,
struct ring_buffer_event *event;
struct rb_event_info info;
int nr_loops = 0;
- int add_ts_default;

rb_start_commit(cpu_buffer);
/* The commit page can not change after this */
@@ -3688,10 +3687,8 @@ rb_reserve_next_event(struct trace_buffer *buffer,

info.length = rb_calculate_event_length(length);

- add_ts_default = RB_ADD_STAMP_NONE;
-
again:
- info.add_timestamp = add_ts_default;
+ info.add_timestamp = RB_ADD_STAMP_NONE;
info.delta = 0;

/*
--
2.25.1