From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 2/4] KVM: Simplify exit path on decode failure Date: Tue, 11 Jan 2011 11:40:45 +0200 Message-ID: <4D2C259D.2080403@redhat.com> References: <1294146884-6253-1-git-send-email-avi@redhat.com> <1294146884-6253-3-git-send-email-avi@redhat.com> <4D2B3F42.6030006@siemens.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Cc: Marcelo Tosatti , kvm@vger.kernel.org To: Jan Kiszka Return-path: Received: from mx1.redhat.com ([209.132.183.28]:8539 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753153Ab1AKJkv (ORCPT ); Tue, 11 Jan 2011 04:40:51 -0500 In-Reply-To: <4D2B3F42.6030006@siemens.com> Sender: kvm-owner@vger.kernel.org List-ID: On 01/10/2011 07:17 PM, Jan Kiszka wrote: > Am 04.01.2011 14:14, Avi Kivity wrote: > > 'goto done' leads to a maze of checks and actions, all pointless. Bail > > out immediately if we can't decode. > > > > Signed-off-by: Avi Kivity > > --- > > arch/x86/kvm/x86.c | 2 +- > > 1 files changed, 1 insertions(+), 1 deletions(-) > > > > diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c > > index b20499d..b085ac3 100644 > > --- a/arch/x86/kvm/x86.c > > +++ b/arch/x86/kvm/x86.c > > @@ -4392,7 +4392,7 @@ int x86_emulate_instruction(struct kvm_vcpu *vcpu, > > > > r = x86_decode_insn(&vcpu->arch.emulate_ctxt, insn, insn_len); > > if (r != EMULATION_OK) > > - goto done; > > + return EMULATE_FAIL; > > This leaves 'done' unused behind, and the compiler mourns. It's already in 'next'. Marcelo can you amend it? -- error compiling committee.c: too many arguments to function