From nobody Fri Dec 26 01:25:07 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4ED1D4BA89 for ; Wed, 10 Jan 2024 16:06:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2FEE7C433F1; Wed, 10 Jan 2024 16:06:16 +0000 (UTC) Date: Wed, 10 Jan 2024 11:07:16 -0500 From: Steven Rostedt To: LKML Cc: Masami Hiramatsu , Mathieu Desnoyers , Mark Rutland , David Laight Subject: [for-next][PATCH] ring-buffer: Remove stale comment from ring_buffer_size() Message-ID: <20240110110716.02074fc6@gandalf.local.home> X-Mailer: Claws Mail 3.19.1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Found this sitting it patchwork and never pulled it in. git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git trace/for-next Head SHA1: 25742aeb135c4a44e92fb347e037adaa145b9484 Steven Rostedt (Google) (1): ring-buffer: Remove stale comment from ring_buffer_size() ---- kernel/trace/ring_buffer.c | 6 ------ 1 file changed, 6 deletions(-) --------------------------- commit 25742aeb135c4a44e92fb347e037adaa145b9484 Author: Steven Rostedt (Google) Date: Wed Dec 20 08:10:28 2023 -0500 ring-buffer: Remove stale comment from ring_buffer_size() =20 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 usi= ng the buffer->nr_pages that no longer exists. =20 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. =20 Link: https://lore.kernel.org/linux-trace-kernel/84d3b41a72bd43dbb9d449= 21ef535c92@AcuMS.aculab.com/ Link: https://lore.kernel.org/linux-trace-kernel/20231220081028.7cd7e8e= 2@gandalf.local.home =20 Cc: Mark Rutland Cc: Mathieu Desnoyers Reported-by: David Laight Signed-off-by: Steven Rostedt (Google) Acked-by: Masami Hiramatsu (Google) diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c index 173d2595ce2d..7887d61d5b56 100644 --- a/kernel/trace/ring_buffer.c +++ b/kernel/trace/ring_buffer.c @@ -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;