aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/kvm/kvm_main.c
diff options
context:
space:
mode:
authorAl Viro <viro@ftp.linux.org.uk>2007-02-09 11:38:40 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-09 12:14:07 -0500
commit8b6d44c7bde7f927b7b70e9f56c22c66c0066277 (patch)
tree7246847130b1768908c7c87fef2dc99028e29300 /drivers/kvm/kvm_main.c
parent5b71bddb78df5e292ae90f7603a996e51b3ecb88 (diff)
[PATCH] kvm: NULL noise removal
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/kvm/kvm_main.c')
-rw-r--r--drivers/kvm/kvm_main.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c
index a55354009cbb..099f0afd394d 100644
--- a/drivers/kvm/kvm_main.c
+++ b/drivers/kvm/kvm_main.c
@@ -62,7 +62,7 @@ static struct kvm_stats_debugfs_item {
62 { "halt_exits", &kvm_stat.halt_exits }, 62 { "halt_exits", &kvm_stat.halt_exits },
63 { "request_irq", &kvm_stat.request_irq_exits }, 63 { "request_irq", &kvm_stat.request_irq_exits },
64 { "irq_exits", &kvm_stat.irq_exits }, 64 { "irq_exits", &kvm_stat.irq_exits },
65 { 0, 0 } 65 { NULL, NULL }
66}; 66};
67 67
68static struct dentry *debugfs_dir; 68static struct dentry *debugfs_dir;
@@ -205,7 +205,7 @@ static struct kvm_vcpu *vcpu_load(struct kvm *kvm, int vcpu_slot)
205 mutex_lock(&vcpu->mutex); 205 mutex_lock(&vcpu->mutex);
206 if (unlikely(!vcpu->vmcs)) { 206 if (unlikely(!vcpu->vmcs)) {
207 mutex_unlock(&vcpu->mutex); 207 mutex_unlock(&vcpu->mutex);
208 return 0; 208 return NULL;
209 } 209 }
210 return kvm_arch_ops->vcpu_load(vcpu); 210 return kvm_arch_ops->vcpu_load(vcpu);
211} 211}
@@ -257,9 +257,9 @@ static void kvm_free_physmem_slot(struct kvm_memory_slot *free,
257 if (!dont || free->dirty_bitmap != dont->dirty_bitmap) 257 if (!dont || free->dirty_bitmap != dont->dirty_bitmap)
258 vfree(free->dirty_bitmap); 258 vfree(free->dirty_bitmap);
259 259
260 free->phys_mem = 0; 260 free->phys_mem = NULL;
261 free->npages = 0; 261 free->npages = 0;
262 free->dirty_bitmap = 0; 262 free->dirty_bitmap = NULL;
263} 263}
264 264
265static void kvm_free_physmem(struct kvm *kvm) 265static void kvm_free_physmem(struct kvm *kvm)
@@ -267,7 +267,7 @@ static void kvm_free_physmem(struct kvm *kvm)
267 int i; 267 int i;
268 268
269 for (i = 0; i < kvm->nmemslots; ++i) 269 for (i = 0; i < kvm->nmemslots; ++i)
270 kvm_free_physmem_slot(&kvm->memslots[i], 0); 270 kvm_free_physmem_slot(&kvm->memslots[i], NULL);
271} 271}
272 272
273static void kvm_free_vcpu(struct kvm_vcpu *vcpu) 273static void kvm_free_vcpu(struct kvm_vcpu *vcpu)
@@ -640,11 +640,11 @@ raced:
640 640
641 /* Deallocate if slot is being removed */ 641 /* Deallocate if slot is being removed */
642 if (!npages) 642 if (!npages)
643 new.phys_mem = 0; 643 new.phys_mem = NULL;
644 644
645 /* Free page dirty bitmap if unneeded */ 645 /* Free page dirty bitmap if unneeded */
646 if (!(new.flags & KVM_MEM_LOG_DIRTY_PAGES)) 646 if (!(new.flags & KVM_MEM_LOG_DIRTY_PAGES))
647 new.dirty_bitmap = 0; 647 new.dirty_bitmap = NULL;
648 648
649 r = -ENOMEM; 649 r = -ENOMEM;
650 650
@@ -799,14 +799,14 @@ struct kvm_memory_slot *gfn_to_memslot(struct kvm *kvm, gfn_t gfn)
799 && gfn < memslot->base_gfn + memslot->npages) 799 && gfn < memslot->base_gfn + memslot->npages)
800 return memslot; 800 return memslot;
801 } 801 }
802 return 0; 802 return NULL;
803} 803}
804EXPORT_SYMBOL_GPL(gfn_to_memslot); 804EXPORT_SYMBOL_GPL(gfn_to_memslot);
805 805
806void mark_page_dirty(struct kvm *kvm, gfn_t gfn) 806void mark_page_dirty(struct kvm *kvm, gfn_t gfn)
807{ 807{
808 int i; 808 int i;
809 struct kvm_memory_slot *memslot = 0; 809 struct kvm_memory_slot *memslot = NULL;
810 unsigned long rel_gfn; 810 unsigned long rel_gfn;
811 811
812 for (i = 0; i < kvm->nmemslots; ++i) { 812 for (i = 0; i < kvm->nmemslots; ++i) {
@@ -2015,7 +2015,7 @@ static int kvm_reboot(struct notifier_block *notifier, unsigned long val,
2015 * in vmx root mode. 2015 * in vmx root mode.
2016 */ 2016 */
2017 printk(KERN_INFO "kvm: exiting hardware virtualization\n"); 2017 printk(KERN_INFO "kvm: exiting hardware virtualization\n");
2018 on_each_cpu(kvm_arch_ops->hardware_disable, 0, 0, 1); 2018 on_each_cpu(kvm_arch_ops->hardware_disable, NULL, 0, 1);
2019 } 2019 }
2020 return NOTIFY_OK; 2020 return NOTIFY_OK;
2021} 2021}
@@ -2029,7 +2029,7 @@ static __init void kvm_init_debug(void)
2029{ 2029{
2030 struct kvm_stats_debugfs_item *p; 2030 struct kvm_stats_debugfs_item *p;
2031 2031
2032 debugfs_dir = debugfs_create_dir("kvm", 0); 2032 debugfs_dir = debugfs_create_dir("kvm", NULL);
2033 for (p = debugfs_entries; p->name; ++p) 2033 for (p = debugfs_entries; p->name; ++p)
2034 p->dentry = debugfs_create_u32(p->name, 0444, debugfs_dir, 2034 p->dentry = debugfs_create_u32(p->name, 0444, debugfs_dir,
2035 p->data); 2035 p->data);
@@ -2070,7 +2070,7 @@ int kvm_init_arch(struct kvm_arch_ops *ops, struct module *module)
2070 if (r < 0) 2070 if (r < 0)
2071 return r; 2071 return r;
2072 2072
2073 on_each_cpu(kvm_arch_ops->hardware_enable, 0, 0, 1); 2073 on_each_cpu(kvm_arch_ops->hardware_enable, NULL, 0, 1);
2074 register_reboot_notifier(&kvm_reboot_notifier); 2074 register_reboot_notifier(&kvm_reboot_notifier);
2075 2075
2076 kvm_chardev_ops.owner = module; 2076 kvm_chardev_ops.owner = module;
@@ -2085,7 +2085,7 @@ int kvm_init_arch(struct kvm_arch_ops *ops, struct module *module)
2085 2085
2086out_free: 2086out_free:
2087 unregister_reboot_notifier(&kvm_reboot_notifier); 2087 unregister_reboot_notifier(&kvm_reboot_notifier);
2088 on_each_cpu(kvm_arch_ops->hardware_disable, 0, 0, 1); 2088 on_each_cpu(kvm_arch_ops->hardware_disable, NULL, 0, 1);
2089 kvm_arch_ops->hardware_unsetup(); 2089 kvm_arch_ops->hardware_unsetup();
2090 return r; 2090 return r;
2091} 2091}
@@ -2095,7 +2095,7 @@ void kvm_exit_arch(void)
2095 misc_deregister(&kvm_dev); 2095 misc_deregister(&kvm_dev);
2096 2096
2097 unregister_reboot_notifier(&kvm_reboot_notifier); 2097 unregister_reboot_notifier(&kvm_reboot_notifier);
2098 on_each_cpu(kvm_arch_ops->hardware_disable, 0, 0, 1); 2098 on_each_cpu(kvm_arch_ops->hardware_disable, NULL, 0, 1);
2099 kvm_arch_ops->hardware_unsetup(); 2099 kvm_arch_ops->hardware_unsetup();
2100 kvm_arch_ops = NULL; 2100 kvm_arch_ops = NULL;
2101} 2101}