* [PATCH] net: remove initialization of static per-cpu variables
@ 2008-06-12 21:23 Vegard Nossum
2008-06-12 22:03 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Vegard Nossum @ 2008-06-12 21:23 UTC (permalink / raw)
To: netdev; +Cc: kernel-janitors
From: Vegard Nossum <vegard.nossum@gmail.com>
Date: Thu, 12 Jun 2008 22:15:58 +0200
Subject: [PATCH] net: remove initialization of static per-cpu variables
Cc: netdev@vger.kernel.org
Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
---
net/core/flow.c | 6 +++---
net/socket.c | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/net/core/flow.c b/net/core/flow.c
index 1999117..9375bb9 100644
--- a/net/core/flow.c
+++ b/net/core/flow.c
@@ -39,7 +39,7 @@ atomic_t flow_cache_genid = ATOMIC_INIT(0);
static u32 flow_hash_shift;
#define flow_hash_size (1 << flow_hash_shift)
-static DEFINE_PER_CPU(struct flow_cache_entry **, flow_tables) = { NULL };
+static DEFINE_PER_CPU(struct flow_cache_entry **, flow_tables);
#define flow_table(cpu) (per_cpu(flow_tables, cpu))
@@ -52,7 +52,7 @@ struct flow_percpu_info {
u32 hash_rnd;
int count;
};
-static DEFINE_PER_CPU(struct flow_percpu_info, flow_hash_info) = { 0 };
+static DEFINE_PER_CPU(struct flow_percpu_info, flow_hash_info);
#define flow_hash_rnd_recalc(cpu) \
(per_cpu(flow_hash_info, cpu).hash_rnd_recalc)
@@ -69,7 +69,7 @@ struct flow_flush_info {
atomic_t cpuleft;
struct completion completion;
};
-static DEFINE_PER_CPU(struct tasklet_struct, flow_flush_tasklets) = { NULL };
+static DEFINE_PER_CPU(struct tasklet_struct, flow_flush_tasklets);
#define flow_flush_tasklet(cpu) (&per_cpu(flow_flush_tasklets, cpu))
diff --git a/net/socket.c b/net/socket.c
index 66c4a8c..c8375ec 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -151,7 +151,7 @@ static const struct net_proto_family *net_families[NPROTO] __read_mostly;
* Statistics counters of the socket lists
*/
-static DEFINE_PER_CPU(int, sockets_in_use) = 0;
+static DEFINE_PER_CPU(int, sockets_in_use);
/*
* Support routines.
--
1.5.4.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] net: remove initialization of static per-cpu variables
2008-06-12 21:23 [PATCH] net: remove initialization of static per-cpu variables Vegard Nossum
@ 2008-06-12 22:03 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2008-06-12 22:03 UTC (permalink / raw)
To: vegard.nossum; +Cc: netdev, kernel-janitors
From: Vegard Nossum <vegard.nossum@gmail.com>
Date: Thu, 12 Jun 2008 23:23:10 +0200
> From: Vegard Nossum <vegard.nossum@gmail.com>
> Date: Thu, 12 Jun 2008 22:15:58 +0200
> Subject: [PATCH] net: remove initialization of static per-cpu variables
>
> Cc: netdev@vger.kernel.org
> Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-06-12 22:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-12 21:23 [PATCH] net: remove initialization of static per-cpu variables Vegard Nossum
2008-06-12 22:03 ` David 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).