From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chen Gang Subject: Re: [PATCH] ARM64: include: asm: use 'int' instead of 'u32' for variable 'target' in kvm_host.h. Date: Tue, 30 Jul 2013 10:52:13 +0800 Message-ID: <51F72A5D.1090004@asianux.com> References: <51ECA9B6.3010808@asianux.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Catalin Marinas , Will Deacon , "linux-arm-kernel@lists.infradead.org" , kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org To: Marc Zyngier , Gleb Natapov , pbonzini@redhat.com Return-path: Received: from intranet.asianux.com ([58.214.24.6]:9626 "EHLO intranet.asianux.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754356Ab3G3CxO (ORCPT ); Mon, 29 Jul 2013 22:53:14 -0400 In-Reply-To: <51ECA9B6.3010808@asianux.com> Sender: kvm-owner@vger.kernel.org List-ID: Hello Maintainers: Please help check the patch whether OK or not, when you have time. Thanks. On 07/22/2013 11:40 AM, Chen Gang wrote: > '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 > --- > 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 */ > -- Chen Gang