From: Jiri Olsa Date: Sun, 15 Jun 2014 17:46:08 +0000 (+0200) Subject: perf tools: Use list_move in ordered_events_delete function X-Git-Tag: MMI-PSA29.97-13-9~11369^2~47^2~18 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=fa4e5c67a2d169b9ef83f51b94e1d4a562ddfc0f;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git 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 Suggested-by: Namhyung Kim Acked-by: David Ahern Cc: Corey Ashford Cc: David Ahern Cc: Frederic Weisbecker Cc: Ingo Molnar Cc: Jean Pihet Cc: Namhyung Kim Cc: Paul Mackerras Cc: Peter Zijlstra Link: http://lkml.kernel.org/n/tip-m8ae5s5cuwyytitgb6iqilid@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/util/ordered-events.c b/tools/perf/util/ordered-events.c index 95f8211ccdde..be6a48ce3eea 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--; }