]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
maple_tree: Remove unnecessary return statements
authorLiam R. Howlett <Liam.Howlett@oracle.com>
Tue, 14 Oct 2025 19:41:35 +0000 (15:41 -0400)
committerLiam R. Howlett <Liam.Howlett@oracle.com>
Wed, 15 Oct 2025 19:12:02 +0000 (15:12 -0400)
Functions do not need to state return at the end, unless skipping
unwind.  These can safely be dropped.

Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
lib/maple_tree.c

index 40fb55930a5214eef67de8e2c6a2233add7e14d2..3f65cf4743465879ab70f29699eb4f9f4e904db0 100644 (file)
@@ -3269,7 +3269,6 @@ new_root:
        mas->offset = mast->l->offset;
        mas_wmb_replace(mas, old_enode, new_height);
        mtree_range_walk(mas);
-       return;
 }
 
 /*
@@ -3686,7 +3685,6 @@ static void mas_split(struct ma_state *mas, struct maple_big_node *b_node)
        mas->node = l_mas.node;
        mas_wmb_replace(mas, old, height);
        mtree_range_walk(mas);
-       return;
 }
 
 /*
@@ -3747,7 +3745,6 @@ static inline void mas_root_expand(struct ma_state *mas, void *entry)
        ma_set_meta(node, maple_leaf_64, 0, slot);
        /* swap the new root into the tree */
        rcu_assign_pointer(mas->tree->ma_root, mte_mk_root(mas->node));
-       return;
 }
 
 /*
@@ -4019,8 +4016,6 @@ static inline void mas_new_root(struct ma_state *mas, void *entry)
 done:
        if (xa_is_node(root))
                mte_destroy_walk(root, mas->tree);
-
-       return;
 }
 /*
  * mas_wr_spanning_store() - Create a subtree with the store operation completed
@@ -4183,7 +4178,6 @@ done:
        trace_ma_write(__func__, mas, 0, wr_mas->entry);
        mas_update_gap(mas);
        mas->end = new_end;
-       return;
 }
 
 /*
@@ -4231,8 +4225,6 @@ static inline void mas_wr_slot_store(struct ma_wr_state *wr_mas)
         */
        if (!wr_mas->entry || gap)
                mas_update_gap(mas);
-
-       return;
 }
 
 static inline void mas_wr_extend_null(struct ma_wr_state *wr_mas)
@@ -4346,7 +4338,6 @@ static inline void mas_wr_append(struct ma_wr_state *wr_mas,
 
        mas->end = new_end;
        trace_ma_write(__func__, mas, new_end, wr_mas->entry);
-       return;
 }
 
 /*
@@ -4405,8 +4396,6 @@ static inline void mas_wr_store_entry(struct ma_wr_state *wr_mas)
        case wr_invalid:
                MT_BUG_ON(mas->tree, 1);
        }
-
-       return;
 }
 
 static inline void mas_wr_prealloc_setup(struct ma_wr_state *wr_mas)