]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
maple_tree: Change _mas_walk() and __mas_walk() names
authorLiam R. Howlett <Liam.Howlett@oracle.com>
Wed, 10 Nov 2021 01:49:32 +0000 (20:49 -0500)
committerLiam R. Howlett <Liam.Howlett@oracle.com>
Wed, 10 Nov 2021 03:44:23 +0000 (22:44 -0500)
Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
lib/maple_tree.c

index 61013cd8a5bfebc8fa6d5102e6106848a2cc0a52..c6dbc956076110499a8648fb1416eca1a229b74d 100644 (file)
@@ -3708,8 +3708,9 @@ done:
        }
 }
 /*
- * __mas_walk(): Locates a value and sets the mas->node and slot accordingly.
- * range_min and range_max are set to the range which the entry is valid.
+ * mas_descend_walk(): Locates a value and sets the mas->node and slot
+ * accordingly.  range_min and range_max are set to the range which the entry is
+ * valid.
  * @mas: The maple state
  * @*range_min: A pointer to store the minimum of the range
  * @*range_max: A pointer to store the maximum of the range
@@ -3718,8 +3719,8 @@ done:
  *
  * Return: true if pointing to a valid node and offset.  False otherwise.
  */
-static inline bool __mas_walk(struct ma_state *mas, unsigned long *range_min,
-               unsigned long *range_max)
+static inline bool mas_descend_walk(struct ma_state *mas,
+                       unsigned long *range_min, unsigned long *range_max)
 {
        struct maple_enode *next;
        struct maple_node *node;
@@ -3839,13 +3840,13 @@ static inline int mas_spanning_store(struct ma_state *mas, void *entry)
 
        r_mas.index = r_mas.last;
        r_mas.offset = 0;
-       __mas_walk(&r_mas, &range_min, &range_max);
+       mas_descend_walk(&r_mas, &range_min, &range_max);
        r_mas.last = r_mas.index = mas->last;
 
        /* Set up left side. */
        l_mas = *mas;
        l_mas.offset = 0;
-       __mas_walk(&l_mas, &range_min, &range_max);
+       mas_descend_walk(&l_mas, &range_min, &range_max);
        content = mas_get_slot(&l_mas, l_mas.offset);
 
        if (!entry) {
@@ -4688,7 +4689,7 @@ found:
 }
 
 /*
- *  _mas_walk() - Walk to @mas->index and set the range values.
+ * mas_tree_walk() - Walk to @mas->index and set the range values.
  * @mas: The maple state.
  * @*range_min: The minimum range to be set.
  * @*range_max: The maximum range to be set.
@@ -4697,8 +4698,8 @@ found:
  *
  * Return: True if a value exists, false otherwise.
  */
-static inline bool _mas_walk(struct ma_state *mas, unsigned long *range_min,
-                            unsigned long *range_max)
+static inline bool mas_tree_walk(struct ma_state *mas, unsigned long *range_min,
+                                unsigned long *range_max)
 {
 
        void *entry;
@@ -4721,7 +4722,7 @@ retry:
                goto not_found;
        }
 
-       ret = __mas_walk(mas, range_min, range_max);
+       ret = mas_descend_walk(mas, range_min, range_max);
        if (unlikely(mte_dead_node(mas->node))) {
                mas->node = MAS_START;
                goto retry;
@@ -4739,7 +4740,7 @@ static inline void mas_rewalk(struct ma_state *mas, unsigned long index)
        unsigned long range_max, range_min;
 
        mas_set(mas, index);
-       _mas_walk(mas, &range_min, &range_max);
+       mas_tree_walk(mas, &range_min, &range_max);
        mas->last = range_max;
        mas->index = range_min;
 }
@@ -5134,7 +5135,7 @@ static inline void *mas_range_load(struct ma_state *mas,
        if (mas_is_none(mas) || mas_is_paused(mas))
                mas->node = MAS_START;
 retry:
-       if (_mas_walk(mas, range_min, range_max))
+       if (mas_tree_walk(mas, range_min, range_max))
                if (unlikely(mas->node == MAS_ROOT))
                        return mas_root(mas);
 
@@ -5844,7 +5845,7 @@ void mas_destroy(struct ma_state *mas)
                if (mas_is_start(mas))
                        mas_start(mas);
 
-               __mas_walk(mas, &range_min, &range_max);
+               mas_descend_walk(mas, &range_min, &range_max);
                end = mas_data_end(mas) + 1;
                if (end < mt_min_slot_count(mas->node) - 1)
                        mas_destroy_rebalance(mas, end);
@@ -6392,7 +6393,7 @@ void *mt_find(struct maple_tree *mt, unsigned long *index, unsigned long max)
                return NULL;
 
        rcu_read_lock();
-       leaf = _mas_walk(&mas, &range_start, &range_end);
+       leaf = mas_tree_walk(&mas, &range_start, &range_end);
        if (leaf == true && mas.offset != MAPLE_NODE_SLOTS)
                entry = mas_get_slot(&mas, mas.offset);