aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorSabrina Dubroca <sd@queasysnail.net>2014-01-18 13:19:27 -0500
committerDavid S. Miller <davem@davemloft.net>2014-01-21 19:44:45 -0500
commitf14fe8a848cd67dfdb9a959ff3e1fa259878bec3 (patch)
tree80666e9fca1cf5f90aaf7aa1ab567b13809c1def /net
parentead5139aa10d7df970f66a291bf450966ae7b748 (diff)
net: remove unnecessary initializations in net_dev_init
softnet_data is already set to 0, no need to use memset or initialize specific fields to 0 or NULL afterwards. Signed-off-by: Sabrina Dubroca <sd@queasysnail.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/core/dev.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index fb99f6477050..a578af589198 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -6998,28 +6998,18 @@ static int __init net_dev_init(void)
6998 for_each_possible_cpu(i) { 6998 for_each_possible_cpu(i) {
6999 struct softnet_data *sd = &per_cpu(softnet_data, i); 6999 struct softnet_data *sd = &per_cpu(softnet_data, i);
7000 7000
7001 memset(sd, 0, sizeof(*sd));
7002 skb_queue_head_init(&sd->input_pkt_queue); 7001 skb_queue_head_init(&sd->input_pkt_queue);
7003 skb_queue_head_init(&sd->process_queue); 7002 skb_queue_head_init(&sd->process_queue);
7004 sd->completion_queue = NULL;
7005 INIT_LIST_HEAD(&sd->poll_list); 7003 INIT_LIST_HEAD(&sd->poll_list);
7006 sd->output_queue = NULL;
7007 sd->output_queue_tailp = &sd->output_queue; 7004 sd->output_queue_tailp = &sd->output_queue;
7008#ifdef CONFIG_RPS 7005#ifdef CONFIG_RPS
7009 sd->csd.func = rps_trigger_softirq; 7006 sd->csd.func = rps_trigger_softirq;
7010 sd->csd.info = sd; 7007 sd->csd.info = sd;
7011 sd->csd.flags = 0;
7012 sd->cpu = i; 7008 sd->cpu = i;
7013#endif 7009#endif
7014 7010
7015 sd->backlog.poll = process_backlog; 7011 sd->backlog.poll = process_backlog;
7016 sd->backlog.weight = weight_p; 7012 sd->backlog.weight = weight_p;
7017 sd->backlog.gro_list = NULL;
7018 sd->backlog.gro_count = 0;
7019
7020#ifdef CONFIG_NET_FLOW_LIMIT
7021 sd->flow_limit = NULL;
7022#endif
7023 } 7013 }
7024 7014
7025 dev_boot_phase = 0; 7015 dev_boot_phase = 0;