From: SeongJae Park <sj@kernel.org>
To: Steven Rostedt <rostedt@kernel.org>
Cc: SeongJae Park <sj@kernel.org>,
"Liam R. Howlett" <liam@infradead.org>,
LKML <linux-kernel@vger.kernel.org>,
linux-mm@kvack.org, Alice Ryhl <aliceryhl@google.com>,
Andrew Ballance <andrewjballance@gmail.com>,
maple-tree@lists.infradead.org,
Andrew Morton <akpm@linux-foundation.org>,
Matthew Wilcox <willy@infradead.org>
Subject: Re: [PATCH v2] maple_tree: document that "last" in mtree_insert_range() is inclusive
Date: Wed, 13 May 2026 18:42:04 -0700 [thread overview]
Message-ID: <20260514014205.149093-1-sj@kernel.org> (raw)
In-Reply-To: <20260512175623.4c5ca8d2@gandalf.local.home>
On Tue, 12 May 2026 17:56:23 -0400 Steven Rostedt <rostedt@kernel.org> wrote:
> From: Steven Rostedt <rostedt@goodmis.org>
>
> The kernel doc of mtree_insert_range() does not state if the address
> represented by the "last" parameter is inclusive or exclusive. This can
> lead to bugs by code that assumes it is exclusive. Explicitly state that
> the parameter is inclusive.
>
> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Acked-by: SeongJae Park <sj@kernel.org>
> ---
> Changes since v1: https://patch.msgid.link/20260506105218.2d027cc0@fedora
>
> - Use "(inclusive)" instead of adding '[' ']' around "end". (Alice Ryhl)
>
> - Add "from [first, last]" in the short description. (Liam Howlett)
>
> lib/maple_tree.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/lib/maple_tree.c b/lib/maple_tree.c
> index d18d7ed9ab67..7f6c9b729a1a 100644
> --- a/lib/maple_tree.c
> +++ b/lib/maple_tree.c
> @@ -5727,13 +5727,16 @@ int mtree_store(struct maple_tree *mt, unsigned long index, void *entry,
> EXPORT_SYMBOL(mtree_store);
>
> /**
> - * mtree_insert_range() - Insert an entry at a given range if there is no value.
> + * mtree_insert_range() - Insert an entry from [first, last] at a given range
> + * if there is no value.
It feels "at a given range" bit repetitive to me. s/at a given range// ?
Thanks,
SJ
[...]
next prev parent reply other threads:[~2026-05-14 1:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-12 21:56 [PATCH v2] maple_tree: document that "last" in mtree_insert_range() is inclusive Steven Rostedt
2026-05-13 0:40 ` Liam R. Howlett
2026-05-14 1:42 ` SeongJae Park [this message]
2026-05-14 14:07 ` Steven Rostedt
2026-05-14 14:23 ` SeongJae Park
2026-05-15 13:35 ` Liam R. Howlett
2026-05-15 13:42 ` Steven Rostedt
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=20260514014205.149093-1-sj@kernel.org \
--to=sj@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=aliceryhl@google.com \
--cc=andrewjballance@gmail.com \
--cc=liam@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=maple-tree@lists.infradead.org \
--cc=rostedt@kernel.org \
--cc=willy@infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.