[tip:perf/core] perf tools: Use list_move in ordered_events_delete function

From: tip-bot for Jiri Olsa
Date: Wed Aug 13 2014 - 01:16:17 EST


Commit-ID: fa4e5c67a2d169b9ef83f51b94e1d4a562ddfc0f
Gitweb: http://git.kernel.org/tip/fa4e5c67a2d169b9ef83f51b94e1d4a562ddfc0f
Author: Jiri Olsa <jolsa@xxxxxxxxxx>
AuthorDate: Sun, 15 Jun 2014 19:46:08 +0200
Committer: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
CommitDate: Tue, 12 Aug 2014 12:02:59 -0300

perf tools: Use list_move in ordered_events_delete function

As Namhyung pointed out we can use list_move in ordered_events_delete.

Signed-off-by: Jiri Olsa <jolsa@xxxxxxxxxx>
Suggested-by: Namhyung Kim <namhyung@xxxxxxxxxx>
Acked-by: David Ahern <dsahern@xxxxxxxxx>
Cc: Corey Ashford <cjashfor@xxxxxxxxxxxxxxxxxx>
Cc: David Ahern <dsahern@xxxxxxxxx>
Cc: Frederic Weisbecker <fweisbec@xxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxxxxx>
Cc: Jean Pihet <jean.pihet@xxxxxxxxxx>
Cc: Namhyung Kim <namhyung@xxxxxxxxxx>
Cc: Paul Mackerras <paulus@xxxxxxxxx>
Cc: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>
Link: http://lkml.kernel.org/n/tip-m8ae5s5cuwyytitgb6iqilid@xxxxxxxxxxxxxx
Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
---
tools/perf/util/ordered-events.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/tools/perf/util/ordered-events.c b/tools/perf/util/ordered-events.c
index 95f8211..be6a48c 100644
--- a/tools/perf/util/ordered-events.c
+++ b/tools/perf/util/ordered-events.c
@@ -96,8 +96,7 @@ ordered_events__new(struct ordered_events *oe, u64 timestamp)

void ordered_events__delete(struct ordered_events *oe, struct ordered_event *event)
{
- list_del(&event->list);
- list_add(&event->list, &oe->cache);
+ list_move(&event->list, &oe->cache);
oe->nr_events--;
}

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/