]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
maple_tree: modified return type of mas_wr_store_entry()
authorJaeJoon Jung <rgbi3307@gmail.com>
Fri, 14 Jun 2024 09:24:28 +0000 (18:24 +0900)
committerAndrew Morton <akpm@linux-foundation.org>
Thu, 4 Jul 2024 02:30:19 +0000 (19:30 -0700)
Since the return value of mas_wr_store_entry() is not used,
the return type can be changed to void.

Link: https://lkml.kernel.org/r/20240614092428.29491-1-rgbi3307@gmail.com
Signed-off-by: JaeJoon Jung <rgbi3307@gmail.com>
Reviewed-by: Liam R. Howlett <Liam.Howlett@oracle.com>
Cc: Sidhartha Kumar <sidhartha.kumar@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
lib/maple_tree.c

index 2d7d27e6ae3c698daa75538941a9eacc9b04cb10..aa3a5df15b8ef926444fb6d8d18b5be4840227e0 100644 (file)
@@ -4203,31 +4203,28 @@ slow_path:
  *
  * Return: The contents that was stored at the index.
  */
-static inline void *mas_wr_store_entry(struct ma_wr_state *wr_mas)
+static inline void mas_wr_store_entry(struct ma_wr_state *wr_mas)
 {
        struct ma_state *mas = wr_mas->mas;
 
        wr_mas->content = mas_start(mas);
        if (mas_is_none(mas) || mas_is_ptr(mas)) {
                mas_store_root(mas, wr_mas->entry);
-               return wr_mas->content;
+               return;
        }
 
        if (unlikely(!mas_wr_walk(wr_mas))) {
                mas_wr_spanning_store(wr_mas);
-               return wr_mas->content;
+               return;
        }
 
        /* At this point, we are at the leaf node that needs to be altered. */
        mas_wr_end_piv(wr_mas);
        /* New root for a single pointer */
-       if (unlikely(!mas->index && mas->last == ULONG_MAX)) {
+       if (unlikely(!mas->index && mas->last == ULONG_MAX))
                mas_new_root(mas, wr_mas->entry);
-               return wr_mas->content;
-       }
-
-       mas_wr_modify(wr_mas);
-       return wr_mas->content;
+       else
+               mas_wr_modify(wr_mas);
 }
 
 /**