Lines Matching defs:node
39 static int is_node_overlap(struct memtype *node, u64 start, u64 end)
41 if (node->start >= end || node->end <= start)
47 static u64 get_subtree_max_end(struct rb_node *node)
50 if (node) {
51 struct memtype *data = container_of(node, struct memtype, rb);
57 /* Update 'subtree_max_end' for a node, based on node and its children */
58 static void memtype_rb_augment_cb(struct rb_node *node, void *__unused)
63 if (!node)
66 data = container_of(node, struct memtype, rb);
69 child_max_end = get_subtree_max_end(node->rb_right);
73 child_max_end = get_subtree_max_end(node->rb_left);
84 struct rb_node *node = root->rb_node;
87 while (node) {
88 struct memtype *data = container_of(node, struct memtype, rb);
90 if (get_subtree_max_end(node->rb_left) > start) {
92 node = node->rb_left;
98 node = node->rb_right;
113 struct rb_node *node;
118 node = rb_next(&match->rb);
119 if (node)
120 match = container_of(node, struct memtype, rb);
132 struct rb_node *node;
146 node = rb_next(&match->rb);
147 while (node) {
148 match = container_of(node, struct memtype, rb);
158 node = rb_next(&match->rb);
175 struct rb_node **node = &(root->rb_node);
178 while (*node) {
179 struct memtype *data = container_of(*node, struct memtype, rb);
181 parent = *node;
183 node = &((*node)->rb_left);
185 node = &((*node)->rb_right);
188 rb_link_node(&newdata->rb, parent, node);
236 struct rb_node *node;
239 node = rb_first(&memtype_rbroot);
240 while (node && pos != i) {
241 node = rb_next(node);
245 if (node) { /* pos == i */
246 struct memtype *this = container_of(node, struct memtype, rb);