[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240826012422.29935-2-richard.weiyang@gmail.com>
Date: Mon, 26 Aug 2024 01:24:22 +0000
From: Wei Yang <richard.weiyang@...il.com>
To: Liam.Howlett@...cle.com,
akpm@...ux-foundation.org
Cc: linux-kernel@...r.kernel.org,
maple-tree@...ts.infradead.org,
Wei Yang <richard.weiyang@...il.com>
Subject: [PATCH 2/2] maple_tree: dump error message based on format
Just do what mt_dump_range64() does.
Dump the error message based on format.
Signed-off-by: Wei Yang <richard.weiyang@...il.com>
---
lib/maple_tree.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/lib/maple_tree.c b/lib/maple_tree.c
index 236b58fd9be4..0c06a4c6d3bd 100644
--- a/lib/maple_tree.c
+++ b/lib/maple_tree.c
@@ -7217,9 +7217,15 @@ static void mt_dump_arange64(const struct maple_tree *mt, void *entry,
if (last == max)
break;
if (last > max) {
- pr_err("node %p last (%lu) > max (%lu) at pivot %d!\n",
+ switch(format) {
+ case mt_dump_hex:
+ pr_err("node %p last (%lx) > max (%lx) at pivot %d!\n",
node, last, max, i);
- break;
+ break;
+ case mt_dump_dec:
+ pr_err("node %p last (%lu) > max (%lu) at pivot %d!\n",
+ node, last, max, i);
+ }
}
first = last + 1;
}
--
2.34.1
Powered by blists - more mailing lists