summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Bunk <bunk@stusta.de>2004-12-27 03:50:18 -0800
committerThomas Graf <tgraf@suug.ch>2004-12-27 03:50:18 -0800
commit4d0262fa65f644bb23f0de6db84ab7ac0aa128c2 (patch)
tree3f5977e9a6b99cee04d7df673a1c43d6d28fcf27
parentcc8eaf15d3d413135d8b9c986f13696e9e6dd21e (diff)
[IPV4]: Staticize and remove unneeded exports.
The patch below contains the following possible cleanups: - make some needlessly global code static - remove the following unused global functions: - fib_rules.c: fib_rules_map_destination - xfrm4_policy.: xfrm4_fini - remove the following unneeded EXPORT_SYMBOL: - tcp_timer.c: tcp_timer_bug_msg Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--include/net/ip.h2
-rw-r--r--include/net/ip_fib.h2
-rw-r--r--include/net/ipconfig.h11
-rw-r--r--include/net/tcp.h16
-rw-r--r--include/net/xfrm.h1
-rw-r--r--net/ipv4/af_inet.c8
-rw-r--r--net/ipv4/arp.c8
-rw-r--r--net/ipv4/devinet.c4
-rw-r--r--net/ipv4/fib_frontend.c6
-rw-r--r--net/ipv4/fib_rules.c8
-rw-r--r--net/ipv4/icmp.c4
-rw-r--r--net/ipv4/igmp.c16
-rw-r--r--net/ipv4/ip_gre.c6
-rw-r--r--net/ipv4/ip_sockglue.c2
-rw-r--r--net/ipv4/ipconfig.c12
-rw-r--r--net/ipv4/raw.c4
-rw-r--r--net/ipv4/route.c32
-rw-r--r--net/ipv4/tcp_input.c16
-rw-r--r--net/ipv4/tcp_minisocks.c4
-rw-r--r--net/ipv4/tcp_timer.c3
-rw-r--r--net/ipv4/udp.c13
-rw-r--r--net/ipv4/xfrm4_policy.c7
22 files changed, 77 insertions, 108 deletions
diff --git a/include/net/ip.h b/include/net/ip.h
index 15a1c6a2e534..02d783315f2e 100644
--- a/include/net/ip.h
+++ b/include/net/ip.h
@@ -295,8 +295,6 @@ extern void ip_icmp_error(struct sock *sk, struct sk_buff *skb, int err,
extern void ip_local_error(struct sock *sk, int err, u32 daddr, u16 dport,
u32 info);
-extern int ipv4_proc_init(void);
-
/* sysctl helpers - any sysctl which holds a value that ends up being
* fed into the routing cache should use these handlers.
*/
diff --git a/include/net/ip_fib.h b/include/net/ip_fib.h
index 48a6ea4c2565..9f28dfffb6c6 100644
--- a/include/net/ip_fib.h
+++ b/include/net/ip_fib.h
@@ -200,7 +200,6 @@ extern void fib_select_default(const struct flowi *flp, struct fib_result *res);
/* Exported by fib_frontend.c */
extern void ip_fib_init(void);
-extern void fib_flush(void);
extern int inet_rtm_delroute(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg);
extern int inet_rtm_newroute(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg);
extern int inet_rtm_getroute(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg);
@@ -226,7 +225,6 @@ extern struct fib_table *fib_hash_init(int id);
extern int inet_rtm_delrule(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg);
extern int inet_rtm_newrule(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg);
extern int inet_dump_rules(struct sk_buff *skb, struct netlink_callback *cb);
-extern u32 fib_rules_map_destination(u32 daddr, struct fib_result *res);
#ifdef CONFIG_NET_CLS_ROUTE
extern u32 fib_rules_tclass(struct fib_result *res);
#endif
diff --git a/include/net/ipconfig.h b/include/net/ipconfig.h
index faa9cef707c3..2a1fe996fbc6 100644
--- a/include/net/ipconfig.h
+++ b/include/net/ipconfig.h
@@ -8,14 +8,10 @@
/* The following are initdata: */
-extern int ic_enable; /* Enable or disable the whole shebang */
-
extern int ic_proto_enabled; /* Protocols enabled (see IC_xxx) */
-extern int ic_host_name_set; /* Host name set by ipconfig? */
extern int ic_set_manually; /* IPconfig parameters set manually */
extern u32 ic_myaddr; /* My IP address */
-extern u32 ic_netmask; /* Netmask for local subnet */
extern u32 ic_gateway; /* Gateway IP address */
extern u32 ic_servaddr; /* Boot server IP address */
@@ -24,13 +20,6 @@ extern u32 root_server_addr; /* Address of NFS server */
extern u8 root_server_path[]; /* Path to mount as root */
-
-/* The following are persistent (not initdata): */
-
-extern int ic_proto_used; /* Protocol used, if any */
-extern u32 ic_nameserver; /* DNS server IP address */
-extern u8 ic_domain[]; /* DNS (not NIS) domain name */
-
/* bits in ic_proto_{enabled,used} */
#define IC_PROTO 0xFF /* Protocols mask: */
#define IC_BOOTP 0x01 /* BOOTP (or DHCP, see below) */
diff --git a/include/net/tcp.h b/include/net/tcp.h
index f5bac4c9b704..c39b09da5015 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -315,7 +315,6 @@ static inline void tcp_tw_put(struct tcp_tw_bucket *tw)
extern atomic_t tcp_orphan_count;
extern int tcp_tw_count;
extern void tcp_time_wait(struct sock *sk, int state, int timeo);
-extern void tcp_tw_schedule(struct tcp_tw_bucket *tw, int timeo);
extern void tcp_tw_deschedule(struct tcp_tw_bucket *tw);
@@ -2020,21 +2019,6 @@ static inline void tcp_westwood_update_rtt(struct tcp_opt *tp, __u32 rtt_seq)
tp->westwood.rtt = rtt_seq;
}
-void __tcp_westwood_fast_bw(struct sock *, struct sk_buff *);
-void __tcp_westwood_slow_bw(struct sock *, struct sk_buff *);
-
-static inline void tcp_westwood_fast_bw(struct sock *sk, struct sk_buff *skb)
-{
- if (tcp_is_westwood(tcp_sk(sk)))
- __tcp_westwood_fast_bw(sk, skb);
-}
-
-static inline void tcp_westwood_slow_bw(struct sock *sk, struct sk_buff *skb)
-{
- if (tcp_is_westwood(tcp_sk(sk)))
- __tcp_westwood_slow_bw(sk, skb);
-}
-
static inline __u32 __tcp_westwood_bw_rttmin(const struct tcp_opt *tp)
{
return max((tp->westwood.bw_est) * (tp->westwood.rtt_min) /
diff --git a/include/net/xfrm.h b/include/net/xfrm.h
index 37d9d9467a00..d29831f449c1 100644
--- a/include/net/xfrm.h
+++ b/include/net/xfrm.h
@@ -782,7 +782,6 @@ struct xfrm6_tunnel {
extern void xfrm_init(void);
extern void xfrm4_init(void);
-extern void xfrm4_fini(void);
extern void xfrm6_init(void);
extern void xfrm6_fini(void);
extern void xfrm_state_init(void);
diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c
index 56872058ebce..19c9c4626875 100644
--- a/net/ipv4/af_inet.c
+++ b/net/ipv4/af_inet.c
@@ -659,7 +659,7 @@ int inet_sendmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *msg,
}
-ssize_t inet_sendpage(struct socket *sock, struct page *page, int offset, size_t size, int flags)
+static ssize_t inet_sendpage(struct socket *sock, struct page *page, int offset, size_t size, int flags)
{
struct sock *sk = sock->sk;
@@ -1011,7 +1011,7 @@ static int __init init_ipv4_mibs(void)
return 0;
}
-int ipv4_proc_init(void);
+static int ipv4_proc_init(void);
extern void ipfrag_init(void);
static int __init inet_init(void)
@@ -1136,7 +1136,7 @@ extern void tcp4_proc_exit(void);
extern int udp4_proc_init(void);
extern void udp4_proc_exit(void);
-int __init ipv4_proc_init(void)
+static int __init ipv4_proc_init(void)
{
int rc = 0;
@@ -1166,7 +1166,7 @@ out_raw:
}
#else /* CONFIG_PROC_FS */
-int __init ipv4_proc_init(void)
+static int __init ipv4_proc_init(void)
{
return 0;
}
diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c
index 9b5d1e813652..317d69336c64 100644
--- a/net/ipv4/arp.c
+++ b/net/ipv4/arp.c
@@ -704,7 +704,7 @@ static void parp_redo(struct sk_buff *skb)
* Process an arp request.
*/
-int arp_process(struct sk_buff *skb)
+static int arp_process(struct sk_buff *skb)
{
struct net_device *dev = skb->dev;
struct in_device *in_dev = in_dev_get(dev);
@@ -961,7 +961,7 @@ out_of_mem:
* Set (create) an ARP cache entry.
*/
-int arp_req_set(struct arpreq *r, struct net_device * dev)
+static int arp_req_set(struct arpreq *r, struct net_device * dev)
{
u32 ip = ((struct sockaddr_in *) &r->arp_pa)->sin_addr.s_addr;
struct neighbour *neigh;
@@ -1075,7 +1075,7 @@ static int arp_req_get(struct arpreq *r, struct net_device *dev)
return err;
}
-int arp_req_delete(struct arpreq *r, struct net_device * dev)
+static int arp_req_delete(struct arpreq *r, struct net_device * dev)
{
int err;
u32 ip = ((struct sockaddr_in *)&r->arp_pa)->sin_addr.s_addr;
@@ -1207,7 +1207,7 @@ static int arp_netdev_event(struct notifier_block *this, unsigned long event, vo
return NOTIFY_DONE;
}
-struct notifier_block arp_netdev_notifier = {
+static struct notifier_block arp_netdev_notifier = {
.notifier_call = arp_netdev_event,
};
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
index cb697aba93a2..7b6054d49271 100644
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
@@ -380,7 +380,7 @@ struct in_ifaddr *inet_ifa_byprefix(struct in_device *in_dev, u32 prefix,
return NULL;
}
-int inet_rtm_deladdr(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg)
+static int inet_rtm_deladdr(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg)
{
struct rtattr **rta = arg;
struct in_device *in_dev;
@@ -412,7 +412,7 @@ out:
return -EADDRNOTAVAIL;
}
-int inet_rtm_newaddr(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg)
+static int inet_rtm_newaddr(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg)
{
struct rtattr **rta = arg;
struct net_device *dev;
diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c
index 4ccd02f535f7..563e7d612706 100644
--- a/net/ipv4/fib_frontend.c
+++ b/net/ipv4/fib_frontend.c
@@ -75,7 +75,7 @@ struct fib_table *__fib_new_table(int id)
#endif /* CONFIG_IP_MULTIPLE_TABLES */
-void fib_flush(void)
+static void fib_flush(void)
{
int flushed = 0;
#ifdef CONFIG_IP_MULTIPLE_TABLES
@@ -585,11 +585,11 @@ static int fib_netdev_event(struct notifier_block *this, unsigned long event, vo
return NOTIFY_DONE;
}
-struct notifier_block fib_inetaddr_notifier = {
+static struct notifier_block fib_inetaddr_notifier = {
.notifier_call =fib_inetaddr_event,
};
-struct notifier_block fib_netdev_notifier = {
+static struct notifier_block fib_netdev_notifier = {
.notifier_call =fib_netdev_event,
};
diff --git a/net/ipv4/fib_rules.c b/net/ipv4/fib_rules.c
index e4b3af075657..f6675eef21cf 100644
--- a/net/ipv4/fib_rules.c
+++ b/net/ipv4/fib_rules.c
@@ -245,12 +245,6 @@ int inet_rtm_newrule(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg)
return 0;
}
-u32 fib_rules_map_destination(u32 daddr, struct fib_result *res)
-{
- u32 mask = inet_make_mask(res->prefixlen);
- return (daddr&~mask)|res->fi->fib_nh->nh_gw;
-}
-
#ifdef CONFIG_NET_CLS_ROUTE
u32 fib_rules_tclass(struct fib_result *res)
{
@@ -368,7 +362,7 @@ static int fib_rules_event(struct notifier_block *this, unsigned long event, voi
}
-struct notifier_block fib_rules_notifier = {
+static struct notifier_block fib_rules_notifier = {
.notifier_call =fib_rules_event,
};
diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c
index 74089ab9f74e..0be6e865c068 100644
--- a/net/ipv4/icmp.c
+++ b/net/ipv4/icmp.c
@@ -327,8 +327,8 @@ static void icmp_out_count(int type)
* Checksum each fragment, and on the first include the headers and final
* checksum.
*/
-int icmp_glue_bits(void *from, char *to, int offset, int len, int odd,
- struct sk_buff *skb)
+static int icmp_glue_bits(void *from, char *to, int offset, int len, int odd,
+ struct sk_buff *skb)
{
struct icmp_bxm *icmp_param = (struct icmp_bxm *)from;
unsigned int csum;
diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c
index fc0c27f25f6a..aa7e95a9c489 100644
--- a/net/ipv4/igmp.c
+++ b/net/ipv4/igmp.c
@@ -143,8 +143,8 @@ static int sf_setstate(struct ip_mc_list *pmc);
static void sf_markstate(struct ip_mc_list *pmc);
#endif
static void ip_mc_clear_src(struct ip_mc_list *pmc);
-int ip_mc_add_src(struct in_device *in_dev, __u32 *pmca, int sfmode,
- int sfcount, __u32 *psfsrc, int delta);
+static int ip_mc_add_src(struct in_device *in_dev, __u32 *pmca, int sfmode,
+ int sfcount, __u32 *psfsrc, int delta);
static void ip_ma_put(struct ip_mc_list *im)
{
@@ -1384,8 +1384,8 @@ static int ip_mc_del1_src(struct ip_mc_list *pmc, int sfmode,
#define igmp_ifc_event(x) do { } while (0)
#endif
-int ip_mc_del_src(struct in_device *in_dev, __u32 *pmca, int sfmode,
- int sfcount, __u32 *psfsrc, int delta)
+static int ip_mc_del_src(struct in_device *in_dev, __u32 *pmca, int sfmode,
+ int sfcount, __u32 *psfsrc, int delta)
{
struct ip_mc_list *pmc;
int changerec = 0;
@@ -1520,8 +1520,8 @@ static int sf_setstate(struct ip_mc_list *pmc)
/*
* Add multicast source filter list to the interface list
*/
-int ip_mc_add_src(struct in_device *in_dev, __u32 *pmca, int sfmode,
- int sfcount, __u32 *psfsrc, int delta)
+static int ip_mc_add_src(struct in_device *in_dev, __u32 *pmca, int sfmode,
+ int sfcount, __u32 *psfsrc, int delta)
{
struct ip_mc_list *pmc;
int isexclude;
@@ -1667,8 +1667,8 @@ done:
return err;
}
-int ip_mc_leave_src(struct sock *sk, struct ip_mc_socklist *iml,
- struct in_device *in_dev)
+static int ip_mc_leave_src(struct sock *sk, struct ip_mc_socklist *iml,
+ struct in_device *in_dev)
{
int err;
diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c
index 2c768ecc0a84..ce1e88c4c248 100644
--- a/net/ipv4/ip_gre.c
+++ b/net/ipv4/ip_gre.c
@@ -304,7 +304,7 @@ static void ipgre_tunnel_uninit(struct net_device *dev)
}
-void ipgre_err(struct sk_buff *skb, u32 info)
+static void ipgre_err(struct sk_buff *skb, u32 info)
{
#ifndef I_WISH_WORLD_WERE_PERFECT
@@ -552,7 +552,7 @@ ipgre_ecn_encapsulate(u8 tos, struct iphdr *old_iph, struct sk_buff *skb)
return INET_ECN_encapsulate(tos, inner);
}
-int ipgre_rcv(struct sk_buff *skb)
+static int ipgre_rcv(struct sk_buff *skb)
{
struct iphdr *iph;
u8 *h;
@@ -1279,7 +1279,7 @@ err1:
goto out;
}
-void ipgre_fini(void)
+static void ipgre_fini(void)
{
if (inet_del_protocol(&ipgre_protocol, IPPROTO_GRE) < 0)
printk(KERN_INFO "ipgre close: can't remove protocol\n");
diff --git a/net/ipv4/ip_sockglue.c b/net/ipv4/ip_sockglue.c
index d352252326c1..f1a3631aed81 100644
--- a/net/ipv4/ip_sockglue.c
+++ b/net/ipv4/ip_sockglue.c
@@ -92,7 +92,7 @@ static void ip_cmsg_recv_opts(struct msghdr *msg, struct sk_buff *skb)
}
-void ip_cmsg_recv_retopts(struct msghdr *msg, struct sk_buff *skb)
+static void ip_cmsg_recv_retopts(struct msghdr *msg, struct sk_buff *skb)
{
unsigned char optbuf[sizeof(struct ip_options) + 40];
struct ip_options * opt = (struct ip_options*)optbuf;
diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c
index f1c60e44a8da..86ade3d3e970 100644
--- a/net/ipv4/ipconfig.c
+++ b/net/ipv4/ipconfig.c
@@ -109,7 +109,7 @@
*/
int ic_set_manually __initdata = 0; /* IPconfig parameters set manually */
-int ic_enable __initdata = 0; /* IP config enabled? */
+static int ic_enable __initdata = 0; /* IP config enabled? */
/* Protocol choice */
int ic_proto_enabled __initdata = 0
@@ -124,10 +124,10 @@ int ic_proto_enabled __initdata = 0
#endif
;
-int ic_host_name_set __initdata = 0; /* Host name set by us? */
+static int ic_host_name_set __initdata = 0; /* Host name set by us? */
u32 ic_myaddr = INADDR_NONE; /* My IP address */
-u32 ic_netmask = INADDR_NONE; /* Netmask for local subnet */
+static u32 ic_netmask = INADDR_NONE; /* Netmask for local subnet */
u32 ic_gateway = INADDR_NONE; /* Gateway IP address */
u32 ic_servaddr = INADDR_NONE; /* Boot server IP address */
@@ -137,9 +137,9 @@ u8 root_server_path[256] = { 0, }; /* Path to mount as root */
/* Persistent data: */
-int ic_proto_used; /* Protocol used, if any */
-u32 ic_nameservers[CONF_NAMESERVERS_MAX]; /* DNS Server IP addresses */
-u8 ic_domain[64]; /* DNS (not NIS) domain name */
+static int ic_proto_used; /* Protocol used, if any */
+static u32 ic_nameservers[CONF_NAMESERVERS_MAX]; /* DNS Server IP addresses */
+static u8 ic_domain[64]; /* DNS (not NIS) domain name */
/*
* Private state.
diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c
index 2c6dd971b10a..58de4dbaf168 100644
--- a/net/ipv4/raw.c
+++ b/net/ipv4/raw.c
@@ -562,8 +562,8 @@ out: return ret;
* we return it, otherwise we block.
*/
-int raw_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
- size_t len, int noblock, int flags, int *addr_len)
+static int raw_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
+ size_t len, int noblock, int flags, int *addr_len)
{
struct inet_opt *inet = inet_sk(sk);
size_t copied = 0;
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 4de83141d5bc..9c438efe1249 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -108,22 +108,22 @@
#define RT_GC_TIMEOUT (300*HZ)
-int ip_rt_min_delay = 2 * HZ;
-int ip_rt_max_delay = 10 * HZ;
-int ip_rt_max_size;
-int ip_rt_gc_timeout = RT_GC_TIMEOUT;
-int ip_rt_gc_interval = 60 * HZ;
-int ip_rt_gc_min_interval = HZ / 2;
-int ip_rt_redirect_number = 9;
-int ip_rt_redirect_load = HZ / 50;
-int ip_rt_redirect_silence = ((HZ / 50) << (9 + 1));
-int ip_rt_error_cost = HZ;
-int ip_rt_error_burst = 5 * HZ;
-int ip_rt_gc_elasticity = 8;
-int ip_rt_mtu_expires = 10 * 60 * HZ;
-int ip_rt_min_pmtu = 512 + 20 + 20;
-int ip_rt_min_advmss = 256;
-int ip_rt_secret_interval = 10 * 60 * HZ;
+static int ip_rt_min_delay = 2 * HZ;
+static int ip_rt_max_delay = 10 * HZ;
+static int ip_rt_max_size;
+static int ip_rt_gc_timeout = RT_GC_TIMEOUT;
+static int ip_rt_gc_interval = 60 * HZ;
+static int ip_rt_gc_min_interval = HZ / 2;
+static int ip_rt_redirect_number = 9;
+static int ip_rt_redirect_load = HZ / 50;
+static int ip_rt_redirect_silence = ((HZ / 50) << (9 + 1));
+static int ip_rt_error_cost = HZ;
+static int ip_rt_error_burst = 5 * HZ;
+static int ip_rt_gc_elasticity = 8;
+static int ip_rt_mtu_expires = 10 * 60 * HZ;
+static int ip_rt_min_pmtu = 512 + 20 + 20;
+static int ip_rt_min_advmss = 256;
+static int ip_rt_secret_interval = 10 * 60 * HZ;
static unsigned long rt_deadline;
#define RTprint(a...) printk(KERN_DEBUG a)
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index a0f598569886..6c876d733426 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -2786,7 +2786,7 @@ static void westwood_update_window(struct sock *sk, __u32 now)
* straight forward and doesn't need any particular care.
*/
-void __tcp_westwood_fast_bw(struct sock *sk, struct sk_buff *skb)
+static void __tcp_westwood_fast_bw(struct sock *sk, struct sk_buff *skb)
{
struct tcp_opt *tp = tcp_sk(sk);
@@ -2797,6 +2797,12 @@ void __tcp_westwood_fast_bw(struct sock *sk, struct sk_buff *skb)
tp->westwood.rtt_min = westwood_update_rttmin(sk);
}
+static inline void tcp_westwood_fast_bw(struct sock *sk, struct sk_buff *skb)
+{
+ if (tcp_is_westwood(tcp_sk(sk)))
+ __tcp_westwood_fast_bw(sk, skb);
+}
+
/*
* @westwood_dupack_update
@@ -2867,7 +2873,7 @@ static inline __u32 westwood_acked_count(struct sock *sk)
* dupack. But we need to be careful in such case.
*/
-void __tcp_westwood_slow_bw(struct sock *sk, struct sk_buff *skb)
+static void __tcp_westwood_slow_bw(struct sock *sk, struct sk_buff *skb)
{
struct tcp_opt *tp = tcp_sk(sk);
@@ -2877,6 +2883,12 @@ void __tcp_westwood_slow_bw(struct sock *sk, struct sk_buff *skb)
tp->westwood.rtt_min = westwood_update_rttmin(sk);
}
+static inline void tcp_westwood_slow_bw(struct sock *sk, struct sk_buff *skb)
+{
+ if (tcp_is_westwood(tcp_sk(sk)))
+ __tcp_westwood_slow_bw(sk, skb);
+}
+
/* This routine deals with incoming acks, but not outgoing ones. */
static int tcp_ack(struct sock *sk, struct sk_buff *skb, int flag)
{
diff --git a/net/ipv4/tcp_minisocks.c b/net/ipv4/tcp_minisocks.c
index d5b6ea321305..b00c6c8b194e 100644
--- a/net/ipv4/tcp_minisocks.c
+++ b/net/ipv4/tcp_minisocks.c
@@ -41,6 +41,8 @@ int sysctl_tcp_max_tw_buckets = NR_FILE*2;
int sysctl_tcp_syncookies = SYNC_INIT;
int sysctl_tcp_abort_on_overflow;
+static void tcp_tw_schedule(struct tcp_tw_bucket *tw, int timeo);
+
static __inline__ int tcp_in_window(u32 seq, u32 end_seq, u32 s_win, u32 e_win)
{
if (seq == s_win)
@@ -551,7 +553,7 @@ static struct timer_list tcp_twcal_timer =
TIMER_INITIALIZER(tcp_twcal_tick, 0, 0);
static struct hlist_head tcp_twcal_row[TCP_TW_RECYCLE_SLOTS];
-void tcp_tw_schedule(struct tcp_tw_bucket *tw, int timeo)
+static void tcp_tw_schedule(struct tcp_tw_bucket *tw, int timeo)
{
struct hlist_head *list;
int slot;
diff --git a/net/ipv4/tcp_timer.c b/net/ipv4/tcp_timer.c
index 3b4d82176a84..686b56f91322 100644
--- a/net/ipv4/tcp_timer.c
+++ b/net/ipv4/tcp_timer.c
@@ -653,6 +653,3 @@ EXPORT_SYMBOL(tcp_clear_xmit_timers);
EXPORT_SYMBOL(tcp_delete_keepalive_timer);
EXPORT_SYMBOL(tcp_init_xmit_timers);
EXPORT_SYMBOL(tcp_reset_keepalive_timer);
-#ifdef TCP_DEBUG
-EXPORT_SYMBOL(tcp_timer_bug_msg);
-#endif
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index 4a1bfb39c4b0..9ae2faae9982 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -219,7 +219,8 @@ static void udp_v4_unhash(struct sock *sk)
/* UDP is nearly always wildcards out the wazoo, it makes no sense to try
* harder than this. -DaveM
*/
-struct sock *udp_v4_lookup_longway(u32 saddr, u16 sport, u32 daddr, u16 dport, int dif)
+static struct sock *udp_v4_lookup_longway(u32 saddr, u16 sport,
+ u32 daddr, u16 dport, int dif)
{
struct sock *sk, *result = NULL;
struct hlist_node *node;
@@ -263,7 +264,8 @@ struct sock *udp_v4_lookup_longway(u32 saddr, u16 sport, u32 daddr, u16 dport, i
return result;
}
-__inline__ struct sock *udp_v4_lookup(u32 saddr, u16 sport, u32 daddr, u16 dport, int dif)
+static __inline__ struct sock *udp_v4_lookup(u32 saddr, u16 sport,
+ u32 daddr, u16 dport, int dif)
{
struct sock *sk;
@@ -667,7 +669,8 @@ do_confirm:
goto out;
}
-int udp_sendpage(struct sock *sk, struct page *page, int offset, size_t size, int flags)
+static int udp_sendpage(struct sock *sk, struct page *page, int offset,
+ size_t size, int flags)
{
struct udp_opt *up = udp_sk(sk);
int ret;
@@ -770,8 +773,8 @@ static __inline__ int udp_checksum_complete(struct sk_buff *skb)
* return it, otherwise we block.
*/
-int udp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
- size_t len, int noblock, int flags, int *addr_len)
+static int udp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
+ size_t len, int noblock, int flags, int *addr_len)
{
struct inet_opt *inet = inet_sk(sk);
struct sockaddr_in *sin = (struct sockaddr_in *)msg->msg_name;
diff --git a/net/ipv4/xfrm4_policy.c b/net/ipv4/xfrm4_policy.c
index 3ce69883bcc4..012ef304ce63 100644
--- a/net/ipv4/xfrm4_policy.c
+++ b/net/ipv4/xfrm4_policy.c
@@ -279,10 +279,3 @@ void __init xfrm4_init(void)
xfrm4_policy_init();
}
-void __exit xfrm4_fini(void)
-{
- //xfrm4_input_fini();
- xfrm4_policy_fini();
- xfrm4_state_fini();
-}
-