* [PATCH] tcp: Remove unused but set variable
@ 2016-10-18 9:22 Tobias Klauser
2016-10-18 14:34 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Tobias Klauser @ 2016-10-18 9:22 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev
Remove the unused but set variable icsk in listening_get_next to fix the
following GCC warning when building with 'W=1':
net/ipv4/tcp_ipv4.c: In function ‘listening_get_next’:
net/ipv4/tcp_ipv4.c:1890:31: warning: variable ‘icsk’ set but not used [-Wunused-but-set-variable]
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
---
net/ipv4/tcp_ipv4.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index bd5e8d10893f..79d55eb3ec3f 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -1887,7 +1887,6 @@ static void *listening_get_next(struct seq_file *seq, void *cur)
struct tcp_iter_state *st = seq->private;
struct net *net = seq_file_net(seq);
struct inet_listen_hashbucket *ilb;
- struct inet_connection_sock *icsk;
struct sock *sk = cur;
if (!sk) {
@@ -1909,7 +1908,6 @@ static void *listening_get_next(struct seq_file *seq, void *cur)
continue;
if (sk->sk_family == st->family)
return sk;
- icsk = inet_csk(sk);
}
spin_unlock_bh(&ilb->lock);
st->offset = 0;
--
2.9.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] tcp: Remove unused but set variable
2016-10-18 9:22 [PATCH] tcp: Remove unused but set variable Tobias Klauser
@ 2016-10-18 14:34 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2016-10-18 14:34 UTC (permalink / raw)
To: tklauser; +Cc: netdev
From: Tobias Klauser <tklauser@distanz.ch>
Date: Tue, 18 Oct 2016 11:22:54 +0200
> Remove the unused but set variable icsk in listening_get_next to fix the
> following GCC warning when building with 'W=1':
>
> net/ipv4/tcp_ipv4.c: In function ‘listening_get_next’:
> net/ipv4/tcp_ipv4.c:1890:31: warning: variable ‘icsk’ set but not used [-Wunused-but-set-variable]
>
> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-10-18 14:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-18 9:22 [PATCH] tcp: Remove unused but set variable Tobias Klauser
2016-10-18 14:34 ` 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).