diff options
author | Steven Whitehouse <steve@men-an-tol.chygwyn.com> | 2006-02-23 10:49:43 +0100 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2006-02-23 10:49:43 +0100 |
commit | d35462b4bb847b68321c55e95c926aa485aecce2 (patch) | |
tree | b08e18bf6e672633402871ee763102fdb5e63229 /arch/ia64/kernel/topology.c | |
parent | [GFS2] Missed deletion of debugging code (diff) | |
parent | Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6 (diff) | |
download | linux-d35462b4bb847b68321c55e95c926aa485aecce2.tar.xz linux-d35462b4bb847b68321c55e95c926aa485aecce2.zip |
Merge branch 'master'
Diffstat (limited to 'arch/ia64/kernel/topology.c')
-rw-r--r-- | arch/ia64/kernel/topology.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/arch/ia64/kernel/topology.c b/arch/ia64/kernel/topology.c index 706b7734e191..6e5eea19fa67 100644 --- a/arch/ia64/kernel/topology.c +++ b/arch/ia64/kernel/topology.c @@ -71,31 +71,33 @@ static int __init topology_init(void) int i, err = 0; #ifdef CONFIG_NUMA - sysfs_nodes = kmalloc(sizeof(struct node) * MAX_NUMNODES, GFP_KERNEL); + sysfs_nodes = kzalloc(sizeof(struct node) * MAX_NUMNODES, GFP_KERNEL); if (!sysfs_nodes) { err = -ENOMEM; goto out; } - memset(sysfs_nodes, 0, sizeof(struct node) * MAX_NUMNODES); - /* MCD - Do we want to register all ONLINE nodes, or all POSSIBLE nodes? */ - for_each_online_node(i) + /* + * MCD - Do we want to register all ONLINE nodes, or all POSSIBLE nodes? + */ + for_each_online_node(i) { if ((err = register_node(&sysfs_nodes[i], i, 0))) goto out; + } #endif - sysfs_cpus = kmalloc(sizeof(struct ia64_cpu) * NR_CPUS, GFP_KERNEL); + sysfs_cpus = kzalloc(sizeof(struct ia64_cpu) * NR_CPUS, GFP_KERNEL); if (!sysfs_cpus) { err = -ENOMEM; goto out; } - memset(sysfs_cpus, 0, sizeof(struct ia64_cpu) * NR_CPUS); - for_each_present_cpu(i) + for_each_present_cpu(i) { if((err = arch_register_cpu(i))) goto out; + } out: return err; } -__initcall(topology_init); +subsys_initcall(topology_init); |