From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Subject: Re: [PATCH 1/2] KVM: PIT: remove useless code from kvm_create_pit() Date: Mon, 8 Feb 2010 16:00:53 -0200 Message-ID: <20100208180053.GA5415@amt.cnet> References: <4B6FD2DB.9040104@cn.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm@vger.kernel.org To: Wei Yongjun Return-path: Received: from mx1.redhat.com ([209.132.183.28]:48477 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752474Ab0BHSIc (ORCPT ); Mon, 8 Feb 2010 13:08:32 -0500 Content-Disposition: inline In-Reply-To: <4B6FD2DB.9040104@cn.fujitsu.com> Sender: kvm-owner@vger.kernel.org List-ID: On Mon, Feb 08, 2010 at 05:01:15PM +0800, Wei Yongjun wrote: > kvm->arch.vpit will be set to the return value of kvm_create_pit(), > so we do not need to set kvm->arch.vpit in kvm_create_pit(). This > patch remove the useless code. > > Signed-off-by: Wei Yongjun The device could be accessed between kvm_io_bus_register_dev and kvm->arch.vpit assignment in the ioctl handler. > --- > arch/x86/kvm/i8254.c | 1 - > 1 files changed, 0 insertions(+), 1 deletions(-) > > diff --git a/arch/x86/kvm/i8254.c b/arch/x86/kvm/i8254.c > index 6a74246..6c90091 100644 > --- a/arch/x86/kvm/i8254.c > +++ b/arch/x86/kvm/i8254.c > @@ -626,7 +626,6 @@ struct kvm_pit *kvm_create_pit(struct kvm *kvm, u32 flags) > mutex_lock(&pit->pit_state.lock); > spin_lock_init(&pit->pit_state.inject_lock); > > - kvm->arch.vpit = pit; > pit->kvm = kvm; > > pit_state = &pit->pit_state;