mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Linux Trace Kernel <linux-trace-kernel@vger.kernel.org>,
	Masami Hiramatsu <mhiramat@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	David Laight <David.Laight@ACULAB.COM>
Subject: Re: [PATCH] ring-buffer: Remove stale comment from ring_buffer_size()
Date: Wed, 20 Dec 2023 23:27:31 +0900	[thread overview]
Message-ID: <20231220232731.879a37f56f7888d4b14bd107@kernel.org> (raw)
In-Reply-To: <20231220081028.7cd7e8e2@gandalf.local.home>

On Wed, 20 Dec 2023 08:10:28 -0500
Steven Rostedt <rostedt@goodmis.org> wrote:

> From: "Steven Rostedt (Google)" <rostedt@goodmis.org>
> 
> 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/84d3b41a72bd43dbb9d44921ef535c92@AcuMS.aculab.com/
> 

Looks good to me.

Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>

Thanks,

> Reported-by: David Laight <David.Laight@ACULAB.COM>
> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
> ---
>  kernel/trace/ring_buffer.c | 6 ------
>  1 file changed, 6 deletions(-)
> 
> 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;
>  
> -- 
> 2.42.0
> 


-- 
Masami Hiramatsu (Google) <mhiramat@kernel.org>

      reply	other threads:[~2023-12-20 14:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-20 13:10 Steven Rostedt
2023-12-20 14:27 ` Masami Hiramatsu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231220232731.879a37f56f7888d4b14bd107@kernel.org \
    --to=mhiramat@kernel.org \
    --cc=David.Laight@ACULAB.COM \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®