]> www.infradead.org Git - users/hch/misc.git/commitdiff
maple_tree: fix comment typo of ma_root
authorWei Yang <richard.weiyang@gmail.com>
Mon, 12 Aug 2024 15:09:24 +0000 (15:09 +0000)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 2 Sep 2024 03:26:11 +0000 (20:26 -0700)
In comment of mas_start(), we lists the return value for different cases.
In case of a single entry, we set mas->status to ma_root, while the
comment uses mas_root, which is not a maple_status.

Fix the typo according to the code.

Link: https://lkml.kernel.org/r/20240812150925.31551-1-richard.weiyang@gmail.com
Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
Reviewed-by: Liam R. Howlett <Liam.Howlett@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
lib/maple_tree.c

index 14d7864b8d531887591cf39bbf3ba3eacf3c3871..b3a3d5a005770c98a6fe501adbeaec928f78f17b 100644 (file)
@@ -1346,7 +1346,7 @@ static void mas_node_count(struct ma_state *mas, int count)
  * Return:
  * - If mas->node is an error or not mas_start, return NULL.
  * - If it's an empty tree:     NULL & mas->status == ma_none
- * - If it's a single entry:    The entry & mas->status == mas_root
+ * - If it's a single entry:    The entry & mas->status == ma_root
  * - If it's a tree:            NULL & mas->status == safe root node.
  */
 static inline struct maple_enode *mas_start(struct ma_state *mas)