From: Liam R. Howlett Date: Tue, 8 Sep 2020 15:32:43 +0000 (-0400) Subject: maple_tree: Add new lines where necessary X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=a3e28f43d9b7221816226eba0670e527bf528d22;p=users%2Fjedix%2Flinux-maple.git maple_tree: Add new lines where necessary Signed-off-by: Liam R. Howlett --- diff --git a/lib/maple_tree.c b/lib/maple_tree.c index 441117fd6d08..cea6f2d93806 100644 --- a/lib/maple_tree.c +++ b/lib/maple_tree.c @@ -343,7 +343,6 @@ static inline struct maple_node *mte_parent(const struct maple_enode *node) unsigned long bitmask = 0x7F; return (void *)((unsigned long)(mte_to_node(node)->parent) & ~bitmask); - } static inline bool mte_dead_node(const struct maple_enode *enode) @@ -574,6 +573,7 @@ static inline void ma_set_slot(struct maple_node *mn, break; } } + /* * mte_set_slot() - Set an encoded nodes rcu slot. */ @@ -645,6 +645,7 @@ static inline void mas_dup_state(struct ma_state *dst, struct ma_state *src) dst->min = src->min; mas_set_offset(dst, mas_offset(src)); } + /* * mas_descend() - Descend into the slot stored in the ma_state. * @@ -1023,6 +1024,7 @@ done: return max_gap; } + /* * mas_max_gap() - find the largest gap in a non-leaf node and set the slot. */ @@ -1074,6 +1076,7 @@ ascend: slot = mte_parent_slot(gaps.node); goto ascend; } + /* * mas_update_gap() - Update a nodes gaps and propagate up if necessary. * @@ -1150,6 +1153,7 @@ no_entry: mas->node = MAS_NONE; return mas->max; } + /* * mas_first_entry() - * Returns the pivot which points to the entry with the * lowest index. @@ -1318,6 +1322,7 @@ static inline bool mab_middle_node(struct maple_big_node *b_node, int split, return false; } + /* * mab_no_null_split() - ensure the split doesn't fall on a NULL * @@ -1415,6 +1420,7 @@ static inline void mas_mab_cp(struct ma_state *mas, unsigned char mas_start, } b_node->b_end = j; } + /* * mab_mas_cp() - Copy data from maple_big_node to a maple encoded node. * @@ -1625,6 +1631,7 @@ static inline struct maple_enode *mte_node_or_none(struct maple_enode *enode) return ma_enode_ptr(MAS_NONE); } + /* * mast_topiary() - Add the portions of the tree to the removal list; either to * be freed or discarded (destroy walk). @@ -1774,6 +1781,7 @@ static inline bool mast_cousin_rebalance_right(struct maple_subtree_state *mast) mast_rebalance_prev(mast, old_l); return true; } + /* * mast_ascend_free() - Add current original maple state nodes to the free list * and ascend. @@ -1830,6 +1838,7 @@ static inline struct maple_enode { return mt_mk_node(ma_mnode_ptr(mas_next_alloc(mas)), b_node->type); } + /* * mas_mab_to_node() - Set up right and middle nodes * @@ -2064,6 +2073,7 @@ static inline void mast_combine_cp_left(struct maple_subtree_state *mast) mas_mab_cp(mast->orig_l, 0, l_slot - 1, mast->bn, 0); } + /* * Copy in the original right side of the tree into the combined data set in * the maple subtree state big node. @@ -2637,6 +2647,7 @@ exists: mas_set_err(mas, -EEXIST); return 0; } + /* * * mas_is_span_() - Set span_enode if there is no value already and the @@ -2739,6 +2750,7 @@ static inline void mas_cnt_empty(struct ma_state *mas) else mas->full_cnt--; } + /* * * mas_wr_walk(): Walk the tree for a write. Tracks extra information which @@ -2839,6 +2851,7 @@ static inline unsigned char mas_extend_null(struct ma_state *l_mas, return r_slot; } + /* * * __mas_walk(): Locates a value and sets the mas->node and slot accordingly. @@ -2880,6 +2893,7 @@ static inline bool __mas_walk(struct ma_state *mas, unsigned long *range_min, } return ret; } + /* * * mas_spanning_store() - Create a subtree with the store operation completed @@ -3143,6 +3157,7 @@ ascend: no_entry: mas->node = MAS_NONE; } + /* * Find the next non-null entry at the same level in the tree. The next value * will be mas->node[mas_offset(mas)] or MAS_NONE. @@ -3254,6 +3269,7 @@ static inline bool mas_prev_nentry(struct ma_state *mas, unsigned long limit, mas_set_offset(mas, slot); return true; } + /* * mas_next_nentry() - Next node entry. Set the @mas slot to the next valid * entry and range_start to the start value for that entry. If there is no @@ -3303,6 +3319,7 @@ found: mas_set_offset(mas, slot); return true; } + /* * * Returns the pivot which points to the entry with the highest index. @@ -3755,6 +3772,7 @@ static inline void mas_rev_awalk(struct ma_state *mas, unsigned long size) last = mas->node; } } + /* Skip this slot in the parent. */ static inline bool mas_skip_node(struct ma_state *mas) { @@ -3938,6 +3956,7 @@ int mas_get_empty_area_rev(struct ma_state *mas, unsigned long min, { return _mas_get_empty_area(mas, min, max, size, false); } + /* * mas_alloc() - Allocate a range. * @@ -3986,6 +4005,7 @@ static inline int mas_alloc(struct ma_state *mas, void *entry, no_gap: return -EBUSY; } + /* * mas_rev_alloc() - Reverse allocate a range. * @@ -4217,6 +4237,7 @@ static inline void mas_bfs_preorder(struct ma_state *mas) } } + /* mas limits not adjusted */ static inline void mas_dfs_preorder(struct ma_state *mas) { @@ -4442,6 +4463,7 @@ void **mas_destroy_descend(struct ma_state *mas) } return slots; } + /* * mte_destroy_walk() - Free the sub-tree from @mn and below. * @@ -4500,6 +4522,7 @@ void mte_destroy_walk(struct maple_enode *enode, struct maple_tree *mt) else mt_destroy_walk(&node->rcu); } + /* Interface */ void __init maple_tree_init(void) { @@ -5098,6 +5121,7 @@ static inline void mas_dfs_postorder(struct ma_state *mas, unsigned long max) mas->max = p_max; mas->min = p_min; } + /* * validate a maple tree by checking: * 1. The limits (pivots are within mas->min to mas->max)