Skip to content

Commit

Permalink
tipc: remove zeroing assignments to static global variables
Browse files Browse the repository at this point in the history
Cleans up TIPC's source code to eliminate the needless initialization
of static variables to zero.

These changes are purely cosmetic and do not alter the operation of TIPC
in any way.

Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
ajstephens authored and davem330 committed Jan 1, 2011
1 parent 2db9983 commit e3ec9c7
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 15 deletions.
8 changes: 4 additions & 4 deletions net/tipc/bcast.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,9 @@ struct bclink {
};


static struct bcbearer *bcbearer = NULL;
static struct bclink *bclink = NULL;
static struct link *bcl = NULL;
static struct bcbearer *bcbearer;
static struct bclink *bclink;
static struct link *bcl;
static DEFINE_SPINLOCK(bc_lock);

/* broadcast-capable node map */
Expand Down Expand Up @@ -425,7 +425,7 @@ int tipc_bclink_send_msg(struct sk_buff *buf)
void tipc_bclink_recv_pkt(struct sk_buff *buf)
{
#if (TIPC_BCAST_LOSS_RATE)
static int rx_count = 0;
static int rx_count;
#endif
struct tipc_msg *msg = buf_msg(buf);
struct tipc_node *node = tipc_node_find(msg_prevnode(msg));
Expand Down
2 changes: 1 addition & 1 deletion net/tipc/bearer.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
#define MAX_ADDR_STR 32

static struct media media_list[MAX_MEDIA];
static u32 media_count = 0;
static u32 media_count;

struct bearer tipc_bearers[MAX_BEARERS];

Expand Down
2 changes: 1 addition & 1 deletion net/tipc/eth_media.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ struct eth_bearer {
};

static struct eth_bearer eth_bearers[MAX_ETH_BEARERS];
static int eth_started = 0;
static int eth_started;
static struct notifier_block notifier;

/**
Expand Down
2 changes: 1 addition & 1 deletion net/tipc/handler.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ struct queue_item {
static struct kmem_cache *tipc_queue_item_cache;
static struct list_head signal_queue_head;
static DEFINE_SPINLOCK(qitem_lock);
static int handler_enabled = 0;
static int handler_enabled;

static void process_signal_queue(unsigned long dummy);

Expand Down
2 changes: 1 addition & 1 deletion net/tipc/name_distr.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ struct distr_item {
*/

static LIST_HEAD(publ_root);
static u32 publ_cnt = 0;
static u32 publ_cnt;

/**
* publ_to_item - add publication info to a publication message
Expand Down
2 changes: 1 addition & 1 deletion net/tipc/name_table.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ struct name_table {
u32 local_publ_count;
};

static struct name_table table = { NULL } ;
static struct name_table table;
static atomic_t rsv_publ_ok = ATOMIC_INIT(0);
DEFINE_RWLOCK(tipc_nametbl_lock);

Expand Down
2 changes: 1 addition & 1 deletion net/tipc/node.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ static void node_established_contact(struct tipc_node *n_ptr);

static DEFINE_SPINLOCK(node_create_lock);

u32 tipc_own_tag = 0;
u32 tipc_own_tag;

/**
* tipc_node_create - create neighboring node
Expand Down
4 changes: 2 additions & 2 deletions net/tipc/port.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@

#define MAX_REJECT_SIZE 1024

static struct sk_buff *msg_queue_head = NULL;
static struct sk_buff *msg_queue_tail = NULL;
static struct sk_buff *msg_queue_head;
static struct sk_buff *msg_queue_tail;

DEFINE_SPINLOCK(tipc_port_list_lock);
static DEFINE_SPINLOCK(queue_lock);
Expand Down
2 changes: 1 addition & 1 deletion net/tipc/ref.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ struct ref_table {
* have a reference value of 0 (although this is unlikely).
*/

static struct ref_table tipc_ref_table = { NULL };
static struct ref_table tipc_ref_table;

static DEFINE_RWLOCK(ref_table_lock);

Expand Down
2 changes: 1 addition & 1 deletion net/tipc/socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ static const struct proto_ops msg_ops;

static struct proto tipc_proto;

static int sockets_enabled = 0;
static int sockets_enabled;

static atomic_t tipc_queue_size = ATOMIC_INIT(0);

Expand Down
2 changes: 1 addition & 1 deletion net/tipc/subscr.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ struct top_srv {
spinlock_t lock;
};

static struct top_srv topsrv = { 0 };
static struct top_srv topsrv;

/**
* htohl - convert value to endianness used by destination
Expand Down

0 comments on commit e3ec9c7

Please sign in to comment.