]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
arm64: KVM: use 'int' instead of 'u32' for variable 'target' in kvm_host.h.
authorChen Gang <gang.chen@asianux.com>
Mon, 22 Jul 2013 03:40:38 +0000 (04:40 +0100)
committerMarc Zyngier <marc.zyngier@arm.com>
Fri, 9 Aug 2013 12:42:43 +0000 (13:42 +0100)
'target' will be set to '-1' in kvm_arch_vcpu_init(), and it need check
'target' whether less than zero or not in kvm_vcpu_initialized().

So need define target as 'int' instead of 'u32', just like ARM has done.

The related warning:

  arch/arm64/kvm/../../../arch/arm/kvm/arm.c:497:2: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]

Signed-off-by: Chen Gang <gang.chen@asianux.com>
[Marc: reformated the Subject line to fit the series]
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
arch/arm64/include/asm/kvm_host.h

index 644d7395686493e371d01266c98597a00a104da4..0859a4ddd1e7d0e8b1792416b19a8f9908457af7 100644 (file)
@@ -129,7 +129,7 @@ struct kvm_vcpu_arch {
        struct kvm_mmu_memory_cache mmu_page_cache;
 
        /* Target CPU and feature flags */
-       u32 target;
+       int target;
        DECLARE_BITMAP(features, KVM_VCPU_MAX_FEATURES);
 
        /* Detect first run of a vcpu */