The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Nghia Le <nghialm78@gmail.com>,
	edumazet@google.com, davem@davemloft.net,
	yoshfuji@linux-ipv6.org, dsahern@kernel.org, kuba@kernel.org,
	ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org,
	kafai@fb.com, songliubraving@fb.com, yhs@fb.com,
	john.fastabend@gmail.com, kpsingh@kernel.org
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	bpf@vger.kernel.org, kernel-janitors@vger.kernel.org,
	lukas.bulwahn@gmail.com
Subject: Re: [PATCH] ipv6: remove useless assignment to newinet in tcp_v6_syn_recv_sock()
Date: Thu, 4 Nov 2021 09:44:26 -0700	[thread overview]
Message-ID: <bed89145-c9a5-ba76-2446-dee8cd35c7da@gmail.com> (raw)
In-Reply-To: <20211104143740.32446-1-nghialm78@gmail.com>



On 11/4/21 7:37 AM, Nghia Le wrote:
> The newinet value is initialized with inet_sk() in a block code to
> handle sockets for the ETH_P_IP protocol. Along this code path,
> newinet is never read. Thus, assignment to newinet is needless and
> can be removed.
> 
> Signed-off-by: Nghia Le <nghialm78@gmail.com>
> ---
>  net/ipv6/tcp_ipv6.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
> index 2cc9b0e53ad1..551fce49841d 100644
> --- a/net/ipv6/tcp_ipv6.c
> +++ b/net/ipv6/tcp_ipv6.c
> @@ -1263,7 +1263,6 @@ static struct sock *tcp_v6_syn_recv_sock(const struct sock *sk, struct sk_buff *
>  
>  		inet_sk(newsk)->pinet6 = tcp_inet6_sk(newsk);
>  
> -		newinet = inet_sk(newsk);
>  		newnp = tcp_inet6_sk(newsk);
>  		newtp = tcp_sk(newsk);
>  
> 

Reviewed-by: Eric Dumazet <edumazet@google.com>

  reply	other threads:[~2021-11-04 16:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-04 14:37 [PATCH] ipv6: remove useless assignment to newinet in tcp_v6_syn_recv_sock() Nghia Le
2021-11-04 16:44 ` Eric Dumazet [this message]
2021-11-06  3:00 ` patchwork-bot+netdevbpf
2021-11-06  8:50 ` patchwork-bot+netdevbpf

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=bed89145-c9a5-ba76-2446-dee8cd35c7da@gmail.com \
    --to=eric.dumazet@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --cc=john.fastabend@gmail.com \
    --cc=kafai@fb.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=kpsingh@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lukas.bulwahn@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=nghialm78@gmail.com \
    --cc=songliubraving@fb.com \
    --cc=yhs@fb.com \
    --cc=yoshfuji@linux-ipv6.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox