mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 03:36:19 +00:00
ring-buffer: remove type parameter from rb_reserve_next_event
The rb_reserve_next_event is only called for the data type (type = 0). There is no reason to pass in the type to the function. Before: text data bss dec hex filename 16554 24 12 16590 40ce kernel/trace/ring_buffer.o After: text data bss dec hex filename 16538 24 12 16574 40be kernel/trace/ring_buffer.o [ Impact: cleaner, smaller and slightly more efficient code ] Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
This commit is contained in:
parent
d988ff94c1
commit
1cd8d73589
1 changed files with 4 additions and 4 deletions
|
@ -1389,7 +1389,7 @@ rb_add_time_stamp(struct ring_buffer_per_cpu *cpu_buffer,
|
|||
|
||||
static struct ring_buffer_event *
|
||||
rb_reserve_next_event(struct ring_buffer_per_cpu *cpu_buffer,
|
||||
unsigned type, unsigned long length)
|
||||
unsigned long length)
|
||||
{
|
||||
struct ring_buffer_event *event;
|
||||
u64 ts, delta;
|
||||
|
@ -1448,7 +1448,7 @@ rb_reserve_next_event(struct ring_buffer_per_cpu *cpu_buffer,
|
|||
/* Non commits have zero deltas */
|
||||
delta = 0;
|
||||
|
||||
event = __rb_reserve_next(cpu_buffer, type, length, &ts);
|
||||
event = __rb_reserve_next(cpu_buffer, 0, length, &ts);
|
||||
if (PTR_ERR(event) == -EAGAIN)
|
||||
goto again;
|
||||
|
||||
|
@ -1556,7 +1556,7 @@ ring_buffer_lock_reserve(struct ring_buffer *buffer, unsigned long length)
|
|||
if (length > BUF_PAGE_SIZE)
|
||||
goto out;
|
||||
|
||||
event = rb_reserve_next_event(cpu_buffer, 0, length);
|
||||
event = rb_reserve_next_event(cpu_buffer, length);
|
||||
if (!event)
|
||||
goto out;
|
||||
|
||||
|
@ -1782,7 +1782,7 @@ int ring_buffer_write(struct ring_buffer *buffer,
|
|||
goto out;
|
||||
|
||||
event_length = rb_calculate_event_length(length);
|
||||
event = rb_reserve_next_event(cpu_buffer, 0, event_length);
|
||||
event = rb_reserve_next_event(cpu_buffer, event_length);
|
||||
if (!event)
|
||||
goto out;
|
||||
|
||||
|
|
Loading…
Reference in a new issue