projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d56c593
)
maple_tree: use mt_node_max() instead of direct operations mt_max[]
author
Vernon Yang
<vernon2gm@gmail.com>
Wed, 21 Dec 2022 06:00:54 +0000
(14:00 +0800)
committer
Andrew Morton
<akpm@linux-foundation.org>
Thu, 19 Jan 2023 01:12:46 +0000
(17:12 -0800)
Use mt_node_max() to get the maximum number of slots for a node,
rather than direct operations mt_max[], makes it better portability.
Link:
https://lkml.kernel.org/r/20221221060058.609003-4-vernon2gm@gmail.com
Signed-off-by: Vernon Yang <vernon2gm@gmail.com>
Reviewed-by: Liam R. Howlett <Liam.Howlett@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
lib/maple_tree.c
patch
|
blob
|
history
diff --git
a/lib/maple_tree.c
b/lib/maple_tree.c
index fc70ae9850b1331aa496161d53e4cf9abd68e2ea..506b8fdb5f1b631acb498bebc895b86165a07e03 100644
(file)
--- a/
lib/maple_tree.c
+++ b/
lib/maple_tree.c
@@
-6725,7
+6725,7
@@
static void mt_dump_range64(const struct maple_tree *mt, void *entry,
if (i < (MAPLE_RANGE64_SLOTS - 1))
last = node->pivot[i];
- else if (!node->slot[i] && max != mt_
max[mte_node_type(entry)]
)
+ else if (!node->slot[i] && max != mt_
node_max(entry)
)
break;
if (last == 0 && i > 0)
break;
@@
-6832,7
+6832,7
@@
void mt_dump(const struct maple_tree *mt)
if (!xa_is_node(entry))
mt_dump_entry(entry, 0, 0, 0);
else if (entry)
- mt_dump_node(mt, entry, 0, mt_
max[mte_node_type(entry)]
, 0);
+ mt_dump_node(mt, entry, 0, mt_
node_max(entry)
, 0);
}
EXPORT_SYMBOL_GPL(mt_dump);