Re: [PATCH] kvm: remove the duplicated cpumask_clear

From: Rusty Russell
Date: Fri Jun 12 2009 - 07:49:33 EST


On Fri, 12 Jun 2009 07:39:00 am Yinghai Lu wrote:
> zalloc_cpumask_var already had that clear.

Only because of your previous patch... I've folded them into one patch for
Avi:

Subject: kvm: use zalloc_cpumask_var instead of cpumask_clear

Signed-off-by: Yinghai Lu <yinghai@xxxxxxxxxx>
Signed-off-by: Rusty Russell <rusty@xxxxxxxxxxxxxxx>
---
virt/kvm/kvm_main.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -2301,11 +2301,10 @@ int kvm_init(void *opaque, unsigned int

bad_pfn = page_to_pfn(bad_page);

- if (!alloc_cpumask_var(&cpus_hardware_enabled, GFP_KERNEL)) {
+ if (!zalloc_cpumask_var(&cpus_hardware_enabled, GFP_KERNEL)) {
r = -ENOMEM;
goto out_free_0;
}
- cpumask_clear(cpus_hardware_enabled);

r = kvm_arch_hardware_setup();
if (r < 0)

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/