]> www.infradead.org Git - users/jedix/linux-maple.git/commit
maple_tree: Clean up mas_parent_enum() and rename to mas_parent_type()
authorLiam R. Howlett <Liam.Howlett@Oracle.com>
Tue, 15 Nov 2022 14:29:33 +0000 (09:29 -0500)
committerLiam R. Howlett <Liam.Howlett@oracle.com>
Thu, 27 Apr 2023 01:31:09 +0000 (21:31 -0400)
commit19854651eabd99dca43cbed84ca3090f4ed6d93f
tree74887aa9d13d0e1a55c1861cb81ee514071c9ef2
parent3480bfb95c3db6fb5c486b85c9984b740a51b08a
maple_tree: Clean up mas_parent_enum() and rename to mas_parent_type()

mas_parent_enum() is a simple wrapper for mte_parent_enum() which is
only called from that wrapper.  Remove the wrapper and inline
mte_parent_enum() into mas_parent_enum().

At the same time, clean up the bit masking of the root pointer since it
cannot be set by the time the bit masking occurs.  Change the check on
the root bit to a WARN_ON(), and fix the verification code to not
trigger the WARN_ON() before checking if the node is root.

Align the name to mas_parent_type() since mas_node_type() exists
already.

Reported-by: Wei Yang <richard.weiyang@gmail.com>
Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
lib/maple_tree.c