]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
maple_tree: Update mas_start to return the entry on a single pointer
authorLiam R. Howlett <Liam.Howlett@Oracle.com>
Tue, 15 Oct 2019 18:40:48 +0000 (14:40 -0400)
committerLiam R. Howlett <Liam.Howlett@Oracle.com>
Tue, 15 Oct 2019 18:40:48 +0000 (14:40 -0400)
tree.

mas_start returns:
  If mas->node is an error or MAS_START, return NULL
  If it's an empty tree:     NULL & mas->node == MAS_NONE
  If it's a single entry:    The entry & mas->node == MAS_ROOT
  If it's a tree:            NULL & mas->node == safe root node.

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
lib/maple_tree.c

index f955ff9d01aa52e8ab0a84aa11670a0d4e3b53ea..3f2dc1b1d4f261be7523c768931b970e04c463df 100644 (file)
@@ -958,6 +958,7 @@ static inline struct maple_node *mas_node_cnt(struct ma_state *ms, int count)
  * Sets up maple state for operations by setting mas->min = 0 & mas->node to
  * certain values.
  * returns:
+ * - If mas->node is an error or MAS_START, return NULL.
  * - If it's an empty tree:     NULL & mas->node == MAS_NONE
  * - If it's a single entry:    The entry & mas->node == MAS_ROOT
  * - If it's a tree:            NULL & mas->node == safe root node.