summaryrefslogtreecommitdiff
path: root/arch/sparc64/kernel/setup.c
diff options
context:
space:
mode:
authorEric Sesterhenn <snakebyte@gmx.de>2006-03-06 13:48:40 -0800
committerDavid S. Miller <davem@sunset.davemloft.net>2006-03-20 01:14:19 -0800
commit9132983ae140a8ca81e95e081d5a4c0dd7a7f670 (patch)
treef3aec20b1bb5a2cc111bbbf6775a0f8d84d28994 /arch/sparc64/kernel/setup.c
parentf7c00338cfeef125032aa12aa8ebeacf9e117e81 (diff)
[SPARC64]: kzalloc() conversion
this patch converts arch/sparc64 to kzalloc usage. Crosscompile tested with allyesconfig. Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/kernel/setup.c')
-rw-r--r--arch/sparc64/kernel/setup.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/arch/sparc64/kernel/setup.c b/arch/sparc64/kernel/setup.c
index 0c68a76143af..2a2a8a6cd17d 100644
--- a/arch/sparc64/kernel/setup.c
+++ b/arch/sparc64/kernel/setup.c
@@ -536,15 +536,11 @@ static int __init topology_init(void)
while (!cpu_find_by_instance(ncpus_probed, NULL, NULL))
ncpus_probed++;
- for (i = 0; i < NR_CPUS; i++) {
- if (cpu_possible(i)) {
- struct cpu *p = kmalloc(sizeof(*p), GFP_KERNEL);
-
- if (p) {
- memset(p, 0, sizeof(*p));
- register_cpu(p, i, NULL);
- err = 0;
- }
+ for_each_cpu(i) {
+ struct cpu *p = kzalloc(sizeof(*p), GFP_KERNEL);
+ if (p) {
+ register_cpu(p, i, NULL);
+ err = 0;
}
}