diff options
author | David S. Miller <davem@davemloft.net> | 2012-04-23 03:21:58 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-04-23 03:21:58 -0400 |
commit | ac807fa8e625aff58060876d70298c93a59c4252 (patch) | |
tree | 286eb33f1eac8342857555909f03fcd930883947 | |
parent | cd754a574596ecc321b9a14fda24a82cce4b0d1d (diff) |
tcp: Fix build warning after tcp_{v4,v6}_init_sock consolidation.
net/ipv4/tcp_ipv4.c: In function 'tcp_v4_init_sock':
net/ipv4/tcp_ipv4.c:1891:19: warning: unused variable 'tp' [-Wunused-variable]
net/ipv6/tcp_ipv6.c: In function 'tcp_v6_init_sock':
net/ipv6/tcp_ipv6.c:1836:19: warning: unused variable 'tp' [-Wunused-variable]
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/ipv4/tcp_ipv4.c | 3 | ||||
-rw-r--r-- | net/ipv6/tcp_ipv6.c | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index 5b07ea109300..0883921b20c1 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c | |||
@@ -1888,14 +1888,13 @@ static const struct tcp_sock_af_ops tcp_sock_ipv4_specific = { | |||
1888 | static int tcp_v4_init_sock(struct sock *sk) | 1888 | static int tcp_v4_init_sock(struct sock *sk) |
1889 | { | 1889 | { |
1890 | struct inet_connection_sock *icsk = inet_csk(sk); | 1890 | struct inet_connection_sock *icsk = inet_csk(sk); |
1891 | struct tcp_sock *tp = tcp_sk(sk); | ||
1892 | 1891 | ||
1893 | tcp_init_sock(sk); | 1892 | tcp_init_sock(sk); |
1894 | 1893 | ||
1895 | icsk->icsk_af_ops = &ipv4_specific; | 1894 | icsk->icsk_af_ops = &ipv4_specific; |
1896 | 1895 | ||
1897 | #ifdef CONFIG_TCP_MD5SIG | 1896 | #ifdef CONFIG_TCP_MD5SIG |
1898 | tp->af_specific = &tcp_sock_ipv4_specific; | 1897 | tcp_sk(sk)->af_specific = &tcp_sock_ipv4_specific; |
1899 | #endif | 1898 | #endif |
1900 | 1899 | ||
1901 | return 0; | 1900 | return 0; |
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c index 24dac6b83fb9..8044f6ac1301 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c | |||
@@ -1829,14 +1829,13 @@ static const struct tcp_sock_af_ops tcp_sock_ipv6_mapped_specific = { | |||
1829 | static int tcp_v6_init_sock(struct sock *sk) | 1829 | static int tcp_v6_init_sock(struct sock *sk) |
1830 | { | 1830 | { |
1831 | struct inet_connection_sock *icsk = inet_csk(sk); | 1831 | struct inet_connection_sock *icsk = inet_csk(sk); |
1832 | struct tcp_sock *tp = tcp_sk(sk); | ||
1833 | 1832 | ||
1834 | tcp_init_sock(sk); | 1833 | tcp_init_sock(sk); |
1835 | 1834 | ||
1836 | icsk->icsk_af_ops = &ipv6_specific; | 1835 | icsk->icsk_af_ops = &ipv6_specific; |
1837 | 1836 | ||
1838 | #ifdef CONFIG_TCP_MD5SIG | 1837 | #ifdef CONFIG_TCP_MD5SIG |
1839 | tp->af_specific = &tcp_sock_ipv6_specific; | 1838 | tcp_sk(sk)->af_specific = &tcp_sock_ipv6_specific; |
1840 | #endif | 1839 | #endif |
1841 | 1840 | ||
1842 | return 0; | 1841 | return 0; |