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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BY5PR12MB41317E2E191990495704FB3EDF669@BY5PR12MB4131.namprd12.prod.outlook.com>
Date:   Mon, 29 Nov 2021 10:17:24 +0000
From:   Vladimir Isaev <Vladimir.Isaev@...opsys.com>
To:     Colin Ian King <colin.i.king@...glemail.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@...hat.com>,
        Namhyung Kim <namhyung@...nel.org>,
        Vineet Gupta <vgupta@...nel.org>,
        "linux-perf-users@...r.kernel.org" <linux-perf-users@...r.kernel.org>,
        "linux-snps-arc@...ts.infradead.org" 
        <linux-snps-arc@...ts.infradead.org>
CC:     "kernel-janitors@...r.kernel.org" <kernel-janitors@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] ARC: perf: Remove redundant initialization of variable
 idx

On 11/27/21 1:23 AM, Colin Ian King wrote:
>
> The variable idx is being initialized with a value that is never
> read, it is being updated later on. The assignment is redundant and
> can be removed.
> 
> Signed-off-by: Colin Ian King <colin.i.king@...il.com>
> ---
>  arch/arc/kernel/perf_event.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arc/kernel/perf_event.c b/arch/arc/kernel/perf_event.c
> index 145722f80c9b..f5dd799ddb9e 100644
> --- a/arch/arc/kernel/perf_event.c
> +++ b/arch/arc/kernel/perf_event.c
> @@ -361,7 +361,7 @@ static int arc_pmu_add(struct perf_event *event, int
> flags)
>  {
>  	struct arc_pmu_cpu *pmu_cpu = this_cpu_ptr(&arc_pmu_cpu);
>  	struct hw_perf_event *hwc = &event->hw;
> -	int idx = hwc->idx;
> +	int idx;
> 
>  	idx = ffz(pmu_cpu->used_mask[0]);
>  	if (idx == arc_pmu->n_counters)
> --
> 2.33.1
> 

Acked-by: Vladimir Isaev <isaev@...opsys.com>

Thank you,
Vladimir Isaev

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ