mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
perf annotate: Remove redundant 'ret' variable
Return the result from hist_entry_iter__add() directly instead of taking this in another redundant variable. Signed-off-by: tangmeng <tangmeng@uniontech.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lore.kernel.org/lkml/20220216030425.27779-1-tangmeng@uniontech.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
662a9810fc
commit
69c31f9647
1 changed files with 1 additions and 3 deletions
|
@ -194,7 +194,6 @@ static int process_branch_callback(struct evsel *evsel,
|
||||||
};
|
};
|
||||||
|
|
||||||
struct addr_location a;
|
struct addr_location a;
|
||||||
int ret;
|
|
||||||
|
|
||||||
if (machine__resolve(machine, &a, sample) < 0)
|
if (machine__resolve(machine, &a, sample) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -207,8 +206,7 @@ static int process_branch_callback(struct evsel *evsel,
|
||||||
|
|
||||||
hist__account_cycles(sample->branch_stack, al, sample, false, NULL);
|
hist__account_cycles(sample->branch_stack, al, sample, false, NULL);
|
||||||
|
|
||||||
ret = hist_entry_iter__add(&iter, &a, PERF_MAX_STACK_DEPTH, ann);
|
return hist_entry_iter__add(&iter, &a, PERF_MAX_STACK_DEPTH, ann);
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool has_annotation(struct perf_annotate *ann)
|
static bool has_annotation(struct perf_annotate *ann)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue