From: SeongJae Park <sj@kernel.org>
To: Matthew Wilcox <willy@infradead.org>
Cc: SeongJae Park <sj@kernel.org>,
"Liam R. Howlett" <liam@infradead.org>,
Alice Ryhl <aliceryhl@google.com>,
Steven Rostedt <rostedt@goodmis.org>,
LKML <linux-kernel@vger.kernel.org>,
linux-mm@kvack.org, Andrew Ballance <andrewjballance@gmail.com>,
maple-tree@lists.infradead.org,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] maple_tree: document that "last" in mtree_insert_range() is inclusive
Date: Sat, 9 May 2026 08:38:21 -0700 [thread overview]
Message-ID: <20260509153821.90161-1-sj@kernel.org> (raw)
In-Reply-To: <af7w0Zly7Se5my_c@casper.infradead.org>
On Sat, 9 May 2026 09:31:13 +0100 Matthew Wilcox <willy@infradead.org> wrote:
> On Fri, May 08, 2026 at 05:59:46PM -0700, SeongJae Park wrote:
> > > > * @first: The start of the range
> > > > * @last: The end of the range (inclusive)
> > >
> > >
> > > I like this.
> >
> > +1. I'm also wondering if it make sense to add '(inclusive)' for 'first', too.
>
> I can't think of a situation in computing where we use an
> exclusive-first. Pure mathematics, yes, we might want to express a
> range as (1,2) to exclude both 1 and 2 but include 1+epsilon for all
> epsilon > 0. Maybe I don't work with floating point numbers enough,
> but I've never seen a kernel programmer make an off-by-one with the
> start of a range. End-of-the-range is all too common.
Makes sense, thank you for sharing your thought for my silly question!
Thanks,
SJ
prev parent reply other threads:[~2026-05-09 15:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-06 14:52 [PATCH] maple_tree: document that "last" in mtree_insert_range() is inclusive Steven Rostedt
2026-05-07 6:44 ` Alice Ryhl
2026-05-08 20:51 ` Liam R. Howlett
2026-05-09 0:59 ` SeongJae Park
2026-05-09 8:31 ` Matthew Wilcox
2026-05-09 15:38 ` SeongJae Park [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=20260509153821.90161-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@goodmis.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.