linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH linux-next] ipv6: Remove assignment to 'newinet'
@ 2021-11-11  9:23 cgel.zte
  2021-11-12  0:41 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 5+ messages in thread
From: cgel.zte @ 2021-11-11  9:23 UTC (permalink / raw)
  To: Eric Dumazet
  Cc: David S . Miller, Hideaki YOSHIFUJI, David Ahern, Jakub Kicinski,
	netdev, linux-kernel, luo penghao, Zeal Robot

From: luo penghao <luo.penghao@zte.com.cn>

The same statement will overwrite it afterwards. meanwhile, the
assignment is in the if statement, the variable will not be used

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: luo penghao <luo.penghao@zte.com.cn>
---
 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 b03dd02..80f1fbb 100644
--- a/net/ipv6/tcp_ipv6.c
+++ b/net/ipv6/tcp_ipv6.c
@@ -1261,7 +1261,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);
 
-- 
2.15.2



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH linux-next] ipv6: Remove assignment to 'newinet'
  2021-11-11  9:23 [PATCH linux-next] ipv6: Remove assignment to 'newinet' cgel.zte
@ 2021-11-12  0:41 ` patchwork-bot+netdevbpf
  2021-11-12  1:16   ` Eric Dumazet
  0 siblings, 1 reply; 5+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-11-12  0:41 UTC (permalink / raw)
  To: luo penghao
  Cc: edumazet, davem, yoshfuji, dsahern, kuba, netdev, linux-kernel,
	luo.penghao, zealci

Hello:

This patch was applied to netdev/net-next.git (master)
by Jakub Kicinski <kuba@kernel.org>:

On Thu, 11 Nov 2021 09:23:46 +0000 you wrote:
> From: luo penghao <luo.penghao@zte.com.cn>
> 
> The same statement will overwrite it afterwards. meanwhile, the
> assignment is in the if statement, the variable will not be used
> 
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: luo penghao <luo.penghao@zte.com.cn>
> 
> [...]

Here is the summary with links:
  - [linux-next] ipv6: Remove assignment to 'newinet'
    https://git.kernel.org/netdev/net-next/c/70bf363d7adb

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH linux-next] ipv6: Remove assignment to 'newinet'
  2021-11-12  0:41 ` patchwork-bot+netdevbpf
@ 2021-11-12  1:16   ` Eric Dumazet
  2021-11-12  1:35     ` Jakub Kicinski
  0 siblings, 1 reply; 5+ messages in thread
From: Eric Dumazet @ 2021-11-12  1:16 UTC (permalink / raw)
  To: patchwork-bot+netdevbpf
  Cc: luo penghao, davem, yoshfuji, dsahern, kuba, netdev,
	linux-kernel, luo.penghao, zealci

On Thu, Nov 11, 2021 at 4:41 PM <patchwork-bot+netdevbpf@kernel.org> wrote:
>
> Hello:
>
> This patch was applied to netdev/net-next.git (master)
> by Jakub Kicinski <kuba@kernel.org>:
>
> On Thu, 11 Nov 2021 09:23:46 +0000 you wrote:
> > From: luo penghao <luo.penghao@zte.com.cn>
> >
> > The same statement will overwrite it afterwards. meanwhile, the
> > assignment is in the if statement, the variable will not be used
> >
> > Reported-by: Zeal Robot <zealci@zte.com.cn>
> > Signed-off-by: luo penghao <luo.penghao@zte.com.cn>
> >
> > [...]
>
> Here is the summary with links:
>   - [linux-next] ipv6: Remove assignment to 'newinet'
>     https://git.kernel.org/netdev/net-next/c/70bf363d7adb
>
> You are awesome, thank you!
> --
> Deet-doot-dot, I am a bot.
> https://korg.docs.kernel.org/patchwork/pwbot.html
>
>

But why ?


All these bots, trying to send the same patches to multiple trees....

commit 70bf363d7adb3a428773bc905011d0ff923ba747
Author: Nghia Le <nghialm78@gmail.com>
Date:   Thu Nov 4 21:37:40 2021 +0700

    ipv6: remove useless assignment to newinet in tcp_v6_syn_recv_sock()

    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>
    Reviewed-by: Eric Dumazet <edumazet@google.com>
    Link: https://lore.kernel.org/r/20211104143740.32446-1-nghialm78@gmail.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>

diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
index 2cc9b0e53ad1c8e2d35fc9c6dbd1e90fee40b632..551fce49841d7f53a111b0435855634cece2b40a
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);

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH linux-next] ipv6: Remove assignment to 'newinet'
  2021-11-12  1:16   ` Eric Dumazet
@ 2021-11-12  1:35     ` Jakub Kicinski
  2021-11-12  1:47       ` Eric Dumazet
  0 siblings, 1 reply; 5+ messages in thread
From: Jakub Kicinski @ 2021-11-12  1:35 UTC (permalink / raw)
  To: Eric Dumazet
  Cc: patchwork-bot+netdevbpf, luo penghao, davem, yoshfuji, dsahern,
	netdev, linux-kernel, luo.penghao, zealci

On Thu, 11 Nov 2021 17:16:32 -0800 Eric Dumazet wrote:
> On Thu, Nov 11, 2021 at 4:41 PM <patchwork-bot+netdevbpf@kernel.org> wrote:
> > Here is the summary with links:
> >   - [linux-next] ipv6: Remove assignment to 'newinet'
> >     https://git.kernel.org/netdev/net-next/c/70bf363d7adb
> 
> But why ?

It's just the bot getting confused because the patch is identical.

Sorry, I should have marked it as Rejected in pw before I did the pull.

Note that the commit hash from the bot's reply is identical to the
commit you quoted.

> All these bots, trying to send the same patches to multiple trees....
> 
> commit 70bf363d7adb3a428773bc905011d0ff923ba747
> Author: Nghia Le <nghialm78@gmail.com>
> Date:   Thu Nov 4 21:37:40 2021 +0700
> 
>     ipv6: remove useless assignment to newinet in tcp_v6_syn_recv_sock()

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH linux-next] ipv6: Remove assignment to 'newinet'
  2021-11-12  1:35     ` Jakub Kicinski
@ 2021-11-12  1:47       ` Eric Dumazet
  0 siblings, 0 replies; 5+ messages in thread
From: Eric Dumazet @ 2021-11-12  1:47 UTC (permalink / raw)
  To: Jakub Kicinski, Eric Dumazet
  Cc: patchwork-bot+netdevbpf, luo penghao, davem, yoshfuji, dsahern,
	netdev, linux-kernel, luo.penghao, zealci



On 11/11/21 5:35 PM, Jakub Kicinski wrote:
> On Thu, 11 Nov 2021 17:16:32 -0800 Eric Dumazet wrote:
>> On Thu, Nov 11, 2021 at 4:41 PM <patchwork-bot+netdevbpf@kernel.org> wrote:
>>> Here is the summary with links:
>>>   - [linux-next] ipv6: Remove assignment to 'newinet'
>>>     https://git.kernel.org/netdev/net-next/c/70bf363d7adb
>>
>> But why ?
> 
> It's just the bot getting confused because the patch is identical.
> 
> Sorry, I should have marked it as Rejected in pw before I did the pull.
> 
> Note that the commit hash from the bot's reply is identical to the
> commit you quoted.
>

OK, good to now, thanks !


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-11-12  1:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-11  9:23 [PATCH linux-next] ipv6: Remove assignment to 'newinet' cgel.zte
2021-11-12  0:41 ` patchwork-bot+netdevbpf
2021-11-12  1:16   ` Eric Dumazet
2021-11-12  1:35     ` Jakub Kicinski
2021-11-12  1:47       ` Eric Dumazet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).