[PATCH 3/5] maple_tree: Remove an unused parameter for ma_meta_end()
Liam R. Howlett
Liam.Howlett at Oracle.com
Fri Nov 10 06:56:10 PST 2023
* Peng Zhang <zhangpeng.00 at bytedance.com> [231109 07:43]:
> The parameter maple_type is not used, so remove it.
>
I'm hesitant to do this as I'm in the process of adding maple_dense
support, but it's probably not necessary until there is a non-leaf node
type. I can always add it back if I need to.
> Signed-off-by: Peng Zhang <zhangpeng.00 at bytedance.com>
Reviewed-by: Liam R. Howlett <Liam.Howlett at oracle.com>
> ---
> lib/maple_tree.c | 10 ++++------
> 1 file changed, 4 insertions(+), 6 deletions(-)
>
> diff --git a/lib/maple_tree.c b/lib/maple_tree.c
> index 61832b9e68e6..ad6b70ce82ff 100644
> --- a/lib/maple_tree.c
> +++ b/lib/maple_tree.c
> @@ -930,10 +930,8 @@ static inline unsigned char ma_meta_end(struct maple_node *mn,
> /*
> * ma_meta_gap() - Get the largest gap location of a node from the metadata
> * @mn: The maple node
> - * @mt: The maple node type
> */
> -static inline unsigned char ma_meta_gap(struct maple_node *mn,
> - enum maple_type mt)
> +static inline unsigned char ma_meta_gap(struct maple_node *mn)
> {
> return mn->ma64.meta.gap;
> }
> @@ -1587,7 +1585,7 @@ static inline unsigned long mas_max_gap(struct ma_state *mas)
>
> node = mas_mn(mas);
> MAS_BUG_ON(mas, mt != maple_arange_64);
> - offset = ma_meta_gap(node, mt);
> + offset = ma_meta_gap(node);
> gaps = ma_gaps(node, mt);
> return gaps[offset];
> }
> @@ -1618,7 +1616,7 @@ static inline void mas_parent_gap(struct ma_state *mas, unsigned char offset,
>
> ascend:
> MAS_BUG_ON(mas, pmt != maple_arange_64);
> - meta_offset = ma_meta_gap(pnode, pmt);
> + meta_offset = ma_meta_gap(pnode);
> meta_gap = pgaps[meta_offset];
>
> pgaps[offset] = new;
> @@ -7256,7 +7254,7 @@ static void mas_validate_gaps(struct ma_state *mas)
> return;
> }
>
> - offset = ma_meta_gap(node, mt);
> + offset = ma_meta_gap(node);
> if (offset > i) {
> pr_err("gap offset %p[%u] is invalid\n", node, offset);
> MT_BUG_ON(mas->tree, 1);
> --
> 2.20.1
>
More information about the maple-tree
mailing list