diff options
author | Li Zefan <lizf@cn.fujitsu.com> | 2009-06-15 02:58:26 -0400 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2009-09-23 20:04:24 -0400 |
commit | 79f5599772ac2f138d7a75b8f3f06a93f09c75f7 (patch) | |
tree | 092c9f6e3f7c49d8f5bb9f3d39752ae7cfb9415a /kernel/trace/trace.c | |
parent | a724eada8c2a7b62463b73ccf73fd0bb6e928aeb (diff) |
cpumask: use zalloc_cpumask_var() where possible
Remove open-coded zalloc_cpumask_var() and zalloc_cpumask_var_node().
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'kernel/trace/trace.c')
-rw-r--r-- | kernel/trace/trace.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 6c0f6a8a22eb..411af37f4be4 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c | |||
@@ -1984,11 +1984,9 @@ __tracing_open(struct inode *inode, struct file *file) | |||
1984 | if (current_trace) | 1984 | if (current_trace) |
1985 | *iter->trace = *current_trace; | 1985 | *iter->trace = *current_trace; |
1986 | 1986 | ||
1987 | if (!alloc_cpumask_var(&iter->started, GFP_KERNEL)) | 1987 | if (!zalloc_cpumask_var(&iter->started, GFP_KERNEL)) |
1988 | goto fail; | 1988 | goto fail; |
1989 | 1989 | ||
1990 | cpumask_clear(iter->started); | ||
1991 | |||
1992 | if (current_trace && current_trace->print_max) | 1990 | if (current_trace && current_trace->print_max) |
1993 | iter->tr = &max_tr; | 1991 | iter->tr = &max_tr; |
1994 | else | 1992 | else |
@@ -4389,7 +4387,7 @@ __init static int tracer_alloc_buffers(void) | |||
4389 | if (!alloc_cpumask_var(&tracing_cpumask, GFP_KERNEL)) | 4387 | if (!alloc_cpumask_var(&tracing_cpumask, GFP_KERNEL)) |
4390 | goto out_free_buffer_mask; | 4388 | goto out_free_buffer_mask; |
4391 | 4389 | ||
4392 | if (!alloc_cpumask_var(&tracing_reader_cpumask, GFP_KERNEL)) | 4390 | if (!zalloc_cpumask_var(&tracing_reader_cpumask, GFP_KERNEL)) |
4393 | goto out_free_tracing_cpumask; | 4391 | goto out_free_tracing_cpumask; |
4394 | 4392 | ||
4395 | /* To save memory, keep the ring buffer size to its minimum */ | 4393 | /* To save memory, keep the ring buffer size to its minimum */ |
@@ -4400,7 +4398,6 @@ __init static int tracer_alloc_buffers(void) | |||
4400 | 4398 | ||
4401 | cpumask_copy(tracing_buffer_mask, cpu_possible_mask); | 4399 | cpumask_copy(tracing_buffer_mask, cpu_possible_mask); |
4402 | cpumask_copy(tracing_cpumask, cpu_all_mask); | 4400 | cpumask_copy(tracing_cpumask, cpu_all_mask); |
4403 | cpumask_clear(tracing_reader_cpumask); | ||
4404 | 4401 | ||
4405 | /* TODO: make the number of buffers hot pluggable with CPUS */ | 4402 | /* TODO: make the number of buffers hot pluggable with CPUS */ |
4406 | global_trace.buffer = ring_buffer_alloc(ring_buf_size, | 4403 | global_trace.buffer = ring_buffer_alloc(ring_buf_size, |