diff options
author | Steven Rostedt <srostedt@redhat.com> | 2009-05-11 14:08:09 -0400 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2009-05-11 14:19:00 -0400 |
commit | 1cd8d7358948909ab80b254eb14bcebc555ad417 (patch) | |
tree | ff7d2bcd4f7b4ea12af66771d6a204b786c134c5 /kernel/trace/ring_buffer.c | |
parent | d988ff94c1074c4c914235c8591bcceafb585ecf (diff) |
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>
Diffstat (limited to 'kernel/trace/ring_buffer.c')
-rw-r--r-- | kernel/trace/ring_buffer.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c index 361170609bd0..fe40f6c3507c 100644 --- a/kernel/trace/ring_buffer.c +++ b/kernel/trace/ring_buffer.c | |||
@@ -1389,7 +1389,7 @@ rb_add_time_stamp(struct ring_buffer_per_cpu *cpu_buffer, | |||
1389 | 1389 | ||
1390 | static struct ring_buffer_event * | 1390 | static struct ring_buffer_event * |
1391 | rb_reserve_next_event(struct ring_buffer_per_cpu *cpu_buffer, | 1391 | rb_reserve_next_event(struct ring_buffer_per_cpu *cpu_buffer, |
1392 | unsigned type, unsigned long length) | 1392 | unsigned long length) |
1393 | { | 1393 | { |
1394 | struct ring_buffer_event *event; | 1394 | struct ring_buffer_event *event; |
1395 | u64 ts, delta; | 1395 | u64 ts, delta; |
@@ -1448,7 +1448,7 @@ rb_reserve_next_event(struct ring_buffer_per_cpu *cpu_buffer, | |||
1448 | /* Non commits have zero deltas */ | 1448 | /* Non commits have zero deltas */ |
1449 | delta = 0; | 1449 | delta = 0; |
1450 | 1450 | ||
1451 | event = __rb_reserve_next(cpu_buffer, type, length, &ts); | 1451 | event = __rb_reserve_next(cpu_buffer, 0, length, &ts); |
1452 | if (PTR_ERR(event) == -EAGAIN) | 1452 | if (PTR_ERR(event) == -EAGAIN) |
1453 | goto again; | 1453 | goto again; |
1454 | 1454 | ||
@@ -1556,7 +1556,7 @@ ring_buffer_lock_reserve(struct ring_buffer *buffer, unsigned long length) | |||
1556 | if (length > BUF_PAGE_SIZE) | 1556 | if (length > BUF_PAGE_SIZE) |
1557 | goto out; | 1557 | goto out; |
1558 | 1558 | ||
1559 | event = rb_reserve_next_event(cpu_buffer, 0, length); | 1559 | event = rb_reserve_next_event(cpu_buffer, length); |
1560 | if (!event) | 1560 | if (!event) |
1561 | goto out; | 1561 | goto out; |
1562 | 1562 | ||
@@ -1782,7 +1782,7 @@ int ring_buffer_write(struct ring_buffer *buffer, | |||
1782 | goto out; | 1782 | goto out; |
1783 | 1783 | ||
1784 | event_length = rb_calculate_event_length(length); | 1784 | event_length = rb_calculate_event_length(length); |
1785 | event = rb_reserve_next_event(cpu_buffer, 0, event_length); | 1785 | event = rb_reserve_next_event(cpu_buffer, event_length); |
1786 | if (!event) | 1786 | if (!event) |
1787 | goto out; | 1787 | goto out; |
1788 | 1788 | ||