From: Liam R. Howlett Date: Mon, 7 Dec 2020 20:57:05 +0000 (-0500) Subject: maple_tree: Change some larger functions to not be inline X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=b7194d1e084c4077734a18c6ca575f80b9185fb2;p=users%2Fjedix%2Flinux-maple.git maple_tree: Change some larger functions to not be inline Signed-off-by: Liam R. Howlett --- diff --git a/lib/maple_tree.c b/lib/maple_tree.c index 8b1c51029b00..b12068b7eb22 100644 --- a/lib/maple_tree.c +++ b/lib/maple_tree.c @@ -702,7 +702,7 @@ static void mte_destroy_walk(struct maple_enode *, struct maple_tree *); * node. */ static inline void mas_free(struct ma_state *mas, struct maple_enode *used); -static inline void mas_mat_free(struct ma_state *mas, struct ma_topiary *mat, +static void mas_mat_free(struct ma_state *mas, struct ma_topiary *mat, bool recursive) { struct maple_enode *next; @@ -770,7 +770,7 @@ static inline void mte_set_gap(const struct maple_enode *mn, } } -static inline void mas_ascend(struct ma_state *mas) +static void mas_ascend(struct ma_state *mas) { struct maple_enode *p_enode = mas->node; // parent enode. struct maple_enode *a_enode = mas->node; // ancestor enode. @@ -1069,7 +1069,7 @@ decrement: * * @mas - the maple state */ -static inline unsigned long mas_leaf_max_gap(struct ma_state *mas) +static unsigned long mas_leaf_max_gap(struct ma_state *mas) { enum maple_type mt = mte_node_type(mas->node); unsigned long pstart, gap, max_gap; @@ -2325,7 +2325,7 @@ static inline void mast_setup_bnode_for_split(struct maple_subtree_state *mast) * * Returns the number of elements in b_node during the last loop. */ -static inline int mas_spanning_rebalance(struct ma_state *mas, +static int mas_spanning_rebalance(struct ma_state *mas, struct maple_subtree_state *mast, unsigned char count) { @@ -2658,7 +2658,6 @@ static inline void mast_fill_bnode(struct maple_subtree_state *mast, sizeof(unsigned long) * zero); } - static inline void mast_split_data(struct maple_subtree_state *mast, struct ma_state *mas, unsigned char split) @@ -2756,8 +2755,7 @@ static inline bool mas_push_left(struct ma_state *mas, int height, return mas_push_data(mas, height, mast, true); } -static inline int mas_split(struct ma_state *mas, - struct maple_big_node *b_node) +static int mas_split(struct ma_state *mas, struct maple_big_node *b_node) { struct maple_subtree_state mast; @@ -3947,11 +3945,11 @@ void *mas_prev(struct ma_state *mas, unsigned long min) } EXPORT_SYMBOL_GPL(mas_prev); -static inline bool _mas_rev_awalk(struct ma_state *mas, unsigned long size) +static bool _mas_rev_awalk(struct ma_state *mas, unsigned long size) { enum maple_type type = mte_node_type(mas->node); struct maple_node *node = mas_mn(mas); - unsigned long *pivots, *gaps = NULL; + unsigned long *pivots, *gaps; void **slots; unsigned long gap = 0; unsigned long max, min, index; @@ -4567,7 +4565,7 @@ void *mas_load(struct ma_state *mas) * _mas_next() - Finds the next entry, sets index to the start of the range. * */ -static inline void *_mas_next(struct ma_state *mas, unsigned long limit, +static void *_mas_next(struct ma_state *mas, unsigned long limit, unsigned long *range_start) { void *entry = NULL; @@ -5173,7 +5171,7 @@ unsigned long mt_get_alloc_size(void) #define MA_PTR "%px" #endif /* mas limits not adjusted */ -static inline void mas_dfs_preorder(struct ma_state *mas) +static void mas_dfs_preorder(struct ma_state *mas) { struct maple_enode *prev; @@ -5217,8 +5215,8 @@ done: mas->node = MAS_NONE; } - -static inline void mas_bfs_preorder(struct ma_state *mas) +#if CONFIG_MAPLE_SEARCH +static void mas_bfs_preorder(struct ma_state *mas) { if (mas_is_start(mas)) { @@ -5232,9 +5230,10 @@ static inline void mas_bfs_preorder(struct ma_state *mas) } } +#endif /* Depth first search, post-order */ -static inline void mas_dfs_postorder(struct ma_state *mas, unsigned long max) +static void mas_dfs_postorder(struct ma_state *mas, unsigned long max) { struct maple_enode *p = MAS_NONE, *mn = mas->node;