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 AFB0631F998 for ; Thu, 14 May 2026 01:42:34 +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=1778722954; cv=none; b=qjzCkCon0bl2DwVBhih9Np/z92iJgEn5bwOK/L6IAH9sTttcRgp8B/k1/hUI1PFhyIGoUiLix/yAspm3xBJ4Fo7XBg4Hm+DVEGhKXIN6DCJ9U2UEVottHbiVWvtdbrRutpZLm2VP3h0G9bnMJyf1e5WTus7L0ZA1rD3ERqpqGAc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778722954; c=relaxed/simple; bh=lHbn7j2WgQrY9RTbD5zQgABHcgSj0xpgmxD0EbFZz6c=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=SS+NdO48JNwAzP2wGQPxL+tAnhtxMXumfWYB2meay/DPMSHh8dTw1uwbmfx9T5WA9K5cn5MAXNyDzlV8te9jHMUnh/ahR+hQcrioHJHD4rxgyjhxSgzEgr0eXg16zYWolMqjNGspsM/vzSO4Xc3jLg5VFhyoCXhDF37QQDL7/6E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=tlRKrFGn; 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="tlRKrFGn" Received: by smtp.kernel.org (Postfix) with ESMTPSA id ECFBCC19425; Thu, 14 May 2026 01:42:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1778722954; bh=lHbn7j2WgQrY9RTbD5zQgABHcgSj0xpgmxD0EbFZz6c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tlRKrFGnsGngFbg3cmQiOznSWcbygz0LedeWiSPAs8+VOjeiVTNDOgCeY01QW84OY z5G2uyLOq523IXKH6GO6EwQ6hPQQJ/OWrarfDwmQx7Wvj9winRVQXeuyBRU1wVnNjY WJI3kT7VSPF3n7PquY/s8QcihBtRkG8aB+SWH5ZKOavuLmSYALrSigLTEvMl17IglI 8H26UHpNmdvW2ponCzSK8ZM7Q1AUcs0u2tmPs87JnwlDjmuH8OZdL7KhWHntJa6o5R /zk7Q1KeSrlXxb1Oa5XudLhmgQRvhFf0XivZ+eTuZhudRvvz15TpIxHW7j//fAMjv5 PBINl4BrQErwA== From: SeongJae Park To: Steven Rostedt Cc: SeongJae Park , "Liam R. Howlett" , LKML , linux-mm@kvack.org, Alice Ryhl , Andrew Ballance , maple-tree@lists.infradead.org, Andrew Morton , Matthew Wilcox Subject: Re: [PATCH v2] maple_tree: document that "last" in mtree_insert_range() is inclusive Date: Wed, 13 May 2026 18:42:04 -0700 Message-ID: <20260514014205.149093-1-sj@kernel.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260512175623.4c5ca8d2@gandalf.local.home> 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 Tue, 12 May 2026 17:56:23 -0400 Steven Rostedt wrote: > From: Steven Rostedt > > 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 Acked-by: SeongJae Park > --- > 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 [...]