summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/apic
diff options
context:
space:
mode:
authorLi Zefan <lizf@cn.fujitsu.com>2009-06-15 08:58:26 +0200
committerRusty Russell <rusty@rustcorp.com.au>2009-09-24 02:04:24 +0200
commit79f5599772ac2f138d7a75b8f3f06a93f09c75f7 (patch)
tree092c9f6e3f7c49d8f5bb9f3d39752ae7cfb9415a /arch/x86/kernel/apic
parentMerge branch 'ixp4xx' of git://git.kernel.org/pub/scm/linux/kernel/git/chris/... (diff)
downloadlinux-79f5599772ac2f138d7a75b8f3f06a93f09c75f7.tar.xz
linux-79f5599772ac2f138d7a75b8f3f06a93f09c75f7.zip
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 'arch/x86/kernel/apic')
-rw-r--r--arch/x86/kernel/apic/io_apic.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index 64970b9885f2..dc69f28489f5 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -227,17 +227,14 @@ static struct irq_cfg *get_one_free_irq_cfg(int node)
cfg = kzalloc_node(sizeof(*cfg), GFP_ATOMIC, node);
if (cfg) {
- if (!alloc_cpumask_var_node(&cfg->domain, GFP_ATOMIC, node)) {
+ if (!zalloc_cpumask_var_node(&cfg->domain, GFP_ATOMIC, node)) {
kfree(cfg);
cfg = NULL;
- } else if (!alloc_cpumask_var_node(&cfg->old_domain,
+ } else if (!zalloc_cpumask_var_node(&cfg->old_domain,
GFP_ATOMIC, node)) {
free_cpumask_var(cfg->domain);
kfree(cfg);
cfg = NULL;
- } else {
- cpumask_clear(cfg->domain);
- cpumask_clear(cfg->old_domain);
}
}