linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Liam R. Howlett" <Liam.Howlett@oracle.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: maple-tree@lists.infradead.org, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org,
	"Liam R. Howlett" <Liam.Howlett@oracle.com>
Subject: [PATCH] maple_tree: Fix comments about MAS_*
Date: Mon,  6 Nov 2023 10:41:24 -0500	[thread overview]
Message-ID: <20231106154124.614247-1-Liam.Howlett@oracle.com> (raw)
In-Reply-To: <20231101171629.3612299-9-Liam.Howlett@oracle.com>

Missed some documentation changes when separating the nodes from the
status of the maple state.

Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
---
 lib/maple_tree.c | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)

Andrew, please squash this into [PATCH 08/12] maple_tree: Separate
ma_state node from status.

I missed some comment changes.

diff --git a/lib/maple_tree.c b/lib/maple_tree.c
index 97ae58cd93ad..59dd0e2325e4 100644
--- a/lib/maple_tree.c
+++ b/lib/maple_tree.c
@@ -2219,12 +2219,10 @@ static inline bool mas_next_sibling(struct ma_state *mas)
 }
 
 /*
- * mte_node_or_node() - Return the encoded node or MAS_NONE.
+ * mte_node_or_none() - Set the enode and state.
  * @enode: The encoded maple node.
  *
- * Shorthand to avoid setting %NULLs in the tree or maple_subtree_state.
- *
- * Return: @enode or MAS_NONE
+ * Set the node to the enode and the status.
  */
 static inline void mas_node_or_none(struct ma_state *mas,
 		struct maple_enode *enode)
@@ -4359,11 +4357,13 @@ static __always_inline bool mas_rewalk_if_dead(struct ma_state *mas,
 
 /*
  * mas_prev_node() - Find the prev non-null entry at the same level in the
- * tree.  The prev value will be mas->node[mas->offset] or MAS_NONE.
+ * tree.  The prev value will be mas->node[mas->offset] or the status will be
+ * ma_none.
  * @mas: The maple state
  * @min: The lower limit to search
  *
- * The prev node value will be mas->node[mas->offset] or MAS_NONE.
+ * The prev node value will be mas->node[mas->offset] or the status will be
+ * ma_none.
  * Return: 1 if the node is dead, 0 otherwise.
  */
 static int mas_prev_node(struct ma_state *mas, unsigned long min)
@@ -4885,7 +4885,7 @@ static inline bool mas_anode_descend(struct ma_state *mas, unsigned long size)
  * @mas: The maple state.
  *
  * mas->index and mas->last will be set to the range if there is a value.  If
- * mas->node is MAS_NONE, reset to mas_start
+ * mas->status is ma_none, reset to ma_start
  *
  * Return: the entry at the location or %NULL.
  */
@@ -5854,7 +5854,7 @@ static bool mas_prev_setup(struct ma_state *mas, unsigned long min, void **entry
  * @min: The minimum value to check.
  *
  * Must hold rcu_read_lock or the write lock.
- * Will reset mas to MAS_START if the node is MAS_NONE.  Will stop on not
+ * Will reset mas to ma_start if the status is ma_none.  Will stop on not
  * searchable nodes.
  *
  * Return: the previous value or %NULL.
@@ -5877,7 +5877,7 @@ EXPORT_SYMBOL_GPL(mas_prev);
  *
  * Sets @mas->index and @mas->last to the range.
  * Must hold rcu_read_lock or the write lock.
- * Will reset mas to MAS_START if the node is MAS_NONE.  Will stop on not
+ * Will reset mas to ma_start if the node is ma_none.  Will stop on not
  * searchable nodes.
  *
  * Return: the previous value or %NULL.
@@ -6032,7 +6032,7 @@ static __always_inline bool mas_find_setup(struct ma_state *mas, unsigned long m
  *
  * Must hold rcu_read_lock or the write lock.
  * If an entry exists, last and index are updated accordingly.
- * May set @mas->node to MAS_NONE.
+ * May set @mas->status to ma_overflow.
  *
  * Return: The entry or %NULL.
  */
@@ -6059,7 +6059,7 @@ EXPORT_SYMBOL_GPL(mas_find);
  *
  * Must hold rcu_read_lock or the write lock.
  * If an entry exists, last and index are updated accordingly.
- * May set @mas->node to MAS_NONE.
+ * May set @mas->status to ma_overflow.
  *
  * Return: The entry or %NULL.
  */
@@ -6171,7 +6171,7 @@ static bool mas_find_rev_setup(struct ma_state *mas, unsigned long min,
  *
  * Must hold rcu_read_lock or the write lock.
  * If an entry exists, last and index are updated accordingly.
- * May set @mas->node to MAS_NONE.
+ * May set @mas->status to ma_underflow.
  *
  * Return: The entry or %NULL.
  */
@@ -6197,7 +6197,7 @@ EXPORT_SYMBOL_GPL(mas_find_rev);
  *
  * Must hold rcu_read_lock or the write lock.
  * If an entry exists, last and index are updated accordingly.
- * May set @mas->node to MAS_NONE.
+ * May set @mas->status to ma_underflow.
  *
  * Return: The entry or %NULL.
  */
-- 
2.40.1



  parent reply	other threads:[~2023-11-06 15:41 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-01 17:16 [PATCH 00/12] maple_tree: iterator state changes Liam R. Howlett
2023-11-01 17:16 ` [PATCH 01/12] maple_tree: Remove unnecessary default labels from switch statements Liam R. Howlett
2023-11-01 17:16 ` [PATCH 02/12] maple_tree: Make mas_erase() more robust Liam R. Howlett
2023-11-01 17:16 ` [PATCH 03/12] maple_tree: Move debug check to __mas_set_range() Liam R. Howlett
2023-11-01 17:16 ` [PATCH 04/12] maple_tree: Add end of node tracking to the maple state Liam R. Howlett
2023-11-01 17:16 ` [PATCH 05/12] maple_tree: Use cached node end in mas_next() Liam R. Howlett
2023-11-01 17:16 ` [PATCH 06/12] maple_tree: Use cached node end in mas_destroy() Liam R. Howlett
2023-11-01 17:16 ` [PATCH 07/12] maple_tree: Clean up inlines for some functions Liam R. Howlett
2023-11-01 17:16 ` [PATCH 08/12] maple_tree: Separate ma_state node from status Liam R. Howlett
2023-11-02  8:42   ` kernel test robot
2023-11-02 17:39     ` Liam R. Howlett
2023-11-06 15:41   ` Liam R. Howlett [this message]
2023-11-06 15:45   ` [PATCH] maple_tree: Update forking to separate maple state and node Liam R. Howlett
2025-04-03  0:33   ` [PATCH] test suite: Use %zu to print size_t Liam R. Howlett
2025-04-03  2:53     ` Liam R. Howlett
2023-11-01 17:16 ` [PATCH 09/12] maple_tree: Remove mas_searchable() Liam R. Howlett
2023-11-01 17:16 ` [PATCH 10/12] maple_tree: Use maple state end for write operations Liam R. Howlett
2023-11-01 17:16 ` [PATCH 11/12] maple_tree: Don't find node end in mtree_lookup_walk() Liam R. Howlett
2023-11-01 17:16 ` [PATCH 12/12] maple_tree: mtree_range_walk() clean up Liam R. Howlett

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231106154124.614247-1-Liam.Howlett@oracle.com \
    --to=liam.howlett@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=maple-tree@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox