From: Adrian Hunter <adrian.hunter@intel.com>
To: guanjing <guanjing@cmss.chinamobile.com>,
peterz@infradead.org, mingo@redhat.com, acme@kernel.org,
namhyung@kernel.org, mark.rutland@arm.com,
alexander.shishkin@linux.intel.com, jolsa@kernel.org,
irogers@google.com, algonell@gmail.com
Cc: linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1] perf intel-pt: cleanup unneeded return variable in intel_pt_text_poke()
Date: Thu, 21 Nov 2024 12:18:18 +0200 [thread overview]
Message-ID: <820e9b6b-16eb-446a-b524-adc8129726ec@intel.com> (raw)
In-Reply-To: <20241121100047.25318-1-guanjing@cmss.chinamobile.com>
On 21/11/24 12:00, guanjing wrote:
> Removed Unneeded variable: "ret"
>
> Fixes: 0dd5041c9a0e ("perf addr_location: Add init/exit/copy functions")
A Fixes tag is not for patches that don't fix some functionality.
> Signed-off-by: guanjing <guanjing@cmss.chinamobile.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 30be6dfe09eb..6c0234acc669 100644
> --- a/tools/perf/util/intel-pt.c
> +++ b/tools/perf/util/intel-pt.c
> @@ -3402,7 +3402,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)
> @@ -3443,7 +3442,7 @@ static int intel_pt_text_poke(struct intel_pt *pt, union perf_event *event)
> }
> out:
> addr_location__exit(&al);
> - return ret;
> + return 0;
Should just drop the return value entirely, since it is
always zero.
> }
>
> static int intel_pt_process_event(struct perf_session *session,
next prev parent reply other threads:[~2024-11-21 10:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-21 10:00 guanjing
2024-11-21 10:18 ` Adrian Hunter [this message]
2024-11-21 10:31 ` [PATCH v1] perf intel-pt: cleanup unneeded return variable inintel_pt_text_poke() guanjing
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=820e9b6b-16eb-446a-b524-adc8129726ec@intel.com \
--to=adrian.hunter@intel.com \
--cc=acme@kernel.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=algonell@gmail.com \
--cc=guanjing@cmss.chinamobile.com \
--cc=irogers@google.com \
--cc=jolsa@kernel.org \
--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 \
/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®