Skip to contentSkip to conversation

include/linux/icmpv6.h - remove duplicate include

PATCH In review Joe Perches 2 participants 4 messages Mar 9, 2008 – Mar 24, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 include/linux/icmpv6.h - remove duplicate include

Remove duplicate #include <linux/skbuff.h>
Combine #ifdef __KERNEL__ blocks
Neaten function prototypes

 include/linux/icmpv6.h |   32 +++++++++++---------------------
 1 files changed, 11 insertions(+), 21 deletions(-)
include/linux/icmpv6.h +11 -21
index 7c5e981..5185ffa 100644
@@ -75,15 +75,6 @@ struct icmp6hdr {
 #define icmp6_router_pref	icmp6_dataun.u_nd_ra.router_pref
 };
 
-#ifdef __KERNEL__
-#include <linux/skbuff.h>
-
-static inline struct icmp6hdr *icmp6_hdr(const struct sk_buff *skb)
-{
-	return (struct icmp6hdr *)skb_transport_header(skb);
-}
-#endif
-
 #define ICMPV6_ROUTER_PREF_LOW		0x3
 #define ICMPV6_ROUTER_PREF_MEDIUM	0x0
 #define ICMPV6_ROUTER_PREF_HIGH		0x1
@@ -166,22 +157,21 @@ struct icmp6_filter {
 #define MLD2_ALL_MCR_INIT { { { 0xff,0x02,0,0,0,0,0,0,0,0,0,0,0,0,0,0x16 } } }
 
 #ifdef __KERNEL__
-
-#include <linux/netdevice.h>
 #include <linux/skbuff.h>
+#include <linux/netdevice.h>
 
+static inline struct icmp6hdr *icmp6_hdr(const struct sk_buff *skb)
+{
+	return (struct icmp6hdr *)skb_transport_header(skb);
+}
 
-extern void				icmpv6_send(struct sk_buff *skb,
-						    int type, int code,
-						    __u32 info, 
-						    struct net_device *dev);
+extern void icmpv6_send(struct sk_buff *skb, int type, int code, __u32 info,
+			struct net_device *dev);
 
-extern int				icmpv6_init(struct net_proto_family *ops);
-extern int				icmpv6_err_convert(int type, int code,
-							   int *err);
-extern void				icmpv6_cleanup(void);
-extern void				icmpv6_param_prob(struct sk_buff *skb,
-							  int code, int pos);
+extern int icmpv6_init(struct net_proto_family *ops);
+extern int icmpv6_err_convert(int type, int code, int *err);
+extern void icmpv6_cleanup(void);
+extern void icmpv6_param_prob(struct sk_buff *skb, int code, int pos);
 #endif
 
 #endif
#2 lore raw

PATCH 1/2 include/linux/icmpv6.h - Remove duplicate include, combine #ifdef __KERNEL__ sections

Quoted 1 line · David Miller

Does not apply to net-2.6.26, dropped.

---
 include/linux/icmpv6.h |   13 ++++---------
 1 files changed, 4 insertions(+), 9 deletions(-)
include/linux/icmpv6.h +4 -9
index 0306744..c1a30c7 100644
@@ -75,15 +75,6 @@ struct icmp6hdr {
 #define icmp6_router_pref	icmp6_dataun.u_nd_ra.router_pref
 };
 
-#ifdef __KERNEL__
-#include <linux/skbuff.h>
-
-static inline struct icmp6hdr *icmp6_hdr(const struct sk_buff *skb)
-{
-	return (struct icmp6hdr *)skb_transport_header(skb);
-}
-#endif
-
 #define ICMPV6_ROUTER_PREF_LOW		0x3
 #define ICMPV6_ROUTER_PREF_MEDIUM	0x0
 #define ICMPV6_ROUTER_PREF_HIGH		0x1
@@ -170,6 +161,10 @@ struct icmp6_filter {
 #include <linux/netdevice.h>
 #include <linux/skbuff.h>
 
+static inline struct icmp6hdr *icmp6_hdr(const struct sk_buff *skb)
+{
+	return (struct icmp6hdr *)skb_transport_header(skb);
+}
 
 extern void				icmpv6_send(struct sk_buff *skb,
 						    int type, int code,
Signature · 1 line
1.5.4.rc2
#3 lore raw

Subject: [PATCH 2/2] include/linux/icmpv6.h - neaten prototypes

In reply to David Miller
Quoted 1 line · David Miller

Does not apply to net-2.6.26, dropped.

---
 include/linux/icmpv6.h |   27 ++++++++++-----------------
 1 files changed, 10 insertions(+), 17 deletions(-)
include/linux/icmpv6.h +10 -17
index c1a30c7..5f39689 100644
@@ -166,26 +166,19 @@ static inline struct icmp6hdr *icmp6_hdr(const struct sk_buff *skb)
 	return (struct icmp6hdr *)skb_transport_header(skb);
 }
 
-extern void				icmpv6_send(struct sk_buff *skb,
-						    int type, int code,
-						    __u32 info, 
-						    struct net_device *dev);
-
-extern int				icmpv6_init(void);
-extern int				icmpv6_err_convert(int type, int code,
-							   int *err);
-extern void				icmpv6_cleanup(void);
-extern void				icmpv6_param_prob(struct sk_buff *skb,
-							  int code, int pos);
+extern void icmpv6_send(struct sk_buff *skb, int type, int code, __u32 info, 
+			struct net_device *dev);
+
+extern int icmpv6_init(void);
+extern int icmpv6_err_convert(int type, int code, int *err);
+extern void icmpv6_cleanup(void);
+extern void icmpv6_param_prob(struct sk_buff *skb, int code, int pos);
 
 struct flowi;
 struct in6_addr;
-extern void				icmpv6_flow_init(struct sock *sk,
-							 struct flowi *fl,
-							 u8 type,
-							 const struct in6_addr *saddr,
-							 const struct in6_addr *daddr,
-							 int oif);
+extern void icmpv6_flow_init(struct sock *sk, struct flowi *fl, u8 type,
+			     const struct in6_addr *saddr,
+			     const struct in6_addr *daddr, int oif);
 #endif
 
 #endif
Signature · 1 line
1.5.4.rc2