From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: tangmeng <tangmeng@uniontech.com>
Cc: peterz@infradead.org, mingo@redhat.com, mark.rutland@arm.com,
alexander.shishkin@linux.intel.com, jolsa@redhat.com,
namhyung@kernel.org, linux-perf-users@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] perf tools: Remove redundant ret variable
Date: Wed, 16 Feb 2022 10:39:41 -0300 [thread overview]
Message-ID: <Ygz+nQksMpsorTC8@kernel.org> (raw)
In-Reply-To: <20220216030425.27779-1-tangmeng@uniontech.com>
Em Wed, Feb 16, 2022 at 11:04:24AM +0800, tangmeng escreveu:
> Return value from hist_entry_iter__add() directly instead
> of taking this in another redundant variable.
Thanks, applied.
- Arnaldo
> Signed-off-by: tangmeng <tangmeng@uniontech.com>
> ---
> tools/perf/builtin-annotate.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c
> index 490bb9b8cf17..e347b8ef088f 100644
> --- a/tools/perf/builtin-annotate.c
> +++ b/tools/perf/builtin-annotate.c
> @@ -190,7 +190,6 @@ static int process_branch_callback(struct evsel *evsel,
> };
>
> struct addr_location a;
> - int ret;
>
> if (machine__resolve(machine, &a, sample) < 0)
> return -1;
> @@ -203,8 +202,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)
> --
> 2.20.1
>
>
--
- Arnaldo
prev parent reply other threads:[~2022-02-16 13:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-16 3:04 [PATCH 1/2] perf tools: Remove redundant ret variable tangmeng
2022-02-16 3:04 ` [PATCH 2/2] perf tools: Remove redundant err variable tangmeng
2022-02-16 13:38 ` Arnaldo Carvalho de Melo
2022-02-16 13:39 ` Arnaldo Carvalho de Melo [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Ygz+nQksMpsorTC8@kernel.org \
--to=acme@kernel.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=tangmeng@uniontech.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.