[PATCH] Netfilter: remove inlining of resolve_normal_ct

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



According to the Linux CodingStyle-Guidelines, inlining of functions with more
than 3 lines is discouraged.

Gcc is able to optimize itself the unique call to resolve_normal_ct. Thus, the
inline statement just increases the complexity of the code.

Signed-off-by: Christoph Paasch <christoph.paasch@xxxxxxxxx>
---
 net/netfilter/nf_conntrack_core.c |   19 +++++++++----------
 1 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c
index 0c9bbe9..9358025 100644
--- a/net/netfilter/nf_conntrack_core.c
+++ b/net/netfilter/nf_conntrack_core.c
@@ -730,16 +730,15 @@ init_conntrack(struct net *net, struct nf_conn *tmpl,
 }
 
 /* On success, returns conntrack ptr, sets skb->nfct and ctinfo */
-static inline struct nf_conn *
-resolve_normal_ct(struct net *net, struct nf_conn *tmpl,
-		  struct sk_buff *skb,
-		  unsigned int dataoff,
-		  u_int16_t l3num,
-		  u_int8_t protonum,
-		  struct nf_conntrack_l3proto *l3proto,
-		  struct nf_conntrack_l4proto *l4proto,
-		  int *set_reply,
-		  enum ip_conntrack_info *ctinfo)
+static struct nf_conn *resolve_normal_ct(struct net *net, struct nf_conn *tmpl,
+					 struct sk_buff *skb,
+					 unsigned int dataoff,
+					 u_int16_t l3num,
+					 u_int8_t protonum,
+					 struct nf_conntrack_l3proto *l3proto,
+					 struct nf_conntrack_l4proto *l4proto,
+					 int *set_reply,
+					 enum ip_conntrack_info *ctinfo)
 {
 	struct nf_conntrack_tuple tuple;
 	struct nf_conntrack_tuple_hash *h;
-- 
1.6.3.3

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux