[NET]: include/linux/udp.h - remove duplicate include
authorJoe Perches <joe@perches.com>
Mon, 24 Mar 2008 05:06:51 +0000 (22:06 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 24 Mar 2008 05:06:51 +0000 (22:06 -0700)
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>
include/linux/udp.h

index 1e7b7cb5703b2a5f6610a21446091ee2b3455cdd..581ca2c14c52a96f483cc3b073c1e7e5af57c96f 100644 (file)
@@ -26,15 +26,6 @@ struct udphdr {
        __sum16 check;
 };
 
-#ifdef __KERNEL__
-#include <linux/skbuff.h>
-
-static inline struct udphdr *udp_hdr(const struct sk_buff *skb)
-{
-       return (struct udphdr *)skb_transport_header(skb);
-}
-#endif
-
 /* UDP socket options */
 #define UDP_CORK       1       /* Never send partially complete segments */
 #define UDP_ENCAP      100     /* Set the socket to accept encapsulated packets */
@@ -45,9 +36,14 @@ static inline struct udphdr *udp_hdr(const struct sk_buff *skb)
 #define UDP_ENCAP_L2TPINUDP    3 /* rfc2661 */
 
 #ifdef __KERNEL__
-#include <linux/types.h>
-
 #include <net/inet_sock.h>
+#include <linux/skbuff.h>
+
+static inline struct udphdr *udp_hdr(const struct sk_buff *skb)
+{
+       return (struct udphdr *)skb_transport_header(skb);
+}
+
 #define UDP_HTABLE_SIZE                128
 
 struct udp_sock {