diff options
author | 2024-08-26 01:24:22 +0000 | |
---|---|---|
committer | 2024-09-09 16:39:01 -0700 | |
commit | 21a449bedf3f01ea30ed657deeb2e8942ad45936 (patch) | |
tree | cb2f2538e0b6a5b78817e116cbe985080d833f1e /lib/maple_tree.c | |
parent | maple_tree: arange64 node is not a leaf node (diff) | |
download | wireguard-linux-21a449bedf3f01ea30ed657deeb2e8942ad45936.tar.xz wireguard-linux-21a449bedf3f01ea30ed657deeb2e8942ad45936.zip |
maple_tree: dump error message based on format
Just do what mt_dump_range64() does.
Dump the error message based on format.
Link: https://lkml.kernel.org/r/20240826012422.29935-2-richard.weiyang@gmail.com
Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
Cc: Liam R. Howlett <Liam.Howlett@oracle.com>
Cc: Matthew Wilcox <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'lib/maple_tree.c')
-rw-r--r-- | lib/maple_tree.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/maple_tree.c b/lib/maple_tree.c index f7a971c462eb..8a3c2c344f62 100644 --- a/lib/maple_tree.c +++ b/lib/maple_tree.c @@ -7243,9 +7243,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; } |