]> Git Repo - J-linux.git/commitdiff
ring-buffer: Remove stale comment from ring_buffer_size()
authorSteven Rostedt (Google) <[email protected]>
Wed, 20 Dec 2023 13:10:28 +0000 (08:10 -0500)
committerSteven Rostedt (Google) <[email protected]>
Wed, 10 Jan 2024 03:54:37 +0000 (22:54 -0500)
It's been 11 years since the ring_buffer_size() function was updated to
use the nr_pages from the buffer->buffers[cpu] structure instead of using
the buffer->nr_pages that no longer exists.

The comment in the code is more of what a change log should have and is
pretty much useless for development. It's saying how things worked back in
2012 that bares no purpose on today's code. Remove it.

Link: https://lore.kernel.org/linux-trace-kernel/[email protected]/
Link: https://lore.kernel.org/linux-trace-kernel/[email protected]
Cc: Mark Rutland <[email protected]>
Cc: Mathieu Desnoyers <[email protected]>
Reported-by: David Laight <[email protected]>
Signed-off-by: Steven Rostedt (Google) <[email protected]>
Acked-by: Masami Hiramatsu (Google) <[email protected]>
kernel/trace/ring_buffer.c

index 173d2595ce2d978259cc8a67f8d4db5b28c8a36f..7887d61d5b56957ac07640b06126542538ddf23f 100644 (file)
@@ -5122,12 +5122,6 @@ EXPORT_SYMBOL_GPL(ring_buffer_iter_advance);
  */
 unsigned long ring_buffer_size(struct trace_buffer *buffer, int cpu)
 {
-       /*
-        * Earlier, this method returned
-        *      buffer->subbuf_size * buffer->nr_pages
-        * Since the nr_pages field is now removed, we have converted this to
-        * return the per cpu buffer value.
-        */
        if (!cpumask_test_cpu(cpu, buffer->cpumask))
                return 0;
 
This page took 0.055039 seconds and 4 git commands to generate.