File perf-hists-fix-variable-name-s-inconsistency-in-hists__for_each-macro.patch of Package perf
47
1
From: Yuya Fujita <fujita.yuya@fujitsu.com>
2
Date: Thu, 19 Dec 2019 08:08:32 +0000
3
Subject: perf hists: Fix variable name's inconsistency in hists__for_each()
4
macro
5
Git-commit: 55347ec340af401437680fd0e88df6739a967f9f
6
Patch-mainline: v5.5-rc7
7
References: git-fixes
8
9
Variable names are inconsistent in hists__for_each macro().
10
11
Due to this inconsistency, the macro replaces its second argument with
12
"fmt" regardless of its original name.
13
14
So far it works because only "fmt" is passed to the second argument.
15
However, this behavior is not expected and should be fixed.
16
17
Fixes: f0786af536bb ("perf hists: Introduce hists__for_each_format macro")
18
Fixes: aa6f50af822a ("perf hists: Introduce hists__for_each_sort_list macro")
19
Signed-off-by: Yuya Fujita <fujita.yuya@fujitsu.com>
20
Acked-by: Jiri Olsa <jolsa@kernel.org>
21
Cc: Peter Zijlstra <peterz@infradead.org>
22
Link: http://lore.kernel.org/lkml/OSAPR01MB1588E1C47AC22043175DE1B2E8520@OSAPR01MB1588.jpnprd01.prod.outlook.com
23
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
24
Signed-off-by: Tony Jones <tonyj@suse.de>
25
---
26
tools/perf/util/hist.h | 4 ++--
27
1 file changed, 2 insertions(+), 2 deletions(-)
28
29
diff --git a/tools/perf/util/hist.h b/tools/perf/util/hist.h
30
index 45286900aacb..0aa63aeb58ec 100644
31
--- a/tools/perf/util/hist.h
32
+++ b/tools/perf/util/hist.h
33
34
list_for_each_entry_safe(format, tmp, &(_list)->sorts, sort_list)
35
36
#define hists__for_each_format(hists, format) \
37
- perf_hpp_list__for_each_format((hists)->hpp_list, fmt)
38
+ perf_hpp_list__for_each_format((hists)->hpp_list, format)
39
40
#define hists__for_each_sort_list(hists, format) \
41
- perf_hpp_list__for_each_sort_list((hists)->hpp_list, fmt)
42
+ perf_hpp_list__for_each_sort_list((hists)->hpp_list, format)
43
44
extern struct perf_hpp_fmt perf_hpp__format[];
45
46
47