From 0083cad413908b94b78e48d525c3474c504e1bca Mon Sep 17 00:00:00 2001 From: Matthew Wilcox Date: Wed, 24 Apr 2019 13:03:27 -0400 Subject: [PATCH] maple_dump: Pad better I think this works out better visually than the previous effort. Signed-off-by: Matthew Wilcox --- lib/maple_tree.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/maple_tree.c b/lib/maple_tree.c index e20fd6cd471e..39171f03058c 100644 --- a/lib/maple_tree.c +++ b/lib/maple_tree.c @@ -2189,10 +2189,11 @@ void mt_dump_node(void *entry, unsigned long min, unsigned long max, unsigned int depth); void mt_dump_range(unsigned long min, unsigned long max, unsigned int depth) { + static const char spaces[] = " "; if (min == max) - pr_info("%*lu: ", depth * 2 + 16, min); + pr_info("%.*s%lu: ", depth * 2, spaces, min); else - pr_info("%*lu-%lu: ", depth * 2 + 16, min, max); + pr_info("%.*s%lu-%lu: ", depth * 2, spaces, min, max); } void mt_dump_entry(void *entry, unsigned long min, unsigned long max, @@ -2317,7 +2318,6 @@ void mt_dump_node(void *entry, unsigned long min, unsigned long max, default: pr_cont(" UNKNOWN TYPE\n"); } - pr_info("dumped node %p\n", entry); } void mt_dump(const struct maple_tree *mt) -- 2.50.1