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: <Ygz+nQksMpsorTC8@kernel.org>
Date:   Wed, 16 Feb 2022 10:39:41 -0300
From:   Arnaldo Carvalho de Melo <acme@...nel.org>
To:     tangmeng <tangmeng@...ontech.com>
Cc:     peterz@...radead.org, mingo@...hat.com, mark.rutland@....com,
        alexander.shishkin@...ux.intel.com, jolsa@...hat.com,
        namhyung@...nel.org, linux-perf-users@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] perf tools: Remove redundant ret variable

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@...ontech.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ