Re: [PATCH 11/12] netfilter: Remove extern from function prototypes

2013-09-28 Thread Jan Engelhardt
On Monday 2013-09-23 20:37, Joe Perches wrote:

>There are a mix of function prototypes with and without extern
>in the kernel sources.  Standardize on not using extern for
>function prototypes.
>
>Function prototypes don't need to be written with extern.
>extern is assumed by the compiler.  Its use is as unnecessary as
>using auto to declare automatic/local variables in a block.

Or you could just extern all functions for consistency with variables.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 11/12] netfilter: Remove extern from function prototypes

2013-09-28 Thread Jan Engelhardt
On Monday 2013-09-23 20:37, Joe Perches wrote:

There are a mix of function prototypes with and without extern
in the kernel sources.  Standardize on not using extern for
function prototypes.

Function prototypes don't need to be written with extern.
extern is assumed by the compiler.  Its use is as unnecessary as
using auto to declare automatic/local variables in a block.

Or you could just extern all functions for consistency with variables.
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 11/12] netfilter: Remove extern from function prototypes

2013-09-23 Thread Joe Perches
There are a mix of function prototypes with and without extern
in the kernel sources.  Standardize on not using extern for
function prototypes.

Function prototypes don't need to be written with extern.
extern is assumed by the compiler.  Its use is as unnecessary as
using auto to declare automatic/local variables in a block.

Signed-off-by: Joe Perches 
---
 include/net/netfilter/ipv4/nf_conntrack_ipv4.h |  6 +--
 include/net/netfilter/ipv4/nf_defrag_ipv4.h|  2 +-
 include/net/netfilter/ipv6/nf_defrag_ipv6.h| 17 +++
 include/net/netfilter/nf_conntrack.h   | 69 +++---
 include/net/netfilter/nf_conntrack_acct.h  | 12 ++---
 include/net/netfilter/nf_conntrack_core.h  | 69 --
 include/net/netfilter/nf_conntrack_ecache.h| 22 
 include/net/netfilter/nf_conntrack_extend.h|  2 +-
 include/net/netfilter/nf_conntrack_helper.h| 40 ---
 include/net/netfilter/nf_conntrack_l3proto.h   | 16 +++---
 include/net/netfilter/nf_conntrack_l4proto.h   | 32 ++--
 include/net/netfilter/nf_conntrack_seqadj.h| 30 +--
 include/net/netfilter/nf_conntrack_synproxy.h  | 28 +--
 include/net/netfilter/nf_conntrack_timeout.h   |  4 +-
 include/net/netfilter/nf_conntrack_timestamp.h |  8 +--
 include/net/netfilter/nf_nat.h | 10 ++--
 include/net/netfilter/nf_nat_core.h|  8 ++-
 include/net/netfilter/nf_nat_helper.h  | 29 ---
 include/net/netfilter/nf_nat_l3proto.h | 23 -
 include/net/netfilter/nf_nat_l4proto.h | 30 +--
 include/net/netfilter/nf_queue.h   |  2 +-
 include/net/netfilter/xt_rateest.h |  4 +-
 22 files changed, 217 insertions(+), 246 deletions(-)

diff --git a/include/net/netfilter/ipv4/nf_conntrack_ipv4.h 
b/include/net/netfilter/ipv4/nf_conntrack_ipv4.h
index 7573d52..6c3d12e 100644
--- a/include/net/netfilter/ipv4/nf_conntrack_ipv4.h
+++ b/include/net/netfilter/ipv4/nf_conntrack_ipv4.h
@@ -16,9 +16,9 @@ extern struct nf_conntrack_l4proto nf_conntrack_l4proto_tcp4;
 extern struct nf_conntrack_l4proto nf_conntrack_l4proto_udp4;
 extern struct nf_conntrack_l4proto nf_conntrack_l4proto_icmp;
 
-extern int nf_conntrack_ipv4_compat_init(void);
-extern void nf_conntrack_ipv4_compat_fini(void);
+int nf_conntrack_ipv4_compat_init(void);
+void nf_conntrack_ipv4_compat_fini(void);
 
-extern void need_ipv4_conntrack(void);
+void need_ipv4_conntrack(void);
 
 #endif /*_NF_CONNTRACK_IPV4_H*/
diff --git a/include/net/netfilter/ipv4/nf_defrag_ipv4.h 
b/include/net/netfilter/ipv4/nf_defrag_ipv4.h
index 6b00ea3..f01ef20 100644
--- a/include/net/netfilter/ipv4/nf_defrag_ipv4.h
+++ b/include/net/netfilter/ipv4/nf_defrag_ipv4.h
@@ -1,6 +1,6 @@
 #ifndef _NF_DEFRAG_IPV4_H
 #define _NF_DEFRAG_IPV4_H
 
-extern void nf_defrag_ipv4_enable(void);
+void nf_defrag_ipv4_enable(void);
 
 #endif /* _NF_DEFRAG_IPV4_H */
diff --git a/include/net/netfilter/ipv6/nf_defrag_ipv6.h 
b/include/net/netfilter/ipv6/nf_defrag_ipv6.h
index fd79c9a..5613412 100644
--- a/include/net/netfilter/ipv6/nf_defrag_ipv6.h
+++ b/include/net/netfilter/ipv6/nf_defrag_ipv6.h
@@ -1,15 +1,14 @@
 #ifndef _NF_DEFRAG_IPV6_H
 #define _NF_DEFRAG_IPV6_H
 
-extern void nf_defrag_ipv6_enable(void);
-
-extern int nf_ct_frag6_init(void);
-extern void nf_ct_frag6_cleanup(void);
-extern struct sk_buff *nf_ct_frag6_gather(struct sk_buff *skb, u32 user);
-extern void nf_ct_frag6_output(unsigned int hooknum, struct sk_buff *skb,
-  struct net_device *in,
-  struct net_device *out,
-  int (*okfn)(struct sk_buff *));
+void nf_defrag_ipv6_enable(void);
+
+int nf_ct_frag6_init(void);
+void nf_ct_frag6_cleanup(void);
+struct sk_buff *nf_ct_frag6_gather(struct sk_buff *skb, u32 user);
+void nf_ct_frag6_output(unsigned int hooknum, struct sk_buff *skb,
+   struct net_device *in, struct net_device *out,
+   int (*okfn)(struct sk_buff *));
 
 struct inet_frags_ctl;
 
diff --git a/include/net/netfilter/nf_conntrack.h 
b/include/net/netfilter/nf_conntrack.h
index 0c1288a..01ea6ee 100644
--- a/include/net/netfilter/nf_conntrack.h
+++ b/include/net/netfilter/nf_conntrack.h
@@ -139,15 +139,13 @@ static inline struct net *nf_ct_net(const struct nf_conn 
*ct)
 }
 
 /* Alter reply tuple (maybe alter helper). */
-extern void
-nf_conntrack_alter_reply(struct nf_conn *ct,
-const struct nf_conntrack_tuple *newreply);
+void nf_conntrack_alter_reply(struct nf_conn *ct,
+ const struct nf_conntrack_tuple *newreply);
 
 /* Is this tuple taken? (ignoring any belonging to the given
conntrack). */
-extern int
-nf_conntrack_tuple_taken(const struct nf_conntrack_tuple *tuple,
-const struct nf_conn *ignored_conntrack);
+int nf_conntrack_tuple_taken(const struct nf_conntrack_tuple *tuple,
+ 

[PATCH 11/12] netfilter: Remove extern from function prototypes

2013-09-23 Thread Joe Perches
There are a mix of function prototypes with and without extern
in the kernel sources.  Standardize on not using extern for
function prototypes.

Function prototypes don't need to be written with extern.
extern is assumed by the compiler.  Its use is as unnecessary as
using auto to declare automatic/local variables in a block.

Signed-off-by: Joe Perches j...@perches.com
---
 include/net/netfilter/ipv4/nf_conntrack_ipv4.h |  6 +--
 include/net/netfilter/ipv4/nf_defrag_ipv4.h|  2 +-
 include/net/netfilter/ipv6/nf_defrag_ipv6.h| 17 +++
 include/net/netfilter/nf_conntrack.h   | 69 +++---
 include/net/netfilter/nf_conntrack_acct.h  | 12 ++---
 include/net/netfilter/nf_conntrack_core.h  | 69 --
 include/net/netfilter/nf_conntrack_ecache.h| 22 
 include/net/netfilter/nf_conntrack_extend.h|  2 +-
 include/net/netfilter/nf_conntrack_helper.h| 40 ---
 include/net/netfilter/nf_conntrack_l3proto.h   | 16 +++---
 include/net/netfilter/nf_conntrack_l4proto.h   | 32 ++--
 include/net/netfilter/nf_conntrack_seqadj.h| 30 +--
 include/net/netfilter/nf_conntrack_synproxy.h  | 28 +--
 include/net/netfilter/nf_conntrack_timeout.h   |  4 +-
 include/net/netfilter/nf_conntrack_timestamp.h |  8 +--
 include/net/netfilter/nf_nat.h | 10 ++--
 include/net/netfilter/nf_nat_core.h|  8 ++-
 include/net/netfilter/nf_nat_helper.h  | 29 ---
 include/net/netfilter/nf_nat_l3proto.h | 23 -
 include/net/netfilter/nf_nat_l4proto.h | 30 +--
 include/net/netfilter/nf_queue.h   |  2 +-
 include/net/netfilter/xt_rateest.h |  4 +-
 22 files changed, 217 insertions(+), 246 deletions(-)

diff --git a/include/net/netfilter/ipv4/nf_conntrack_ipv4.h 
b/include/net/netfilter/ipv4/nf_conntrack_ipv4.h
index 7573d52..6c3d12e 100644
--- a/include/net/netfilter/ipv4/nf_conntrack_ipv4.h
+++ b/include/net/netfilter/ipv4/nf_conntrack_ipv4.h
@@ -16,9 +16,9 @@ extern struct nf_conntrack_l4proto nf_conntrack_l4proto_tcp4;
 extern struct nf_conntrack_l4proto nf_conntrack_l4proto_udp4;
 extern struct nf_conntrack_l4proto nf_conntrack_l4proto_icmp;
 
-extern int nf_conntrack_ipv4_compat_init(void);
-extern void nf_conntrack_ipv4_compat_fini(void);
+int nf_conntrack_ipv4_compat_init(void);
+void nf_conntrack_ipv4_compat_fini(void);
 
-extern void need_ipv4_conntrack(void);
+void need_ipv4_conntrack(void);
 
 #endif /*_NF_CONNTRACK_IPV4_H*/
diff --git a/include/net/netfilter/ipv4/nf_defrag_ipv4.h 
b/include/net/netfilter/ipv4/nf_defrag_ipv4.h
index 6b00ea3..f01ef20 100644
--- a/include/net/netfilter/ipv4/nf_defrag_ipv4.h
+++ b/include/net/netfilter/ipv4/nf_defrag_ipv4.h
@@ -1,6 +1,6 @@
 #ifndef _NF_DEFRAG_IPV4_H
 #define _NF_DEFRAG_IPV4_H
 
-extern void nf_defrag_ipv4_enable(void);
+void nf_defrag_ipv4_enable(void);
 
 #endif /* _NF_DEFRAG_IPV4_H */
diff --git a/include/net/netfilter/ipv6/nf_defrag_ipv6.h 
b/include/net/netfilter/ipv6/nf_defrag_ipv6.h
index fd79c9a..5613412 100644
--- a/include/net/netfilter/ipv6/nf_defrag_ipv6.h
+++ b/include/net/netfilter/ipv6/nf_defrag_ipv6.h
@@ -1,15 +1,14 @@
 #ifndef _NF_DEFRAG_IPV6_H
 #define _NF_DEFRAG_IPV6_H
 
-extern void nf_defrag_ipv6_enable(void);
-
-extern int nf_ct_frag6_init(void);
-extern void nf_ct_frag6_cleanup(void);
-extern struct sk_buff *nf_ct_frag6_gather(struct sk_buff *skb, u32 user);
-extern void nf_ct_frag6_output(unsigned int hooknum, struct sk_buff *skb,
-  struct net_device *in,
-  struct net_device *out,
-  int (*okfn)(struct sk_buff *));
+void nf_defrag_ipv6_enable(void);
+
+int nf_ct_frag6_init(void);
+void nf_ct_frag6_cleanup(void);
+struct sk_buff *nf_ct_frag6_gather(struct sk_buff *skb, u32 user);
+void nf_ct_frag6_output(unsigned int hooknum, struct sk_buff *skb,
+   struct net_device *in, struct net_device *out,
+   int (*okfn)(struct sk_buff *));
 
 struct inet_frags_ctl;
 
diff --git a/include/net/netfilter/nf_conntrack.h 
b/include/net/netfilter/nf_conntrack.h
index 0c1288a..01ea6ee 100644
--- a/include/net/netfilter/nf_conntrack.h
+++ b/include/net/netfilter/nf_conntrack.h
@@ -139,15 +139,13 @@ static inline struct net *nf_ct_net(const struct nf_conn 
*ct)
 }
 
 /* Alter reply tuple (maybe alter helper). */
-extern void
-nf_conntrack_alter_reply(struct nf_conn *ct,
-const struct nf_conntrack_tuple *newreply);
+void nf_conntrack_alter_reply(struct nf_conn *ct,
+ const struct nf_conntrack_tuple *newreply);
 
 /* Is this tuple taken? (ignoring any belonging to the given
conntrack). */
-extern int
-nf_conntrack_tuple_taken(const struct nf_conntrack_tuple *tuple,
-const struct nf_conn *ignored_conntrack);
+int nf_conntrack_tuple_taken(const struct nf_conntrack_tuple