netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Netfilter: remove inlining of resolve_normal_ct
@ 2010-03-20 14:55 Christoph Paasch
  0 siblings, 0 replies; only message in thread
From: Christoph Paasch @ 2010-03-20 14:55 UTC (permalink / raw)
  To: netfilter-devel; +Cc: Christoph Paasch

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@gmail.com>
---
 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


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2010-03-20 14:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-20 14:55 [PATCH] Netfilter: remove inlining of resolve_normal_ct Christoph Paasch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).