diff options
author | Adrian Bunk <bunk@stusta.de> | 2005-01-13 05:03:55 -0800 |
---|---|---|
committer | David S. Miller <davem@nuts.davemloft.net> | 2005-01-13 05:03:55 -0800 |
commit | 901bc4af5890f9c1bd30993792ab8d2680a1c554 (patch) | |
tree | 5b13494ca410d21f412856ceccd5308b466fec50 /net | |
parent | 29eef9f9d004bd0f6f223259b81e9951f4ac84c5 (diff) | |
download | history-901bc4af5890f9c1bd30993792ab8d2680a1c554.tar.gz |
[DECNET]: Misc cleanups
- make needlessly global code static
- dn_fib.c: remove the write-only global variable dn_fib_info_cnt
- dn_fib.c: remove the unused global function dn_fib_rt_message
- dn_neigh.c: remove the unused global function dn_neigh_pointopoint_notify
- dn_timer.c: remove the fast timer code that isn't used
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/decnet/af_decnet.c | 6 | ||||
-rw-r--r-- | net/decnet/dn_fib.c | 15 | ||||
-rw-r--r-- | net/decnet/dn_neigh.c | 8 | ||||
-rw-r--r-- | net/decnet/dn_route.c | 6 | ||||
-rw-r--r-- | net/decnet/dn_timer.c | 47 |
5 files changed, 5 insertions, 77 deletions
diff --git a/net/decnet/af_decnet.c b/net/decnet/af_decnet.c index 94b53951dd5ad8..056bac657275f8 100644 --- a/net/decnet/af_decnet.c +++ b/net/decnet/af_decnet.c @@ -246,7 +246,7 @@ static void dn_unhash_sock_bh(struct sock *sk) write_unlock_bh(&dn_hash_lock); } -struct hlist_head *listen_hash(struct sockaddr_dn *addr) +static struct hlist_head *listen_hash(struct sockaddr_dn *addr) { int i; unsigned hash = addr->sdn_objnum; @@ -447,7 +447,7 @@ static void dn_destruct(struct sock *sk) dst_release(xchg(&sk->sk_dst_cache, NULL)); } -struct sock *dn_alloc_sock(struct socket *sock, int gfp) +static struct sock *dn_alloc_sock(struct socket *sock, int gfp) { struct dn_scp *scp; struct sock *sk = sk_alloc(PF_DECnet, gfp, sizeof(struct dn_sock), @@ -578,7 +578,6 @@ int dn_destroy_timer(struct sock *sk) if (sk->sk_socket) return 0; - dn_stop_fast_timer(sk); /* unlikely, but possible that this is runninng */ if ((jiffies - scp->stamp) >= (HZ * decnet_time_wait)) { dn_unhash_sock(sk); sock_put(sk); @@ -631,7 +630,6 @@ disc_reject: default: printk(KERN_DEBUG "DECnet: dn_destroy_sock passed socket in invalid state\n"); case DN_O: - dn_stop_fast_timer(sk); dn_stop_slow_timer(sk); dn_unhash_sock_bh(sk); diff --git a/net/decnet/dn_fib.c b/net/decnet/dn_fib.c index 3836cb0f707e7b..9934b25720e4f5 100644 --- a/net/decnet/dn_fib.c +++ b/net/decnet/dn_fib.c @@ -60,7 +60,6 @@ extern int dn_cache_dump(struct sk_buff *skb, struct netlink_callback *cb); static DEFINE_SPINLOCK(dn_fib_multipath_lock); static struct dn_fib_info *dn_fib_info_list; static DEFINE_RWLOCK(dn_fib_info_lock); -int dn_fib_info_cnt; static struct { @@ -93,7 +92,6 @@ void dn_fib_free_info(struct dn_fib_info *fi) dev_put(nh->nh_dev); nh->nh_dev = NULL; } endfor_nexthops(fi); - dn_fib_info_cnt--; kfree(fi); } @@ -388,7 +386,6 @@ link_it: if (dn_fib_info_list) dn_fib_info_list->fib_prev = fi; dn_fib_info_list = fi; - dn_fib_info_cnt++; write_unlock(&dn_fib_info_lock); return fi; @@ -486,18 +483,6 @@ void dn_fib_select_multipath(const struct flowi *fl, struct dn_fib_res *res) } -/* - * Punt to user via netlink for example, but for now - * we just drop it. - */ -int dn_fib_rt_message(struct sk_buff *skb) -{ - kfree_skb(skb); - - return 0; -} - - static int dn_fib_check_attr(struct rtmsg *r, struct rtattr **rta) { int i; diff --git a/net/decnet/dn_neigh.c b/net/decnet/dn_neigh.c index 6128a02610c4c0..f6dfe96f45b79b 100644 --- a/net/decnet/dn_neigh.c +++ b/net/decnet/dn_neigh.c @@ -355,14 +355,6 @@ static int dn_phase3_output(struct sk_buff *skb) * basically does a neigh_lookup(), but without comparing the device * field. This is required for the On-Ethernet cache */ -/* - * Any traffic on a pointopoint link causes the timer to be reset - * for the entry in the neighbour table. - */ -void dn_neigh_pointopoint_notify(struct sk_buff *skb) -{ - return; -} /* * Pointopoint link receives a hello message diff --git a/net/decnet/dn_route.c b/net/decnet/dn_route.c index a82a406d111a47..309a8b317a9ed2 100644 --- a/net/decnet/dn_route.c +++ b/net/decnet/dn_route.c @@ -99,9 +99,9 @@ extern struct neigh_table dn_neigh_table; static unsigned char dn_hiord_addr[6] = {0xAA,0x00,0x04,0x00,0x00,0x00}; -int dn_rt_min_delay = 2 * HZ; -int dn_rt_max_delay = 10 * HZ; -int dn_rt_mtu_expires = 10 * 60 * HZ; +static const int dn_rt_min_delay = 2 * HZ; +static const int dn_rt_max_delay = 10 * HZ; +static const int dn_rt_mtu_expires = 10 * 60 * HZ; static unsigned long dn_rt_deadline; diff --git a/net/decnet/dn_timer.c b/net/decnet/dn_timer.c index 0aae8a63390718..09825711d58abe 100644 --- a/net/decnet/dn_timer.c +++ b/net/decnet/dn_timer.c @@ -27,11 +27,9 @@ #include <net/dn.h> /* - * Fast timer is for delayed acks (200mS max) * Slow timer is for everything else (n * 500mS) */ -#define FAST_INTERVAL (HZ/5) #define SLOW_INTERVAL (HZ/2) static void dn_slow_timer(unsigned long arg); @@ -109,48 +107,3 @@ out: bh_unlock_sock(sk); sock_put(sk); } - -static void dn_fast_timer(unsigned long arg) -{ - struct sock *sk = (struct sock *)arg; - struct dn_scp *scp = DN_SK(sk); - - bh_lock_sock(sk); - if (sock_owned_by_user(sk)) { - scp->delack_timer.expires = jiffies + HZ / 20; - add_timer(&scp->delack_timer); - goto out; - } - - scp->delack_pending = 0; - - if (scp->delack_fxn) - scp->delack_fxn(sk); -out: - bh_unlock_sock(sk); -} - -void dn_start_fast_timer(struct sock *sk) -{ - struct dn_scp *scp = DN_SK(sk); - - if (!scp->delack_pending) { - scp->delack_pending = 1; - init_timer(&scp->delack_timer); - scp->delack_timer.expires = jiffies + FAST_INTERVAL; - scp->delack_timer.data = (unsigned long)sk; - scp->delack_timer.function = dn_fast_timer; - add_timer(&scp->delack_timer); - } -} - -void dn_stop_fast_timer(struct sock *sk) -{ - struct dn_scp *scp = DN_SK(sk); - - if (scp->delack_pending) { - scp->delack_pending = 0; - del_timer(&scp->delack_timer); - } -} - |