diff mbox series

[01/10] esp6: remove redundant variable err

Message ID 20221126110303.1859238-2-steffen.klassert@secunet.com (mailing list archive)
State Accepted
Commit e91001bae0d1725d9a49b5bfb5f46f6d1ca6bf1d
Delegated to: Netdev Maintainers
Headers show
Series [01/10] esp6: remove redundant variable err | expand

Checks

Context Check Description
netdev/tree_selection success Guessed tree name to be net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix warning Target tree name not specified in the subject
netdev/cover_letter success Pull request is its own cover letter
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers warning 8 maintainers not CCed: pabeni@redhat.com llvm@lists.linux.dev nathan@kernel.org edumazet@google.com trix@redhat.com ndesaulniers@google.com dsahern@kernel.org yoshfuji@linux-ipv6.org
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 13 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Steffen Klassert Nov. 26, 2022, 11:02 a.m. UTC
From: Colin Ian King <colin.i.king@gmail.com>

Variable err is being assigned a value that is not read, the assignment
is redundant and so is the variable. Remove it.

Cleans up clang scan warning:
net/ipv6/esp6_offload.c:64:7: warning: Although the value stored to 'err'
is used in the enclosing expression, the value is never actually read
from 'err' [deadcode.DeadStores]

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
---
 net/ipv6/esp6_offload.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

patchwork-bot+netdevbpf@kernel.org Nov. 30, 2022, 5 a.m. UTC | #1
Hello:

This series was applied to netdev/net-next.git (master)
by Steffen Klassert <steffen.klassert@secunet.com>:

On Sat, 26 Nov 2022 12:02:54 +0100 you wrote:
> From: Colin Ian King <colin.i.king@gmail.com>
> 
> Variable err is being assigned a value that is not read, the assignment
> is redundant and so is the variable. Remove it.
> 
> Cleans up clang scan warning:
> net/ipv6/esp6_offload.c:64:7: warning: Although the value stored to 'err'
> is used in the enclosing expression, the value is never actually read
> from 'err' [deadcode.DeadStores]
> 
> [...]

Here is the summary with links:
  - [01/10] esp6: remove redundant variable err
    https://git.kernel.org/netdev/net-next/c/e91001bae0d1
  - [02/10] xfrm: update x->lastused for every packet
    https://git.kernel.org/netdev/net-next/c/f7fe25a6f005
  - [03/10] xfrm: Remove not-used total variable
    https://git.kernel.org/netdev/net-next/c/cc2bbbfd9a50
  - [04/10] xfrm: a few coding style clean ups
    https://git.kernel.org/netdev/net-next/c/f157c416c51a
  - [05/10] xfrm: add extack to xfrm_add_sa_expire
    https://git.kernel.org/netdev/net-next/c/a25b19f36f92
  - [06/10] xfrm: add extack to xfrm_del_sa
    https://git.kernel.org/netdev/net-next/c/880e475d2b0b
  - [07/10] xfrm: add extack to xfrm_new_ae and xfrm_replay_verify_len
    https://git.kernel.org/netdev/net-next/c/643bc1a2ee30
  - [08/10] xfrm: add extack to xfrm_do_migrate
    https://git.kernel.org/netdev/net-next/c/bd12240337f4
  - [09/10] xfrm: add extack to xfrm_alloc_userspi
    https://git.kernel.org/netdev/net-next/c/c2dad11e0466
  - [10/10] xfrm: add extack to xfrm_set_spdinfo
    https://git.kernel.org/netdev/net-next/c/a74172168009

You are awesome, thank you!
diff mbox series

Patch

diff --git a/net/ipv6/esp6_offload.c b/net/ipv6/esp6_offload.c
index 79d43548279c..97edf461bc72 100644
--- a/net/ipv6/esp6_offload.c
+++ b/net/ipv6/esp6_offload.c
@@ -56,12 +56,11 @@  static struct sk_buff *esp6_gro_receive(struct list_head *head,
 	__be32 seq;
 	__be32 spi;
 	int nhoff;
-	int err;
 
 	if (!pskb_pull(skb, offset))
 		return NULL;
 
-	if ((err = xfrm_parse_spi(skb, IPPROTO_ESP, &spi, &seq)) != 0)
+	if (xfrm_parse_spi(skb, IPPROTO_ESP, &spi, &seq) != 0)
 		goto out;
 
 	xo = xfrm_offload(skb);