As Namhyung pointed out we can use list_move in ordered_event_put. Suggested-by: Namhyung Kim <namhy...@kernel.org> Cc: Arnaldo Carvalho de Melo <a...@kernel.org> Cc: Corey Ashford <cjash...@linux.vnet.ibm.com> Cc: David Ahern <dsah...@gmail.com> Cc: Frederic Weisbecker <fweis...@gmail.com> Cc: Ingo Molnar <mi...@kernel.org> Cc: Jean Pihet <jean.pi...@linaro.org> Cc: Namhyung Kim <namhy...@kernel.org> Cc: Paul Mackerras <pau...@samba.org> Cc: Peter Zijlstra <a.p.zijls...@chello.nl> Signed-off-by: Jiri Olsa <jo...@kernel.org> --- 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 2e89bea..022be55 100644 --- a/tools/perf/util/ordered-events.c +++ b/tools/perf/util/ordered-events.c @@ -96,8 +96,7 @@ ordered_events_get(struct ordered_events_queue *q, u64 timestamp) void ordered_event_put(struct ordered_events_queue *q, struct ordered_event *iter) { - list_del(&iter->list); - list_add(&iter->list, &q->cache); + list_move(&iter->list, &q->cache); q->nr_events--; } -- 1.8.3.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/