perf tools: Use list_move in ordered_events_delete function
authorJiri Olsa <jolsa@kernel.org>
Sun, 15 Jun 2014 17:46:08 +0000 (19:46 +0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 12 Aug 2014 15:02:59 +0000 (12:02 -0300)
As Namhyung pointed out we can use list_move in ordered_events_delete.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Suggested-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: David Ahern <dsahern@gmail.com>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jean Pihet <jean.pihet@linaro.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/n/tip-m8ae5s5cuwyytitgb6iqilid@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/ordered-events.c

index 95f8211ccdde9baa268f1603d3f4f9fb1a0e7249..be6a48ce3eea3904271e9da1d4e010aa383c0b23 100644 (file)
@@ -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--;
 }