From: Liam R. Howlett Date: Wed, 10 Nov 2021 01:49:32 +0000 (-0500) Subject: maple_tree: Change _mas_walk() and __mas_walk() names X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=ee0b5f76325dc584c910864df71d1c9991ecd347;p=users%2Fjedix%2Flinux-maple.git maple_tree: Change _mas_walk() and __mas_walk() names Signed-off-by: Liam R. Howlett --- diff --git a/lib/maple_tree.c b/lib/maple_tree.c index 61013cd8a5bf..c6dbc9560761 100644 --- a/lib/maple_tree.c +++ b/lib/maple_tree.c @@ -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);