From: sashiko-bot@kernel.org
To: "Vincent Donnefort" <vdonnefort@google.com>
Cc: linux-trace-kernel@vger.kernel.org
Subject: Re: [PATCH v1] ring-buffer: Rename ring_buffer_size() to ring_buffer_capacity()
Date: Mon, 07 Sep 2026 09:51:01 +0000 [thread overview]
Message-ID: <20260907095101.C38FE1F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260907094238.3624013-1-vdonnefort@google.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Typo in the newly added docstring for ring_buffer_capacity().
--
commit 0916229b26fe9d5e8fd8143432df2554e399aa85
Author: Vincent Donnefort <vdonnefort@google.com>
ring-buffer: Rename ring_buffer_size() to ring_buffer_capacity()
"capacity" refers to the memory available for events while "size" refers to
the raw allocation. ring_buffer_size() actually calculates event capacity, so
rename it to ring_buffer_capacity() to match this convention.
> diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
> index 9c03a555a6ba2..2940ff7633542 100644
> --- a/kernel/trace/ring_buffer.c
> +++ b/kernel/trace/ring_buffer.c
[ ... ]
> @@ -6547,18 +6547,23 @@ void ring_buffer_iter_advance(struct ring_buffer_iter *iter)
> EXPORT_SYMBOL_GPL(ring_buffer_iter_advance);
>
> /**
> - * ring_buffer_size - return the size of the ring buffer (in bytes)
> + * ring_buffer_capacity - return the capacity of the ring buffer (in bytes)
> * @buffer: The ring buffer.
> - * @cpu: The CPU to get ring buffer size from.
> + * @cpu: The CPU to get ring buffer capacity from.
> + *
> + * Capacity is the total memory available for recording event data in the
> + * ring buffer. It excludes subbufer headers.
[Severity: Low]
This isn't a bug, but there is a typo here (subbufer instead of subbuffer).
> + *
> + * Returns the capacity in bytes, or 0 if the CPU is not set in the buffer mask.
> */
> -unsigned long ring_buffer_size(struct trace_buffer *buffer, int cpu)
> +unsigned long ring_buffer_capacity(struct trace_buffer *buffer, int cpu)
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260907094238.3624013-1-vdonnefort@google.com?part=1
next prev parent reply other threads:[~2026-09-07 9:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-07 9:42 [PATCH v1] ring-buffer: Rename ring_buffer_size() to ring_buffer_capacity() Vincent Donnefort
2026-09-07 9:44 ` Vincent Donnefort
2026-09-07 9:51 ` sashiko-bot [this message]
2026-09-07 14:41 ` Masami Hiramatsu
2026-09-07 16:39 ` Vincent Donnefort
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=20260907095101.C38FE1F00A3A@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=vdonnefort@google.com \
/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