From: Adrian Hunter <adrian.hunter@intel.com>
To: Li Dong <lidong@vivo.com>, Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>,
Ian Rogers <irogers@google.com>, Andi Kleen <ak@linux.intel.com>,
"Steinar H. Gunderson" <sesse@google.com>,
"open list:PERFORMANCE EVENTS SUBSYSTEM"
<linux-perf-users@vger.kernel.org>,
"open list:PERFORMANCE EVENTS SUBSYSTEM"
<linux-kernel@vger.kernel.org>
Cc: opensource.kernel@vivo.com
Subject: Re: [PATCH] tools: Optimize the variable with 0 as the return value
Date: Mon, 19 Jun 2023 15:48:35 +0300 [thread overview]
Message-ID: <e4d4af5c-8714-aac3-517b-dda1fb5b5b37@intel.com> (raw)
In-Reply-To: <20230619112047.1966-1-lidong@vivo.com>
On 19/06/23 14:20, Li Dong wrote:
> The variable ret is not used, replacing ret with 0 as the return value
What kernel does that apply to?
>
> Signed-off-by: Li Dong <lidong@vivo.com>
> ---
> tools/perf/util/intel-pt.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/tools/perf/util/intel-pt.c b/tools/perf/util/intel-pt.c
> index dbf0bc71a63b..a40017458185 100644
> --- a/tools/perf/util/intel-pt.c
> +++ b/tools/perf/util/intel-pt.c
> @@ -3398,7 +3398,6 @@ static int intel_pt_text_poke(struct intel_pt *pt, union perf_event *event)
> struct machine *machine = pt->machine;
> struct intel_pt_cache_entry *e;
> u64 offset;
> - int ret = 0;
>
> addr_location__init(&al);
> if (!event->text_poke.new_len)
> @@ -3439,7 +3438,7 @@ static int intel_pt_text_poke(struct intel_pt *pt, union perf_event *event)
> }
> out:
> addr_location__exit(&al);
> - return ret;
> + return 0;
> }
>
> static int intel_pt_process_event(struct perf_session *session,
prev parent reply other threads:[~2023-06-19 12:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-19 11:20 Li Dong
2023-06-19 12:48 ` Adrian Hunter [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=e4d4af5c-8714-aac3-517b-dda1fb5b5b37@intel.com \
--to=adrian.hunter@intel.com \
--cc=acme@kernel.org \
--cc=ak@linux.intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=irogers@google.com \
--cc=jolsa@kernel.org \
--cc=lidong@vivo.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=opensource.kernel@vivo.com \
--cc=peterz@infradead.org \
--cc=sesse@google.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®