Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ipv6: move udp declarations to net/udp.h

Fix the following compilation warning:

net/ipv6/udp.c:1031:30: warning: no previous prototype for 'udp_v6_early_demux' [-Wmissing-prototypes]
1031 | INDIRECT_CALLABLE_SCOPE void udp_v6_early_demux(struct sk_buff *skb)
| ^~~~~~~~~~~~~~~~~~
net/ipv6/udp.c:1072:29: warning: no previous prototype for 'udpv6_rcv' [-Wmissing-prototypes]
1072 | INDIRECT_CALLABLE_SCOPE int udpv6_rcv(struct sk_buff *skb)
| ^~~~~~~~~

Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Leon Romanovsky and committed by
Jakub Kicinski
f9a4719c 1faba27f

+4 -2
+3
include/net/udp.h
··· 173 173 INDIRECT_CALLABLE_DECLARE(struct sk_buff *udp6_gro_receive(struct list_head *, 174 174 struct sk_buff *)); 175 175 INDIRECT_CALLABLE_DECLARE(int udp6_gro_complete(struct sk_buff *, int)); 176 + INDIRECT_CALLABLE_DECLARE(void udp_v6_early_demux(struct sk_buff *)); 177 + INDIRECT_CALLABLE_DECLARE(int udpv6_rcv(struct sk_buff *)); 178 + 176 179 struct sk_buff *udp_gro_receive(struct list_head *head, struct sk_buff *skb, 177 180 struct udphdr *uh, struct sock *sk); 178 181 int udp_gro_complete(struct sk_buff *skb, int nhoff, udp_lookup_t lookup);
+1 -2
net/ipv6/ip6_input.c
··· 32 32 33 33 #include <net/sock.h> 34 34 #include <net/snmp.h> 35 + #include <net/udp.h> 35 36 36 37 #include <net/ipv6.h> 37 38 #include <net/protocol.h> ··· 45 44 #include <net/inet_ecn.h> 46 45 #include <net/dst_metadata.h> 47 46 48 - INDIRECT_CALLABLE_DECLARE(void udp_v6_early_demux(struct sk_buff *)); 49 47 INDIRECT_CALLABLE_DECLARE(void tcp_v6_early_demux(struct sk_buff *)); 50 48 static void ip6_rcv_finish_core(struct net *net, struct sock *sk, 51 49 struct sk_buff *skb) ··· 352 352 ip6_sublist_rcv(&sublist, curr_dev, curr_net); 353 353 } 354 354 355 - INDIRECT_CALLABLE_DECLARE(int udpv6_rcv(struct sk_buff *)); 356 355 INDIRECT_CALLABLE_DECLARE(int tcp_v6_rcv(struct sk_buff *)); 357 356 358 357 /*