netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Paasch <christoph.paasch@gmail.com>
To: netfilter-devel@vger.kernel.org
Cc: Christoph Paasch <christoph.paasch@gmail.com>
Subject: [PATCH] Netfilter: remove inlining of resolve_normal_ct
Date: Sat, 20 Mar 2010 15:55:19 +0100	[thread overview]
Message-ID: <1269096919-12193-1-git-send-email-christoph.paasch@gmail.com> (raw)

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


                 reply	other threads:[~2010-03-20 14:55 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1269096919-12193-1-git-send-email-christoph.paasch@gmail.com \
    --to=christoph.paasch@gmail.com \
    --cc=netfilter-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).