Commit 310afe86af8ddd96a06b75aa61ef1af233f80e89

Authored by Joe Perches
Committed by David S. Miller
1 parent cc32e05416

[NET]: include/linux/udp.h - remove duplicate include

Remove duplicate #include <linux/types.h>
Combine #ifdef __KERNEL__ blocks

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Showing 1 changed file with 7 additions and 11 deletions Side-by-side Diff

... ... @@ -26,15 +26,6 @@
26 26 __sum16 check;
27 27 };
28 28  
29   -#ifdef __KERNEL__
30   -#include <linux/skbuff.h>
31   -
32   -static inline struct udphdr *udp_hdr(const struct sk_buff *skb)
33   -{
34   - return (struct udphdr *)skb_transport_header(skb);
35   -}
36   -#endif
37   -
38 29 /* UDP socket options */
39 30 #define UDP_CORK 1 /* Never send partially complete segments */
40 31 #define UDP_ENCAP 100 /* Set the socket to accept encapsulated packets */
41 32  
... ... @@ -45,9 +36,14 @@
45 36 #define UDP_ENCAP_L2TPINUDP 3 /* rfc2661 */
46 37  
47 38 #ifdef __KERNEL__
48   -#include <linux/types.h>
49   -
50 39 #include <net/inet_sock.h>
  40 +#include <linux/skbuff.h>
  41 +
  42 +static inline struct udphdr *udp_hdr(const struct sk_buff *skb)
  43 +{
  44 + return (struct udphdr *)skb_transport_header(skb);
  45 +}
  46 +
51 47 #define UDP_HTABLE_SIZE 128
52 48  
53 49 struct udp_sock {