From: "rae l" <crquan@gmail.com>
To: "David S. Miller" <davem@davemloft.net>
Cc: "Networking Team" <netdev@vger.kernel.org>,
"Linux Kernel" <linux-kernel@vger.kernel.org>,
"Adrian Bunk" <trivial@kernel.org>
Subject: [PATCH] merge dst_discard in & out into one, this decrements the vmlinux image by 21 bytes under i386 arch.
Date: Mon, 28 May 2007 10:41:20 +0800 [thread overview]
Message-ID: <91b13c310705271941n48e266b9vc202b862ad4fabba@mail.gmail.com> (raw)
From: Denis Cheng
thus the definition of dst_discard_in and dst_discard_out is the same,
we can define a dst_discard function and map the _in and _out to it,
this can reduce space in vmlinux.
Signed-off-by: Denis Cheng <crquan@gmail.com>
---
diff --git a/net/core/dst.c b/net/core/dst.c
index 764bccb..daa0439 100644
--- a/net/core/dst.c
+++ b/net/core/dst.c
@@ -111,17 +111,14 @@ out:
spin_unlock(&dst_lock);
}
-static int dst_discard_in(struct sk_buff *skb)
+static int dst_discard(struct sk_buff *skb)
{
kfree_skb(skb);
return 0;
}
-static int dst_discard_out(struct sk_buff *skb)
-{
- kfree_skb(skb);
- return 0;
-}
+#define dst_discard_in dst_discard
+#define dst_discard_out dst_discard
void * dst_alloc(struct dst_ops * ops)
{
--
Denis Cheng
Linux Application Developer
next reply other threads:[~2007-05-28 2:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-28 2:41 rae l [this message]
2007-05-28 9:50 ` Jan Engelhardt
2007-05-28 10:35 ` rae l
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=91b13c310705271941n48e266b9vc202b862ad4fabba@mail.gmail.com \
--to=crquan@gmail.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=trivial@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
all inboxes | Powered by JetHome®