]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
maple_tree: Change some larger functions to not be inline
authorLiam R. Howlett <Liam.Howlett@Oracle.com>
Mon, 7 Dec 2020 20:57:05 +0000 (15:57 -0500)
committerLiam R. Howlett <Liam.Howlett@Oracle.com>
Tue, 5 Jan 2021 17:33:34 +0000 (12:33 -0500)
Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
lib/maple_tree.c

index 8b1c51029b0025530ad7f4505b2b4c89ebcd50c6..b12068b7eb222ce9e83f0351bed329bac7efd29d 100644 (file)
@@ -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;