Commit 9076b33d authored by Matthew Wilcox's avatar Matthew Wilcox

radix tree test suite: Remove __item_insert

Inline it into its one caller
Signed-off-by: default avatarMatthew Wilcox <willy@infradead.org>
parent bcfa4b72
......@@ -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;
......
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment