xen/trace: remove duplicate check for tb_init_done
PATCH 1/1 xen/trace: remove duplicate check for tb_init_done
The single caller of next_record already checked for tb_init_done. The functions are called with t_lock held. The call stack look like this:
__trace_var
tb_init_done?
insert_wrap_record
insert_lost_records
__insert_record
next_record
tb_init_done?
Signed-off-by Olaf Hering <[email protected]>
--- xen/common/trace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
xen/common/trace.c +1 -1
@@ -514,7 +514,7 @@ static unsigned char *next_record(const struct t_buf *buf, uint32_t *next,barrier ();/* must read buf->prod and buf->cons only once */ *next = x; -if ( !tb_init_done ||bogus (x, cons) ) +if (bogus (x, cons) )return NULL ;if ( x >= data_size )