diff options
author | Scott Wood <scottwood@freescale.com> | 2014-04-07 23:49:35 (GMT) |
---|---|---|
committer | Scott Wood <scottwood@freescale.com> | 2014-04-07 23:49:35 (GMT) |
commit | 62b8c978ee6b8d135d9e7953221de58000dba986 (patch) | |
tree | 683b04b2e627f6710c22c151b23c8cc9a165315e /tools/perf/util/intlist.c | |
parent | 78fd82238d0e5716578c326404184a27ba67fd6e (diff) | |
download | linux-fsl-qoriq-62b8c978ee6b8d135d9e7953221de58000dba986.tar.xz |
Rewind v3.13-rc3+ (78fd82238d0e5716) to v3.12
Diffstat (limited to 'tools/perf/util/intlist.c')
-rw-r--r-- | tools/perf/util/intlist.c | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/tools/perf/util/intlist.c b/tools/perf/util/intlist.c index 89715b6..11a8d86 100644 --- a/tools/perf/util/intlist.c +++ b/tools/perf/util/intlist.c @@ -20,7 +20,6 @@ static struct rb_node *intlist__node_new(struct rblist *rblist __maybe_unused, if (node != NULL) { node->i = i; - node->priv = NULL; rc = &node->rb_node; } @@ -58,36 +57,22 @@ void intlist__remove(struct intlist *ilist, struct int_node *node) rblist__remove_node(&ilist->rblist, &node->rb_node); } -static struct int_node *__intlist__findnew(struct intlist *ilist, - int i, bool create) +struct int_node *intlist__find(struct intlist *ilist, int i) { - struct int_node *node = NULL; + struct int_node *node; struct rb_node *rb_node; if (ilist == NULL) return NULL; - if (create) - rb_node = rblist__findnew(&ilist->rblist, (void *)((long)i)); - else - rb_node = rblist__find(&ilist->rblist, (void *)((long)i)); - + node = NULL; + rb_node = rblist__find(&ilist->rblist, (void *)((long)i)); if (rb_node) node = container_of(rb_node, struct int_node, rb_node); return node; } -struct int_node *intlist__find(struct intlist *ilist, int i) -{ - return __intlist__findnew(ilist, i, false); -} - -struct int_node *intlist__findnew(struct intlist *ilist, int i) -{ - return __intlist__findnew(ilist, i, true); -} - static int intlist__parse_list(struct intlist *ilist, const char *s) { char *sep; |