summaryrefslogtreecommitdiff
path: root/tools/perf/util/rblist.c
diff options
context:
space:
mode:
authorScott Wood <scottwood@freescale.com>2014-04-07 23:49:35 (GMT)
committerScott Wood <scottwood@freescale.com>2014-04-07 23:49:35 (GMT)
commit62b8c978ee6b8d135d9e7953221de58000dba986 (patch)
tree683b04b2e627f6710c22c151b23c8cc9a165315e /tools/perf/util/rblist.c
parent78fd82238d0e5716578c326404184a27ba67fd6e (diff)
downloadlinux-fsl-qoriq-62b8c978ee6b8d135d9e7953221de58000dba986.tar.xz
Rewind v3.13-rc3+ (78fd82238d0e5716) to v3.12
Diffstat (limited to 'tools/perf/util/rblist.c')
-rw-r--r--tools/perf/util/rblist.c27
1 files changed, 3 insertions, 24 deletions
diff --git a/tools/perf/util/rblist.c b/tools/perf/util/rblist.c
index 0dfe27d..a16cdd2 100644
--- a/tools/perf/util/rblist.c
+++ b/tools/perf/util/rblist.c
@@ -48,12 +48,10 @@ void rblist__remove_node(struct rblist *rblist, struct rb_node *rb_node)
rblist->node_delete(rblist, rb_node);
}
-static struct rb_node *__rblist__findnew(struct rblist *rblist,
- const void *entry,
- bool create)
+struct rb_node *rblist__find(struct rblist *rblist, const void *entry)
{
struct rb_node **p = &rblist->entries.rb_node;
- struct rb_node *parent = NULL, *new_node = NULL;
+ struct rb_node *parent = NULL;
while (*p != NULL) {
int rc;
@@ -69,26 +67,7 @@ static struct rb_node *__rblist__findnew(struct rblist *rblist,
return parent;
}
- if (create) {
- new_node = rblist->node_new(rblist, entry);
- if (new_node) {
- rb_link_node(new_node, parent, p);
- rb_insert_color(new_node, &rblist->entries);
- ++rblist->nr_entries;
- }
- }
-
- return new_node;
-}
-
-struct rb_node *rblist__find(struct rblist *rblist, const void *entry)
-{
- return __rblist__findnew(rblist, entry, false);
-}
-
-struct rb_node *rblist__findnew(struct rblist *rblist, const void *entry)
-{
- return __rblist__findnew(rblist, entry, true);
+ return NULL;
}
void rblist__init(struct rblist *rblist)