From: Adrian Bunk <bunk@stusta.de>
To: wensong@linux-vs.org, ja@ssi.bg
Cc: lvs-users@linuxvirtualserver.org, netdev@oss.sgi.com,
linux-kernel@vger.kernel.org
Subject: [2.6 patch] net/ipvs/: make some code static
Date: Wed, 15 Dec 2004 01:58:01 +0100 [thread overview]
Message-ID: <20041215005801.GB11972@stusta.de> (raw)
The patch below makes some needlessly global code static.
diffstat output:
net/ipv4/ipvs/ip_vs_app.c | 2 +-
net/ipv4/ipvs/ip_vs_conn.c | 2 +-
net/ipv4/ipvs/ip_vs_ctl.c | 2 +-
net/ipv4/ipvs/ip_vs_proto.c | 4 ++--
net/ipv4/ipvs/ip_vs_proto_icmp.c | 4 ++--
5 files changed, 7 insertions(+), 7 deletions(-)
Signed-off-by: Adrian Bunk <bunk@stusta.de>
--- linux-2.6.10-rc3-mm1-full/net/ipv4/ipvs/ip_vs_app.c.old 2004-12-14 05:15:21.000000000 +0100
+++ linux-2.6.10-rc3-mm1-full/net/ipv4/ipvs/ip_vs_app.c 2004-12-14 05:15:28.000000000 +0100
@@ -65,7 +65,7 @@
/*
* Allocate/initialize app incarnation and register it in proto apps.
*/
-int
+static int
ip_vs_app_inc_new(struct ip_vs_app *app, __u16 proto, __u16 port)
{
struct ip_vs_protocol *pp;
--- linux-2.6.10-rc3-mm1-full/net/ipv4/ipvs/ip_vs_conn.c.old 2004-12-14 05:15:44.000000000 +0100
+++ linux-2.6.10-rc3-mm1-full/net/ipv4/ipvs/ip_vs_conn.c 2004-12-14 05:15:51.000000000 +0100
@@ -64,7 +64,7 @@
} __attribute__((__aligned__(SMP_CACHE_BYTES)));
/* lock array for conn table */
-struct ip_vs_aligned_lock
+static struct ip_vs_aligned_lock
__ip_vs_conntbl_lock_array[CT_LOCKARRAY_SIZE] __cacheline_aligned;
static inline void ct_read_lock(unsigned key)
--- linux-2.6.10-rc3-mm1-full/net/ipv4/ipvs/ip_vs_ctl.c.old 2004-12-14 05:17:03.000000000 +0100
+++ linux-2.6.10-rc3-mm1-full/net/ipv4/ipvs/ip_vs_ctl.c 2004-12-14 05:17:14.000000000 +0100
@@ -62,7 +62,7 @@
/* 1/rate drop and drop-entry variables */
int ip_vs_drop_rate = 0;
int ip_vs_drop_counter = 0;
-atomic_t ip_vs_dropentry = ATOMIC_INIT(0);
+static atomic_t ip_vs_dropentry = ATOMIC_INIT(0);
/* number of virtual services */
static int ip_vs_num_services = 0;
--- linux-2.6.10-rc3-mm1-full/net/ipv4/ipvs/ip_vs_proto.c.old 2004-12-14 05:17:33.000000000 +0100
+++ linux-2.6.10-rc3-mm1-full/net/ipv4/ipvs/ip_vs_proto.c 2004-12-14 05:17:47.000000000 +0100
@@ -45,7 +45,7 @@
/*
* register an ipvs protocol
*/
-int register_ip_vs_protocol(struct ip_vs_protocol *pp)
+static int register_ip_vs_protocol(struct ip_vs_protocol *pp)
{
unsigned hash = IP_VS_PROTO_HASH(pp->protocol);
@@ -62,7 +62,7 @@
/*
* unregister an ipvs protocol
*/
-int unregister_ip_vs_protocol(struct ip_vs_protocol *pp)
+static int unregister_ip_vs_protocol(struct ip_vs_protocol *pp)
{
struct ip_vs_protocol **pp_p;
unsigned hash = IP_VS_PROTO_HASH(pp->protocol);
--- linux-2.6.10-rc3-mm1-full/net/ipv4/ipvs/ip_vs_proto_icmp.c.old 2004-12-14 05:18:02.000000000 +0100
+++ linux-2.6.10-rc3-mm1-full/net/ipv4/ipvs/ip_vs_proto_icmp.c 2004-12-14 05:18:37.000000000 +0100
@@ -22,7 +22,7 @@
static char * icmp_state_name_table[1] = { "ICMP" };
-struct ip_vs_conn *
+static struct ip_vs_conn *
icmp_conn_in_get(const struct sk_buff *skb,
struct ip_vs_protocol *pp,
const struct iphdr *iph,
@@ -49,7 +49,7 @@
#endif
}
-struct ip_vs_conn *
+static struct ip_vs_conn *
icmp_conn_out_get(const struct sk_buff *skb,
struct ip_vs_protocol *pp,
const struct iphdr *iph,
next reply other threads:[~2004-12-15 0:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-15 0:58 Adrian Bunk [this message]
2004-12-15 15:26 ` [2.6 patch] net/ipvs/: make some code static Wensong Zhang
2004-12-28 3:16 ` David S. Miller
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=20041215005801.GB11972@stusta.de \
--to=bunk@stusta.de \
--cc=ja@ssi.bg \
--cc=linux-kernel@vger.kernel.org \
--cc=lvs-users@linuxvirtualserver.org \
--cc=netdev@oss.sgi.com \
--cc=wensong@linux-vs.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).