From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 8D44219067C for ; Sat, 9 May 2026 15:38:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778341109; cv=none; b=jjCJsmeswb0w/UzNoMT0N/qPuRiMYdedQTwCw9pTAxumsObt1HlJaAJZ/XWD4owMdX/TFEWZ9025Oocmy3IkBoP8Eydz9+v02RRV3/1n/ZCHIJnXQ2uY9xSXwTqRYAi9URWr1PYHjgNEGPvLPJD4muQRwuXKq2vaKrViA1QQ0jo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778341109; c=relaxed/simple; bh=Vufti4SPwTu2U4ZbGiKAO5NDlhFAodQgLsDR3b5I+S4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=oUKYI+JkG5Ulg4clbbirlMU3pKQbe5tbBoRFjNDoXJhQ7B6Uqe8NcfGeDYbUUoRNUhRQ336n47p9nxq2IiU2o8sJdYGAwJwK/0cljyJCRh7Zp5OOo7BP8TYYl2O9MAzRB0HB/zPtj2McxJ3fHrL74dGCGhP/AuO+eU9zeuiOMbc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=BV0JRQJ+; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="BV0JRQJ+" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CAA10C2BCB2; Sat, 9 May 2026 15:38:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1778341109; bh=Vufti4SPwTu2U4ZbGiKAO5NDlhFAodQgLsDR3b5I+S4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BV0JRQJ+BDS2BvkoNrSeLTwkRED/1WEndvrgXXQ0Xh7BCG/ZyEp61dxbIwgHOtshm oEiAcXoPKD/cX0HOfGkDEujHZz23M6oKwf8/tTSGIW+HGiI+wDGKwwfbB1XcGVQoJc 3NHqdQLlbQR9GkhqiaxqzXv06yQ6TrAi6yxhX7fh71Dk+8XVO2nvHrlqvNYp/D7sPN El5W5fVTC0KQRJl7k42F5D3LnCDgJLMdsodjIdgcJOOroHxaYuXKw/L+JuQr8ocNgY aXlAO2UVLMd6BnO6Vxu223chnV5/5s03Ga8nHQBHcFcUQD1EsG4BMMC2/aIvl7rk1c kQ7FCJ2JOZBKw== From: SeongJae Park To: Matthew Wilcox Cc: SeongJae Park , "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 Date: Sat, 9 May 2026 08:38:21 -0700 Message-ID: <20260509153821.90161-1-sj@kernel.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit On Sat, 9 May 2026 09:31:13 +0100 Matthew Wilcox 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