From: Liam R. Howlett Date: Wed, 20 May 2020 17:22:16 +0000 (-0400) Subject: maple_tree: Remove mt_is_advanced in favor of xa_is_advanced. X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=ad7bfcadf46021b413b8c43eac9114eac00107c9;p=users%2Fjedix%2Flinux-maple.git maple_tree: Remove mt_is_advanced in favor of xa_is_advanced. The two functions are now the same so just use the xa_ version. Signed-off-by: Liam R. Howlett --- diff --git a/lib/maple_tree.c b/lib/maple_tree.c index bd9ff56933c36..e2707cc6610b0 100644 --- a/lib/maple_tree.c +++ b/lib/maple_tree.c @@ -153,11 +153,6 @@ static inline bool mt_is_reserved(const void *entry) return ((unsigned long)entry < 4096) && xa_is_internal(entry); } -static inline bool mt_is_advanced(const void *entry) -{ - return xa_is_internal(entry) && (entry < XA_ZERO_ENTRY); -} - static inline bool mt_is_empty(const void *entry) { return (!entry) || xa_is_deleted(entry) || xa_is_skip(entry); @@ -949,7 +944,7 @@ static inline void mas_shift_pivot(struct ma_state *curr, if (!leaf) { if (mt_is_alloc(left.tree)) mte_set_gap(left.node, slot, 0); - if (!mt_is_advanced(entry)) + if (!xa_is_advanced(entry)) mte_free(entry); // Destroy not needed. } } while (--slot > l_p_slot); @@ -964,7 +959,7 @@ static inline void mas_shift_pivot(struct ma_state *curr, if (!leaf ) { if (mt_is_alloc(right.tree)) mte_set_gap(right.node, r_p_slot, 0); - if (!mt_is_advanced(entry)) + if (!xa_is_advanced(entry)) mte_free(entry); } } @@ -985,7 +980,7 @@ static inline void mas_shift_pivot(struct ma_state *curr, if (!leaf ) { if (mt_is_alloc(left.tree)) mte_set_gap(left.node, l_p_slot, 0); - if (!mt_is_advanced(entry)) + if (!xa_is_advanced(entry)) mte_free(entry); } @@ -5312,7 +5307,7 @@ int mtree_store_range(struct maple_tree *mt, unsigned long index, { MA_STATE(mas, mt, index, last); - if (WARN_ON_ONCE(mt_is_advanced(entry))) + if (WARN_ON_ONCE(xa_is_advanced(entry))) return -EINVAL; if (index > last) @@ -5344,7 +5339,7 @@ int mtree_insert_range(struct maple_tree *mt, unsigned long first, { MA_STATE(ms, mt, first, last); - if (WARN_ON_ONCE(mt_is_advanced(entry))) + if (WARN_ON_ONCE(xa_is_advanced(entry))) return -EINVAL; if (first > last)