Commit a3f96c47 authored by Paolo Abeni's avatar Paolo Abeni Committed by David S. Miller

udp: make *udp*_queue_rcv_skb() functions static

Since the udp memory accounting refactor, we don't need any more
to export the *udp*_queue_rcv_skb(). Make them static and fix
a couple of sparse warnings:

net/ipv4/udp.c:1615:5: warning: symbol 'udp_queue_rcv_skb' was not
declared. Should it be static?
net/ipv6/udp.c:572:5: warning: symbol 'udpv6_queue_rcv_skb' was not
declared. Should it be static?

Fixes: 850cbadd ("udp: use it's own memory accounting schema")
Fixes: c915fe13 ("udplite: fix NULL pointer dereference")
Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a2858602
...@@ -1612,7 +1612,7 @@ static void udp_v4_rehash(struct sock *sk) ...@@ -1612,7 +1612,7 @@ static void udp_v4_rehash(struct sock *sk)
udp_lib_rehash(sk, new_hash); udp_lib_rehash(sk, new_hash);
} }
int __udp_queue_rcv_skb(struct sock *sk, struct sk_buff *skb) static int __udp_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
{ {
int rc; int rc;
...@@ -1657,7 +1657,7 @@ EXPORT_SYMBOL(udp_encap_enable); ...@@ -1657,7 +1657,7 @@ EXPORT_SYMBOL(udp_encap_enable);
* Note that in the success and error cases, the skb is assumed to * Note that in the success and error cases, the skb is assumed to
* have either been requeued or freed. * have either been requeued or freed.
*/ */
int udp_queue_rcv_skb(struct sock *sk, struct sk_buff *skb) static int udp_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
{ {
struct udp_sock *up = udp_sk(sk); struct udp_sock *up = udp_sk(sk);
int is_udplite = IS_UDPLITE(sk); int is_udplite = IS_UDPLITE(sk);
......
...@@ -25,7 +25,6 @@ int udp_recvmsg(struct sock *sk, struct msghdr *msg, size_t len, int noblock, ...@@ -25,7 +25,6 @@ int udp_recvmsg(struct sock *sk, struct msghdr *msg, size_t len, int noblock,
int flags, int *addr_len); int flags, int *addr_len);
int udp_sendpage(struct sock *sk, struct page *page, int offset, size_t size, int udp_sendpage(struct sock *sk, struct page *page, int offset, size_t size,
int flags); int flags);
int __udp_queue_rcv_skb(struct sock *sk, struct sk_buff *skb);
void udp_destroy_sock(struct sock *sk); void udp_destroy_sock(struct sock *sk);
#ifdef CONFIG_PROC_FS #ifdef CONFIG_PROC_FS
......
...@@ -526,7 +526,7 @@ void __udp6_lib_err(struct sk_buff *skb, struct inet6_skb_parm *opt, ...@@ -526,7 +526,7 @@ void __udp6_lib_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
return; return;
} }
int __udpv6_queue_rcv_skb(struct sock *sk, struct sk_buff *skb) static int __udpv6_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
{ {
int rc; int rc;
...@@ -569,7 +569,7 @@ void udpv6_encap_enable(void) ...@@ -569,7 +569,7 @@ void udpv6_encap_enable(void)
} }
EXPORT_SYMBOL(udpv6_encap_enable); EXPORT_SYMBOL(udpv6_encap_enable);
int udpv6_queue_rcv_skb(struct sock *sk, struct sk_buff *skb) static int udpv6_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
{ {
struct udp_sock *up = udp_sk(sk); struct udp_sock *up = udp_sk(sk);
int is_udplite = IS_UDPLITE(sk); int is_udplite = IS_UDPLITE(sk);
......
...@@ -26,7 +26,6 @@ int compat_udpv6_getsockopt(struct sock *sk, int level, int optname, ...@@ -26,7 +26,6 @@ int compat_udpv6_getsockopt(struct sock *sk, int level, int optname,
int udpv6_sendmsg(struct sock *sk, struct msghdr *msg, size_t len); int udpv6_sendmsg(struct sock *sk, struct msghdr *msg, size_t len);
int udpv6_recvmsg(struct sock *sk, struct msghdr *msg, size_t len, int noblock, int udpv6_recvmsg(struct sock *sk, struct msghdr *msg, size_t len, int noblock,
int flags, int *addr_len); int flags, int *addr_len);
int __udpv6_queue_rcv_skb(struct sock *sk, struct sk_buff *skb);
void udpv6_destroy_sock(struct sock *sk); void udpv6_destroy_sock(struct sock *sk);
#ifdef CONFIG_PROC_FS #ifdef CONFIG_PROC_FS
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment