[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH v2 for-4.21 4/6] radix-tree: drop "root" parameters from radix_tree_node_{alloc,free}()
They aren't used anymore. Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> --- v2: New. --- a/xen/common/radix-tree.c +++ b/xen/common/radix-tree.c @@ -60,16 +60,14 @@ static void cf_check _rcu_node_free(stru xfree(rcu_node); } -static struct radix_tree_node *radix_tree_node_alloc( - struct radix_tree_root *root) +static struct radix_tree_node *radix_tree_node_alloc(void) { struct rcu_node *rcu_node = xzalloc(struct rcu_node); return rcu_node ? &rcu_node->node : NULL; } -static void radix_tree_node_free( - struct radix_tree_root *root, struct radix_tree_node *node) +static void radix_tree_node_free(struct radix_tree_node *node) { struct rcu_node *rcu_node = container_of(node, struct rcu_node, node); call_rcu(&rcu_node->rcu_head, _rcu_node_free); @@ -104,7 +102,7 @@ static int radix_tree_extend(struct radi do { unsigned int newheight; - if (!(node = radix_tree_node_alloc(root))) + if (!(node = radix_tree_node_alloc())) return -ENOMEM; /* Increase the height. */ @@ -155,7 +153,7 @@ int radix_tree_insert(struct radix_tree_ while (height > 0) { if (slot == NULL) { /* Have to add a child node. */ - if (!(slot = radix_tree_node_alloc(root))) + if (!(slot = radix_tree_node_alloc())) return -ENOMEM; slot->height = height; if (node) { @@ -574,7 +572,7 @@ static inline void radix_tree_shrink(str *((unsigned long *)&to_free->slots[0]) |= RADIX_TREE_INDIRECT_PTR; - radix_tree_node_free(root, to_free); + radix_tree_node_free(to_free); } } @@ -639,7 +637,7 @@ void *radix_tree_delete(struct radix_tre * last reference to it disappears (set NULL, above). */ if (to_free) - radix_tree_node_free(root, to_free); + radix_tree_node_free(to_free); if (pathp->node->count) { if (pathp->node == indirect_to_ptr(root->rnode)) @@ -655,7 +653,7 @@ void *radix_tree_delete(struct radix_tre root->height = 0; root->rnode = NULL; if (to_free) - radix_tree_node_free(root, to_free); + radix_tree_node_free(to_free); out: return slot; @@ -682,7 +680,7 @@ radix_tree_node_destroy( } } - radix_tree_node_free(root, node); + radix_tree_node_free(node); } void radix_tree_destroy(
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |