From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 77850261B9E for ; Sat, 9 May 2026 08:31:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.50.34 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778315483; cv=none; b=d/zfv5FKb6iujN8fg8EL/mT0THkhECpvRsG8JyNdYTlq8nHEl0CWzImQ9GEJfoanTQX/JqjDH1ub/aDQDw+8ZKVKlyJE1ym914qvyWk1hb1EwX1/LNDuRXnhO5Qwb9zm288tJPOwja3J2AyVmWruBw6BsS3tBjPdZQZP5oY4PVM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778315483; c=relaxed/simple; bh=Mj9wbA8JW86cERXZM1VwWyOPo0auNwDDdLJNko2C+M4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=OE7k6Mg7BdktDDj7YfuoAqptKK2R+65xLsVHV9Vjy3/ik/8geTqMyoSqi9yX9BQr8iJ4KvfcHfcASgUxgL+u6xtj8Q7j6upQoy2QMx71dpazlL+O7xkWltRbsFH+cDapFB+/RC9H25ou7rVUB59v+FT1uXfZOm6bZIZbrd0vln8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=OCpf21JB; arc=none smtp.client-ip=90.155.50.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="OCpf21JB" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=bIA1R/XeFaOasUgHQYgPPMo0X7HiP0qBj2jv2ULT8R4=; b=OCpf21JBfcT3gG1rqLHiLJG0YK pm2+y6nwqUMOpyitmNkmEb0LSS3u+YoL6IPtEQfDVcc15nDBd5uxt12VKxJSVAp4EfGvEDUpEsHHu DhbOMHYDrl9nqMDUPXrh8IoCVn/lj1nD7IjLGdbcdc1MFYEQLRgS4DcTRjij8pcvcHgAkaHypXCXW qEENndE3dkHSM9Gpxh9k+6HWwTjxOuaz99KE2Tmom2iAZc4+p3fs1rt1F+LQO6cAirObyRdVi6C4g RlUBGeXNgD+g5YZlrhDf7URE/iOSG3YOmQw3XZ9bZ90fuSzhYrAspA7cZmnp0evA9s5hpMEK6fz6b rw4VPAyw==; Received: from willy by casper.infradead.org with local (Exim 4.99.1 #2 (Red Hat Linux)) id 1wLd5d-00000005NCx-2HCc; Sat, 09 May 2026 08:31:13 +0000 Date: Sat, 9 May 2026 09:31:13 +0100 From: Matthew Wilcox To: SeongJae Park Cc: "Liam R. Howlett" , Alice Ryhl , Steven Rostedt , LKML , linux-mm@kvack.org, Andrew Ballance , maple-tree@lists.infradead.org, Andrew Morton Subject: Re: [PATCH] maple_tree: document that "last" in mtree_insert_range() is inclusive Message-ID: References: <20260509005947.84550-1-sj@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260509005947.84550-1-sj@kernel.org> 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.