[PATCH 4/7] perf mmap: Using stored 'overwrite' in perf_mmap__consume
From: kan . liang
Date: Mon Mar 05 2018 - 14:12:54 EST
From: Kan Liang <kan.liang@xxxxxxxxxxxxxxx>
The 'overwrite' is set at initialization. It will not be changed.
Using it to replace the parameter of perf_mmap__consume().
The parameters will be discarded later.
No functional change.
Signed-off-by: Kan Liang <kan.liang@xxxxxxxxxxxxxxx>
---
tools/perf/util/mmap.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/perf/util/mmap.c b/tools/perf/util/mmap.c
index da9e68b..c4e41d2 100644
--- a/tools/perf/util/mmap.c
+++ b/tools/perf/util/mmap.c
@@ -121,9 +121,9 @@ void perf_mmap__put(struct perf_mmap *map)
perf_mmap__munmap(map);
}
-void perf_mmap__consume(struct perf_mmap *map, bool overwrite)
+void perf_mmap__consume(struct perf_mmap *map, bool overwrite __maybe_unused)
{
- if (!overwrite) {
+ if (!map->overwrite) {
u64 old = map->prev;
perf_mmap__write_tail(map, old);
--
2.4.11