The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH 1/2] maple_tree: arange64 node is not a leaf node
@ 2024-08-26  1:24 Wei Yang
  2024-08-26  1:24 ` [PATCH 2/2] maple_tree: dump error message based on format Wei Yang
  2024-08-28  1:34 ` [PATCH 1/2] maple_tree: arange64 node is not a leaf node Andrew Morton
  0 siblings, 2 replies; 6+ messages in thread
From: Wei Yang @ 2024-08-26  1:24 UTC (permalink / raw)
  To: Liam.Howlett, akpm; +Cc: linux-kernel, maple-tree, Wei Yang

mt_dump_arange64() only applies to an entry whose type is
maple_arange_64, in which mte_is_leaf() must return false.

Since mte_is_leaf() here is always false, we can remove this condition
check.

Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
---
 lib/maple_tree.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/lib/maple_tree.c b/lib/maple_tree.c
index 5dd9d9db4fdc..236b58fd9be4 100644
--- a/lib/maple_tree.c
+++ b/lib/maple_tree.c
@@ -7177,7 +7177,6 @@ static void mt_dump_arange64(const struct maple_tree *mt, void *entry,
 	enum mt_dump_format format)
 {
 	struct maple_arange_64 *node = &mte_to_node(entry)->ma64;
-	bool leaf = mte_is_leaf(entry);
 	unsigned long first = min;
 	int i;
 
@@ -7211,10 +7210,7 @@ static void mt_dump_arange64(const struct maple_tree *mt, void *entry,
 			break;
 		if (last == 0 && i > 0)
 			break;
-		if (leaf)
-			mt_dump_entry(mt_slot(mt, node->slot, i),
-					first, last, depth + 1, format);
-		else if (node->slot[i])
+		if (node->slot[i])
 			mt_dump_node(mt, mt_slot(mt, node->slot, i),
 					first, last, depth + 1, format);
 
-- 
2.34.1


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

end of thread, other threads:[~2024-08-28 23:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-26  1:24 [PATCH 1/2] maple_tree: arange64 node is not a leaf node Wei Yang
2024-08-26  1:24 ` [PATCH 2/2] maple_tree: dump error message based on format Wei Yang
2024-08-28  1:34 ` [PATCH 1/2] maple_tree: arange64 node is not a leaf node Andrew Morton
2024-08-28 12:05   ` Wei Yang
2024-08-28 18:57   ` Liam R. Howlett
2024-08-28 23:24     ` Wei Yang

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