From: Jiri Olsa Date: Mon, 19 Sep 2016 13:09:11 +0000 (+0200) Subject: perf evsel: Remove superfluous initialization of weight X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=82deb8a242cd8aceaf553c9fb731f91dbdc1f9a6;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git perf evsel: Remove superfluous initialization of weight Removing superfluous initialization of weight, it's already set to 0 via memset. Signed-off-by: Jiri Olsa Cc: Andi Kleen Cc: David Ahern Cc: Don Zickus Cc: Joe Mario Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1474290610-23241-3-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c index 21fd573106ed..f3225a2e6eee 100644 --- a/tools/perf/util/evsel.c +++ b/tools/perf/util/evsel.c @@ -1728,7 +1728,6 @@ int perf_evsel__parse_sample(struct perf_evsel *evsel, union perf_event *event, data->cpu = data->pid = data->tid = -1; data->stream_id = data->id = data->time = -1ULL; data->period = evsel->attr.sample_period; - data->weight = 0; data->cpumode = event->header.misc & PERF_RECORD_MISC_CPUMODE_MASK; if (event->header.type != PERF_RECORD_SAMPLE) { @@ -1935,7 +1934,6 @@ int perf_evsel__parse_sample(struct perf_evsel *evsel, union perf_event *event, } } - data->weight = 0; if (type & PERF_SAMPLE_WEIGHT) { OVERFLOW_CHECK_u64(array); data->weight = *array;