[PATCH] (8/11) netrom - make lists and locks static

From: Stephen Hemminger (ulmig.vrddmvwbce@mail.dy.fi)
Date: Thu Aug 14 2003 - 01:45:17 EEST

  • Next message: Stephen Hemminger: "[PATCH] (10/11) netrom - convert /proc interface to seq_file"

    Make lists and locks static since they are only used in one file.

    diff -Nru a/net/netrom/af_netrom.c b/net/netrom/af_netrom.c
    --- a/net/netrom/af_netrom.c Wed Aug 13 13:31:48 2003
    +++ b/net/netrom/af_netrom.c Wed Aug 13 13:31:48 2003
    @@ -57,8 +57,8 @@
     
     static unsigned short circuit = 0x101;
     
    -HLIST_HEAD(nr_list);
    -static spinlock_t nr_list_lock;
    +static HLIST_HEAD(nr_list);
    +static spinlock_t nr_list_lock = SPIN_LOCK_UNLOCKED;
     
     static struct proto_ops nr_proto_ops;
     
    diff -Nru a/net/netrom/nr_route.c b/net/netrom/nr_route.c
    --- a/net/netrom/nr_route.c Wed Aug 13 13:31:48 2003
    +++ b/net/netrom/nr_route.c Wed Aug 13 13:31:48 2003
    @@ -39,10 +39,10 @@
     
     static unsigned int nr_neigh_no = 1;
     
    -HLIST_HEAD(nr_node_list);
    -spinlock_t nr_node_list_lock = SPIN_LOCK_UNLOCKED;
    -HLIST_HEAD(nr_neigh_list);
    -spinlock_t nr_neigh_list_lock = SPIN_LOCK_UNLOCKED;
    +static HLIST_HEAD(nr_node_list);
    +static spinlock_t nr_node_list_lock = SPIN_LOCK_UNLOCKED;
    +static HLIST_HEAD(nr_neigh_list);
    +static spinlock_t nr_neigh_list_lock = SPIN_LOCK_UNLOCKED;
     
     struct nr_node *nr_node_get(ax25_address *callsign)
     {
    -
    To unsubscribe from this list: send the line "unsubscribe linux-hams" in
    the body of a message to terhi.victor@logonet.com
    More majordomo info at http://vger.kernel.org/majordomo-info.html



    This archive was generated by hypermail 2b30 : Thu Aug 14 2003 - 01:45:52 EEST