From: "Mohammed Gamal" Subject: Re: [PATCH] x86 emulator: Simplify emulating Grp4/Grp5 instructions. Date: Wed, 20 Aug 2008 04:53:51 +0300 Message-ID: <52d4a3890808191853g3f2027r41e4146fc3bcc039@mail.gmail.com> References: <20080818221709.GA18416@mohd-laptop> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit To: kvm@vger.kernel.org Return-path: Received: from fg-out-1718.google.com ([72.14.220.155]:14499 "EHLO fg-out-1718.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750898AbYHTBxw (ORCPT ); Tue, 19 Aug 2008 21:53:52 -0400 Received: by fg-out-1718.google.com with SMTP id 19so164739fgg.17 for ; Tue, 19 Aug 2008 18:53:51 -0700 (PDT) In-Reply-To: <20080818221709.GA18416@mohd-laptop> Content-Disposition: inline Sender: kvm-owner@vger.kernel.org List-ID: On Tue, Aug 19, 2008 at 1:17 AM, Mohammed Gamal wrote: > emulate_grp45() always returns 0. Therefore there is no need to check > its return value. > > Signed-off-by: Mohammed Gamal > --- > arch/x86/kvm/x86_emulate.c | 4 +--- > 1 files changed, 1 insertions(+), 3 deletions(-) > > diff --git a/arch/x86/kvm/x86_emulate.c b/arch/x86/kvm/x86_emulate.c > index b97e80e..3aa9acb 100644 > --- a/arch/x86/kvm/x86_emulate.c > +++ b/arch/x86/kvm/x86_emulate.c > @@ -1810,9 +1810,7 @@ special_insn: > c->dst.type = OP_NONE; /* Disable writeback. */ > break; > case 0xfe ... 0xff: /* Grp4/Grp5 */ > - rc = emulate_grp45(ctxt, ops); > - if (rc != 0) > - goto done; > + emulate_grp45(ctxt, ops); > break; > } > > -- > 1.5.4.3 > > > Ignore this patch, it'd be wiser to keep the check when we add the rest of Grp4/5 instructions to emulate_grp45()