linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] maple_tree: change return type of mas_split_final_node as void.
@ 2023-11-09 16:08 Levi Yun
  2023-11-10 15:03 ` Liam R. Howlett
  0 siblings, 1 reply; 2+ messages in thread
From: Levi Yun @ 2023-11-09 16:08 UTC (permalink / raw)
  To: Liam.Howlett; +Cc: maple-tree, linux-mm, linux-kernel, Levi Yun

mas_split_final_node always returns true and there is no usage
for checking return value.

change return type as void.

Signed-off-by: Levi Yun <ppbuk5246@gmail.com>
---
 lib/maple_tree.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/lib/maple_tree.c b/lib/maple_tree.c
index bb24d84a4922..9389a631483a 100644
--- a/lib/maple_tree.c
+++ b/lib/maple_tree.c
@@ -3167,7 +3167,7 @@ static inline void mas_destroy_rebalance(struct ma_state *mas, unsigned char end
  * @mas: The maple state
  * @height: The height of the tree in case it's a new root.
  */
-static inline bool mas_split_final_node(struct maple_subtree_state *mast,
+static inline void mas_split_final_node(struct maple_subtree_state *mast,
 					struct ma_state *mas, int height)
 {
 	struct maple_enode *ancestor;
@@ -3191,7 +3191,6 @@ static inline bool mas_split_final_node(struct maple_subtree_state *mast,
 	mast->l->node = ancestor;
 	mab_mas_cp(mast->bn, 0, mt_slots[mast->bn->type] - 1, mast->l, true);
 	mas->offset = mast->bn->b_end - 1;
-	return true;
 }

 /*
--
2.39.2


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] maple_tree: change return type of mas_split_final_node as void.
  2023-11-09 16:08 [PATCH] maple_tree: change return type of mas_split_final_node as void Levi Yun
@ 2023-11-10 15:03 ` Liam R. Howlett
  0 siblings, 0 replies; 2+ messages in thread
From: Liam R. Howlett @ 2023-11-10 15:03 UTC (permalink / raw)
  To: Levi Yun; +Cc: maple-tree, linux-mm, linux-kernel

* Levi Yun <ppbuk5246@gmail.com> [231109 11:18]:
> mas_split_final_node always returns true and there is no usage
> for checking return value.
> 
> change return type as void.

Thanks for the patch.

> 
> Signed-off-by: Levi Yun <ppbuk5246@gmail.com>

Reviewed-by: Liam R. Howlett <Liam.Howlett@oracle.com>

> ---
>  lib/maple_tree.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/lib/maple_tree.c b/lib/maple_tree.c
> index bb24d84a4922..9389a631483a 100644
> --- a/lib/maple_tree.c
> +++ b/lib/maple_tree.c
> @@ -3167,7 +3167,7 @@ static inline void mas_destroy_rebalance(struct ma_state *mas, unsigned char end
>   * @mas: The maple state
>   * @height: The height of the tree in case it's a new root.
>   */
> -static inline bool mas_split_final_node(struct maple_subtree_state *mast,
> +static inline void mas_split_final_node(struct maple_subtree_state *mast,
>  					struct ma_state *mas, int height)
>  {
>  	struct maple_enode *ancestor;
> @@ -3191,7 +3191,6 @@ static inline bool mas_split_final_node(struct maple_subtree_state *mast,
>  	mast->l->node = ancestor;
>  	mab_mas_cp(mast->bn, 0, mt_slots[mast->bn->type] - 1, mast->l, true);
>  	mas->offset = mast->bn->b_end - 1;
> -	return true;
>  }
> 
>  /*
> --
> 2.39.2


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-11-10 15:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-09 16:08 [PATCH] maple_tree: change return type of mas_split_final_node as void Levi Yun
2023-11-10 15:03 ` Liam R. Howlett

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox