[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <820e9b6b-16eb-446a-b524-adc8129726ec@intel.com>
Date: Thu, 21 Nov 2024 12:18:18 +0200
From: Adrian Hunter <adrian.hunter@...el.com>
To: guanjing <guanjing@...s.chinamobile.com>, peterz@...radead.org,
mingo@...hat.com, acme@...nel.org, namhyung@...nel.org,
mark.rutland@....com, alexander.shishkin@...ux.intel.com, jolsa@...nel.org,
irogers@...gle.com, algonell@...il.com
Cc: linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1] perf intel-pt: cleanup unneeded return variable in
intel_pt_text_poke()
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@...s.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,
Powered by blists - more mailing lists