]> git.karo-electronics.de Git - linux-beck.git/commitdiff
KVM: ARM/arm64: fix non-const declaration of function returning const
authorWill Deacon <will.deacon@arm.com>
Tue, 26 Aug 2014 14:13:20 +0000 (15:13 +0100)
committerChristoffer Dall <christoffer.dall@linaro.org>
Wed, 27 Aug 2014 20:49:45 +0000 (22:49 +0200)
Sparse kicks up about a type mismatch for kvm_target_cpu:

arch/arm64/kvm/guest.c:271:25: error: symbol 'kvm_target_cpu' redeclared with different type (originally declared at ./arch/arm64/include/asm/kvm_host.h:45) - different modifiers

so fix this by adding the missing const attribute to the function
declaration.

Cc: Christoffer Dall <christoffer.dall@linaro.org>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
arch/arm/include/asm/kvm_host.h
arch/arm64/include/asm/kvm_host.h

index 6dfb404f6c462008bcee3aee58a1bb6a129524b2..fcb12a6f7db517105c051d1a347b4093e67e02a9 100644 (file)
@@ -42,7 +42,7 @@
 
 struct kvm_vcpu;
 u32 *kvm_vcpu_reg(struct kvm_vcpu *vcpu, u8 reg_num, u32 mode);
-int kvm_target_cpu(void);
+int __attribute_const__ kvm_target_cpu(void);
 int kvm_reset_vcpu(struct kvm_vcpu *vcpu);
 void kvm_reset_coprocs(struct kvm_vcpu *vcpu);
 
index e10c45a578e36278f147f0eda678587f8e285b01..44094e5598480b21e545cae9f8daa93292e9434d 100644 (file)
@@ -42,7 +42,7 @@
 #define KVM_VCPU_MAX_FEATURES 3
 
 struct kvm_vcpu;
-int kvm_target_cpu(void);
+int __attribute_const__ kvm_target_cpu(void);
 int kvm_reset_vcpu(struct kvm_vcpu *vcpu);
 int kvm_arch_dev_ioctl_check_extension(long ext);