lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <e4d4af5c-8714-aac3-517b-dda1fb5b5b37@intel.com>
Date:   Mon, 19 Jun 2023 15:48:35 +0300
From:   Adrian Hunter <adrian.hunter@...el.com>
To:     Li Dong <lidong@...o.com>, Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Arnaldo Carvalho de Melo <acme@...nel.org>,
        Mark Rutland <mark.rutland@....com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Jiri Olsa <jolsa@...nel.org>,
        Namhyung Kim <namhyung@...nel.org>,
        Ian Rogers <irogers@...gle.com>,
        Andi Kleen <ak@...ux.intel.com>,
        "Steinar H. Gunderson" <sesse@...gle.com>,
        "open list:PERFORMANCE EVENTS SUBSYSTEM" 
        <linux-perf-users@...r.kernel.org>,
        "open list:PERFORMANCE EVENTS SUBSYSTEM" 
        <linux-kernel@...r.kernel.org>
Cc:     opensource.kernel@...o.com
Subject: Re: [PATCH] tools: Optimize the variable with 0 as the return value

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@...o.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,

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ