Skip to content

Commit 21100cc

Browse files
Wang LiangNipaLocal
authored andcommitted
net: ipv4: Remove extern udp_v4_early_demux()/tcp_v4_early_demux() in .c files
Function udp_v4_early_demux() was already declared in 'include/net/udp.h', no need to keep the extern in 'ip_input.c', which may produce the following checkpatch warning: WARNING: externs should be avoided in .c files kernel-patches#45: FILE: net/ipv4/ip_input.c:322: +enum skb_drop_reason udp_v4_early_demux(struct sk_buff *skb); Replace it by including 'net/udp.h'. Do the same for tcp_v4_early_demux(). Signed-off-by: Wang Liang <[email protected]> Signed-off-by: NipaLocal <nipa@local>
1 parent c3a2eca commit 21100cc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

net/ipv4/ip_input.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,8 @@
141141
#include <linux/mroute.h>
142142
#include <linux/netlink.h>
143143
#include <net/dst_metadata.h>
144+
#include <net/udp.h>
145+
#include <net/tcp.h>
144146

145147
/*
146148
* Process Router Attention IP option (RFC 2113)
@@ -317,8 +319,6 @@ static bool ip_can_use_hint(const struct sk_buff *skb, const struct iphdr *iph,
317319
ip_hdr(hint)->tos == iph->tos;
318320
}
319321

320-
int tcp_v4_early_demux(struct sk_buff *skb);
321-
enum skb_drop_reason udp_v4_early_demux(struct sk_buff *skb);
322322
static int ip_rcv_finish_core(struct net *net,
323323
struct sk_buff *skb, struct net_device *dev,
324324
const struct sk_buff *hint)

0 commit comments

Comments
 (0)