netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] tcp: remove set but not used variable 'skb_size'
       [not found] <1533048144-39731-1-git-send-email-weiyongjun1@huawei.com>
@ 2018-08-01  1:59 ` Wei Yongjun
  2018-08-01  2:36   ` Eric Dumazet
  2018-08-01 16:57   ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Wei Yongjun @ 2018-08-01  1:59 UTC (permalink / raw)
  To: Eric Dumazet, Alexey Kuznetsov, Hideaki YOSHIFUJI
  Cc: Wei Yongjun, netdev, kernel-janitors

Fixes gcc '-Wunused-but-set-variable' warning:

net/ipv4/tcp_output.c: In function 'tcp_collapse_retrans':
net/ipv4/tcp_output.c:2700:6: warning:
 variable 'skb_size' set but not used [-Wunused-but-set-variable]
  int skb_size, next_skb_size;
      ^

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 net/ipv4/tcp_output.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index 490df62..731e6d4 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -2697,9 +2697,8 @@ static bool tcp_collapse_retrans(struct sock *sk, struct sk_buff *skb)
 {
 	struct tcp_sock *tp = tcp_sk(sk);
 	struct sk_buff *next_skb = skb_rb_next(skb);
-	int skb_size, next_skb_size;
+	int next_skb_size;
 
-	skb_size = skb->len;
 	next_skb_size = next_skb->len;
 
 	BUG_ON(tcp_skb_pcount(skb) != 1 || tcp_skb_pcount(next_skb) != 1);

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

* Re: [PATCH net-next] tcp: remove set but not used variable 'skb_size'
  2018-08-01  1:59 ` [PATCH net-next] tcp: remove set but not used variable 'skb_size' Wei Yongjun
@ 2018-08-01  2:36   ` Eric Dumazet
  2018-08-01 16:57   ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Eric Dumazet @ 2018-08-01  2:36 UTC (permalink / raw)
  To: Wei Yongjun, Eric Dumazet, Alexey Kuznetsov, Hideaki YOSHIFUJI
  Cc: netdev, kernel-janitors



On 07/31/2018 06:59 PM, Wei Yongjun wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> net/ipv4/tcp_output.c: In function 'tcp_collapse_retrans':
> net/ipv4/tcp_output.c:2700:6: warning:
>  variable 'skb_size' set but not used [-Wunused-but-set-variable]
>   int skb_size, next_skb_size;
>       ^
> 
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>


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

Thanks.

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

* Re: [PATCH net-next] tcp: remove set but not used variable 'skb_size'
  2018-08-01  1:59 ` [PATCH net-next] tcp: remove set but not used variable 'skb_size' Wei Yongjun
  2018-08-01  2:36   ` Eric Dumazet
@ 2018-08-01 16:57   ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2018-08-01 16:57 UTC (permalink / raw)
  To: weiyongjun1; +Cc: edumazet, kuznet, yoshfuji, netdev, kernel-janitors

From: Wei Yongjun <weiyongjun1@huawei.com>
Date: Wed, 1 Aug 2018 01:59:56 +0000

> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> net/ipv4/tcp_output.c: In function 'tcp_collapse_retrans':
> net/ipv4/tcp_output.c:2700:6: warning:
>  variable 'skb_size' set but not used [-Wunused-but-set-variable]
>   int skb_size, next_skb_size;
>       ^
> 
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>

Applied, thanks.

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

end of thread, other threads:[~2018-08-01 19:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1533048144-39731-1-git-send-email-weiyongjun1@huawei.com>
2018-08-01  1:59 ` [PATCH net-next] tcp: remove set but not used variable 'skb_size' Wei Yongjun
2018-08-01  2:36   ` Eric Dumazet
2018-08-01 16:57   ` David Miller

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).