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: <CAEf4BzZhD+a=c_gp0V0_6Zvp1gSa4=Wt+fUpo7EgDp1cH8Hjjg@mail.gmail.com>
Date:   Fri, 16 Jun 2023 09:30:22 -0700
From:   Andrii Nakryiko <andrii.nakryiko@...il.com>
To:     xuanzhenggang001@...suo.com
Cc:     davem@...emloft.net, dsahern@...nel.org, tglx@...utronix.de,
        mingo@...hat.com, bp@...en8.de, dave.hansen@...ux.intel.com,
        x86@...nel.org, hpa@...or.com, bpf@...r.kernel.org,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] bpf: Remove unneeded variable

On Tue, Jun 13, 2023 at 11:29 PM <xuanzhenggang001@...suo.com> wrote:
>
> Fix the following coccicheck warning:
>
> arch/x86/net/bpf_jit_comp32.c:1274:5-8: Unneeded variable: "cnt".
>
> Signed-off-by: Zhenggang Xuan <xuanzhenggang001@...suo.com>
> ---
>   arch/x86/net/bpf_jit_comp32.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/arch/x86/net/bpf_jit_comp32.c
> b/arch/x86/net/bpf_jit_comp32.c
> index 429a89c5468b..bc71329ac5ed 100644
> --- a/arch/x86/net/bpf_jit_comp32.c
> +++ b/arch/x86/net/bpf_jit_comp32.c
> @@ -1271,7 +1271,6 @@ static void emit_epilogue(u8 **pprog, u32
> stack_depth)
>   static int emit_jmp_edx(u8 **pprog, u8 *ip)
>   {
>       u8 *prog = *pprog;
> -    int cnt = 0;
>
>   #ifdef CONFIG_RETPOLINE
>       EMIT1_off32(0xE9, (u8 *)__x86_indirect_thunk_edx - (ip + 5));

EMIT macroses are updating this cnt. Have you tested this patch by any chance?

> @@ -1280,7 +1279,7 @@ static int emit_jmp_edx(u8 **pprog, u8 *ip)
>   #endif
>       *pprog = prog;
>
> -    return cnt;
> +    return 0;
>   }
>
>   /*
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ