[PATCH] include/linux/udp.h - remove duplicate include - Kernel

This is a discussion on [PATCH] include/linux/udp.h - remove duplicate include - Kernel ; Remove duplicate #include Combine #ifdef __KERNEL__ blocks Signed-off-by: Joe Perches include/linux/udp.h | 18 +++++++----------- 1 files changed, 7 insertions(+), 11 deletions(-) diff --git a/include/linux/udp.h b/include/linux/udp.h index 8ec703f..d3730a8 100644 --- a/include/linux/udp.h +++ b/include/linux/udp.h @@ -26,15 +26,6 @@ struct udphdr { __sum16 ...

+ Reply to Thread
Results 1 to 2 of 2

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

  1. [PATCH] include/linux/udp.h - remove duplicate include

    Remove duplicate #include
    Combine #ifdef __KERNEL__ blocks

    Signed-off-by: Joe Perches

    include/linux/udp.h | 18 +++++++-----------
    1 files changed, 7 insertions(+), 11 deletions(-)

    diff --git a/include/linux/udp.h b/include/linux/udp.h
    index 8ec703f..d3730a8 100644
    --- a/include/linux/udp.h
    +++ b/include/linux/udp.h
    @@ -26,15 +26,6 @@ struct udphdr {
    __sum16 check;
    };

    -#ifdef __KERNEL__
    -#include
    -
    -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
    -
    #include
    +#include
    +
    +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 {


    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  2. Re: [PATCH] include/linux/udp.h - remove duplicate include

    From: Joe Perches
    Date: Sun, 09 Mar 2008 16:55:45 -0700

    > Remove duplicate #include
    > Combine #ifdef __KERNEL__ blocks
    >
    > Signed-off-by: Joe Perches


    Applied.
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

+ Reply to Thread