Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

perf rb_resort: Rename for_each() macros to for_each_entry()

To match the semantics for list.h in the kernel, that are the
interface we use in them.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Milian Wolff <milian.wolff@kdab.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Taeung Song <treeze.taeung@gmail.com>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-iaxuq2yu43mtb504j96q0axs@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

+4 -4
+2 -2
tools/perf/builtin-trace.c
··· 2550 2550 printed += fprintf(fp, " (msec) (msec) (msec) (msec) (%%)\n"); 2551 2551 printed += fprintf(fp, " --------------- -------- --------- --------- --------- --------- ------\n"); 2552 2552 2553 - resort_rb__for_each(nd, syscall_stats) { 2553 + resort_rb__for_each_entry(nd, syscall_stats) { 2554 2554 struct stats *stats = syscall_stats_entry->stats; 2555 2555 if (stats) { 2556 2556 double min = (double)(stats->min) / NSEC_PER_MSEC; ··· 2627 2627 return 0; 2628 2628 } 2629 2629 2630 - resort_rb__for_each(nd, threads) 2630 + resort_rb__for_each_entry(nd, threads) 2631 2631 printed += trace__fprintf_thread(fp, threads_entry->thread, trace); 2632 2632 2633 2633 resort_rb__delete(threads);
+2 -2
tools/perf/util/rb_resort.h
··· 35 35 36 36 struct rb_node *nd; 37 37 38 - resort_rb__for_each(nd, threads) { 38 + resort_rb__for_each_entry(nd, threads) { 39 39 struct thread *t = threads_entry; 40 40 printf("%s: %d\n", t->shortname, t->tid); 41 41 } ··· 123 123 struct __name##_sorted_entry *__name##_entry; \ 124 124 struct __name##_sorted *__name = __name##_sorted__new 125 125 126 - #define resort_rb__for_each(__nd, __name) \ 126 + #define resort_rb__for_each_entry(__nd, __name) \ 127 127 for (__nd = rb_first(&__name->entries); \ 128 128 __name##_entry = rb_entry(__nd, struct __name##_sorted_entry, \ 129 129 rb_node), __nd; \