* [2.6 patch] net/ipvs/: make some code static
@ 2004-12-15 0:58 Adrian Bunk
2004-12-15 15:26 ` Wensong Zhang
2004-12-28 3:16 ` David S. Miller
0 siblings, 2 replies; 3+ messages in thread
From: Adrian Bunk @ 2004-12-15 0:58 UTC (permalink / raw)
To: wensong, ja; +Cc: lvs-users, netdev, linux-kernel
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,
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [2.6 patch] net/ipvs/: make some code static
2004-12-15 0:58 [2.6 patch] net/ipvs/: make some code static Adrian Bunk
@ 2004-12-15 15:26 ` Wensong Zhang
2004-12-28 3:16 ` David S. Miller
1 sibling, 0 replies; 3+ messages in thread
From: Wensong Zhang @ 2004-12-15 15:26 UTC (permalink / raw)
To: David S. Miller
Cc: Adrian Bunk, Julian Anastasov, lvs-users, netdev, linux-kernel
Hi Dave,
Please apply Adrian's patch.
Thanks,
Wensong
On Wed, 15 Dec 2004, Adrian Bunk wrote:
> 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,
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [2.6 patch] net/ipvs/: make some code static
2004-12-15 0:58 [2.6 patch] net/ipvs/: make some code static Adrian Bunk
2004-12-15 15:26 ` Wensong Zhang
@ 2004-12-28 3:16 ` David S. Miller
1 sibling, 0 replies; 3+ messages in thread
From: David S. Miller @ 2004-12-28 3:16 UTC (permalink / raw)
To: Adrian Bunk; +Cc: wensong, ja, lvs-users, netdev, linux-kernel
On Wed, 15 Dec 2004 01:58:01 +0100
Adrian Bunk <bunk@stusta.de> wrote:
> The patch below makes some needlessly global code static.
Applied, thanks Adrian.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-12-28 3:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-15 0:58 [2.6 patch] net/ipvs/: make some code static Adrian Bunk
2004-12-15 15:26 ` Wensong Zhang
2004-12-28 3:16 ` David S. Miller
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).