All of lore.kernel.org
 help / color / mirror / Atom feed
From: xuanzhenggang001@208suo.com
To: davem@davemloft.net, dsahern@kernel.org, tglx@linutronix.de,
	mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com
Cc: x86@kernel.org, hpa@zytor.com, bpf@vger.kernel.org,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] bpf: Remove unneeded variable
Date: Wed, 14 Jun 2023 14:29:24 +0800	[thread overview]
Message-ID: <f65f9d0caf6a315f21eb09e7a29a8189@208suo.com> (raw)
In-Reply-To: <e980bbb2536d4c35ce90a4666b3e8bf6@208suo.com>

Fix the following coccicheck warning:

arch/x86/net/bpf_jit_comp32.c:1274:5-8: Unneeded variable: "cnt".

Signed-off-by: Zhenggang Xuan <xuanzhenggang001@208suo.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));
@@ -1280,7 +1279,7 @@ static int emit_jmp_edx(u8 **pprog, u8 *ip)
  #endif
      *pprog = prog;

-    return cnt;
+    return 0;
  }

  /*

       reply	other threads:[~2023-06-14  6:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20230610124403.36396-1-denghuilong@cdjrlc.com>
     [not found] ` <e980bbb2536d4c35ce90a4666b3e8bf6@208suo.com>
2023-06-14  6:29   ` xuanzhenggang001 [this message]
2023-06-16 16:30     ` [PATCH] bpf: Remove unneeded variable Andrii Nakryiko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f65f9d0caf6a315f21eb09e7a29a8189@208suo.com \
    --to=xuanzhenggang001@208suo.com \
    --cc=bp@alien8.de \
    --cc=bpf@vger.kernel.org \
    --cc=dave.hansen@linux.intel.com \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.