From: Wei Yang <richard.weiyang@gmail.com>
To: Liam.Howlett@oracle.com, akpm@linux-foundation.org
Cc: linux-kernel@vger.kernel.org, maple-tree@lists.infradead.org,
Wei Yang <richard.weiyang@gmail.com>
Subject: [PATCH 2/2] maple_tree: dump error message based on format
Date: Mon, 26 Aug 2024 01:24:22 +0000 [thread overview]
Message-ID: <20240826012422.29935-2-richard.weiyang@gmail.com> (raw)
In-Reply-To: <20240826012422.29935-1-richard.weiyang@gmail.com>
Just do what mt_dump_range64() does.
Dump the error message based on format.
Signed-off-by: Wei Yang <richard.weiyang@gmail.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
next prev parent reply other threads:[~2024-08-26 1:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-26 1:24 [PATCH 1/2] maple_tree: arange64 node is not a leaf node Wei Yang
2024-08-26 1:24 ` Wei Yang [this message]
2024-08-28 1:34 ` Andrew Morton
2024-08-28 12:05 ` Wei Yang
2024-08-28 18:57 ` Liam R. Howlett
2024-08-28 23:24 ` Wei Yang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240826012422.29935-2-richard.weiyang@gmail.com \
--to=richard.weiyang@gmail.com \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maple-tree@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®