summaryrefslogtreecommitdiff
path: root/tools/testing/radix-tree
diff options
context:
space:
mode:
authorMatthew Wilcox <willy@infradead.org>2018-09-12 12:52:45 -0400
committerMatthew Wilcox <willy@infradead.org>2018-10-21 10:46:47 -0400
commit9076b33d7dad8e316c90918845417e85347f682c (patch)
treeee62f3aaa6450bd859eed14314f2cc59a91708fa /tools/testing/radix-tree
parentbcfa4b72111c9a4d483024cb1f877803b354aa11 (diff)
downloadlinux-next-9076b33d7dad8e316c90918845417e85347f682c.tar.gz
radix tree test suite: Remove __item_insert
Inline it into its one caller Signed-off-by: Matthew Wilcox <willy@infradead.org>
Diffstat (limited to 'tools/testing/radix-tree')
-rw-r--r--tools/testing/radix-tree/test.c7
-rw-r--r--tools/testing/radix-tree/test.h1
2 files changed, 1 insertions, 7 deletions
diff --git a/tools/testing/radix-tree/test.c b/tools/testing/radix-tree/test.c
index 32973dd51ec5..5991cfd34f2b 100644
--- a/tools/testing/radix-tree/test.c
+++ b/tools/testing/radix-tree/test.c
@@ -25,11 +25,6 @@ int item_tag_get(struct radix_tree_root *root, unsigned long index, int tag)
return radix_tree_tag_get(root, index, tag);
}
-int __item_insert(struct radix_tree_root *root, struct item *item)
-{
- return __radix_tree_insert(root, item->index, item->order, item);
-}
-
struct item *item_create(unsigned long index, unsigned int order)
{
struct item *ret = malloc(sizeof(*ret));
@@ -43,7 +38,7 @@ int item_insert_order(struct radix_tree_root *root, unsigned long index,
unsigned order)
{
struct item *item = item_create(index, order);
- int err = __item_insert(root, item);
+ int err = __radix_tree_insert(root, item->index, item->order, item);
if (err)
free(item);
return err;
diff --git a/tools/testing/radix-tree/test.h b/tools/testing/radix-tree/test.h
index a2f53c889a31..28961a08828e 100644
--- a/tools/testing/radix-tree/test.h
+++ b/tools/testing/radix-tree/test.h
@@ -11,7 +11,6 @@ struct item {
};
struct item *item_create(unsigned long index, unsigned int order);
-int __item_insert(struct radix_tree_root *root, struct item *item);
int item_insert(struct radix_tree_root *root, unsigned long index);
void item_sanity(struct item *item, unsigned long index);
void item_free(struct item *item, unsigned long index);