aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortangmeng <[email protected]>2022-02-16 11:04:24 +0800
committerArnaldo Carvalho de Melo <[email protected]>2022-02-16 10:38:55 -0300
commit69c31f9647a824bcc8cb3fc3441a32dffd0667ec (patch)
tree989755cc8468a1e3fa763c725d01a84b3a443909
parent662a9810fcca3d9b3435187d45b759b9649c4551 (diff)
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 <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Peter Zijlstra <[email protected]> Link: http://lore.kernel.org/lkml/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
-rw-r--r--tools/perf/builtin-annotate.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c
index 5e038d9bab05..e65dc380be15 100644
--- a/tools/perf/builtin-annotate.c
+++ b/tools/perf/builtin-annotate.c
@@ -194,7 +194,6 @@ static int process_branch_callback(struct evsel *evsel,
};
struct addr_location a;
- int ret;
if (machine__resolve(machine, &a, sample) < 0)
return -1;
@@ -207,8 +206,7 @@ static int process_branch_callback(struct evsel *evsel,
hist__account_cycles(sample->branch_stack, al, sample, false, NULL);
- ret = hist_entry_iter__add(&iter, &a, PERF_MAX_STACK_DEPTH, ann);
- return ret;
+ return hist_entry_iter__add(&iter, &a, PERF_MAX_STACK_DEPTH, ann);
}
static bool has_annotation(struct perf_annotate *ann)