- drivers/kvm/* - remove ptr comparisons to 0
PATCH 1/1 - drivers/kvm/* - remove ptr comparisons to 0
fix sparse warnings "Using plain integer as NULL pointer"
Signed-off-by Joe Perches <[email protected]>
---
drivers/kvm/kvm.h | 2 +- drivers/kvm/kvm_main.c | 3 ++- drivers/kvm/lapic.c | 2 +- drivers/kvm/svm.c | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-)
drivers/kvm/kvm.h +1 -1
@@ -433,7 +433,7 @@ static inline struct kvm_ioapic *ioapic_irqchip(struct kvm *kvm)static inline int irqchip_in_kernel (struct kvm *kvm) { -return pic_irqchip (kvm) !=0 ; +return pic_irqchip (kvm) !=NULL ; }struct descriptor_table {
drivers/kvm/kvm_main.c +2 -1
@@ -3535,7 +3535,8 @@ int kvm_init_x86(struct kvm_x86_ops *ops, unsigned int vcpu_size,/* A kmem cache lets us meet the alignment requirements of fx_save. */ kvm_vcpu_cache =kmem_cache_create ("kvm_vcpu" , vcpu_size, - __alignof__(struct kvm_vcpu ),0 ,0 ); + __alignof__(struct kvm_vcpu ), +0 ,NULL );if (!kvm_vcpu_cache) { r = -ENOMEM ; goto out_free_4;
drivers/kvm/lapic.c +1 -1
@@ -771,7 +771,7 @@ void kvm_free_apic(struct kvm_lapic *apic)if (apic->regs_page) {__free_page (apic->regs_page); - apic->regs_page =0 ; + apic->regs_page =NULL ; }kfree (apic);
drivers/kvm/svm.c +1 -1
@@ -1282,7 +1282,7 @@ static int handle_exit(struct kvm_run *kvm_run, struct kvm_vcpu *vcpu) exit_code);if (exit_code >=ARRAY_SIZE (svm_exit_handlers) - || svm_exit_handlers[exit_code] ==0 ) { + || !svm_exit_handlers[exit_code]) { kvm_run->exit_reason =KVM_EXIT_UNKNOWN ; kvm_run->hw.hardware_exit_reason = exit_code;return 0 ;
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/
Avi Kivity
AppliedQuoted 3 lines · Joe Perches
fix sparse warnings "Using plain integer as NULL pointer"
Applied, thanks.
Signature · 1 line
error compiling committee.c: too many arguments to function