linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM64: include: asm: use 'int' instead of 'u32' for variable 'target' in kvm_host.h.
@ 2013-07-22  3:40 Chen Gang
  2013-07-30  2:52 ` Chen Gang
  2013-07-30  3:49 ` Christoffer Dall
  0 siblings, 2 replies; 5+ messages in thread
From: Chen Gang @ 2013-07-22  3:40 UTC (permalink / raw)
  To: linux-arm-kernel

'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>
---
 arch/arm64/include/asm/kvm_host.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm64/include/asm/kvm_host.h b/arch/arm64/include/asm/kvm_host.h
index 644d739..0859a4d 100644
--- a/arch/arm64/include/asm/kvm_host.h
+++ b/arch/arm64/include/asm/kvm_host.h
@@ -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 */
-- 
1.7.7.6

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-07-30  8:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-22  3:40 [PATCH] ARM64: include: asm: use 'int' instead of 'u32' for variable 'target' in kvm_host.h Chen Gang
2013-07-30  2:52 ` Chen Gang
2013-07-30  3:49 ` Christoffer Dall
2013-07-30  7:41   ` Marc Zyngier
2013-07-30  8:11     ` Chen Gang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).