Re: [PATCH] maple_tree: document that "last" in mtree_insert_range() is inclusive
From: Matthew Wilcox
Date: Sat May 09 2026 - 04:31:31 EST
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.