diff options
author | Lai Jiangshan <laijs@cn.fujitsu.com> | 2008-12-17 17:48:23 +0800 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-12-18 13:49:56 +0100 |
commit | 6d102bc68f3dd2ae0e305b09170b1751aa67baeb (patch) | |
tree | c52f4bf881946eff6824190fd4c57bd5949319c9 /kernel/trace | |
parent | 40874491f9e9a4cb08eaf663dbe018bf5671975a (diff) | |
download | linux-stable-6d102bc68f3dd2ae0e305b09170b1751aa67baeb.tar.gz linux-stable-6d102bc68f3dd2ae0e305b09170b1751aa67baeb.tar.bz2 linux-stable-6d102bc68f3dd2ae0e305b09170b1751aa67baeb.zip |
tracing/ring-buffer: remove unused ring_buffer size
Impact: remove dead code
struct ring_buffer.size is not set after ring_buffer is initialized
or resized. it is always 0.
we can use "buffer->pages * PAGE_SIZE" to get ring_buffer's size
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/trace')
-rw-r--r-- | kernel/trace/ring_buffer.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c index eab81f918f6a..bb6922a931b1 100644 --- a/kernel/trace/ring_buffer.c +++ b/kernel/trace/ring_buffer.c @@ -258,7 +258,6 @@ struct ring_buffer_per_cpu { }; struct ring_buffer { - unsigned long size; unsigned pages; unsigned flags; int cpus; @@ -2210,8 +2209,7 @@ int ring_buffer_swap_cpu(struct ring_buffer *buffer_a, return -EINVAL; /* At least make sure the two buffers are somewhat the same */ - if (buffer_a->size != buffer_b->size || - buffer_a->pages != buffer_b->pages) + if (buffer_a->pages != buffer_b->pages) return -EINVAL; cpu_buffer_a = buffer_a->buffers[cpu]; |