From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 80AFBC32771 for ; Wed, 22 Jan 2020 06:41:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6194024673 for ; Wed, 22 Jan 2020 06:41:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725943AbgAVGlk convert rfc822-to-8bit (ORCPT ); Wed, 22 Jan 2020 01:41:40 -0500 Received: from szxga01-in.huawei.com ([45.249.212.187]:2932 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725883AbgAVGlk (ORCPT ); Wed, 22 Jan 2020 01:41:40 -0500 Received: from DGGEMM402-HUB.china.huawei.com (unknown [172.30.72.55]) by Forcepoint Email with ESMTP id 5DC50164CDFF9D86DBC1; Wed, 22 Jan 2020 14:41:37 +0800 (CST) Received: from dggeme766-chm.china.huawei.com (10.3.19.112) by DGGEMM402-HUB.china.huawei.com (10.3.20.210) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 22 Jan 2020 14:41:36 +0800 Received: from dggeme763-chm.china.huawei.com (10.3.19.109) by dggeme766-chm.china.huawei.com (10.3.19.112) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Wed, 22 Jan 2020 14:41:36 +0800 Received: from dggeme763-chm.china.huawei.com ([10.6.66.36]) by dggeme763-chm.china.huawei.com ([10.6.66.36]) with mapi id 15.01.1713.004; Wed, 22 Jan 2020 14:41:36 +0800 From: linmiaohe To: Sean Christopherson CC: "pbonzini@redhat.com" , "rkrcmar@redhat.com" , "vkuznets@redhat.com" , "wanpengli@tencent.com" , "jmattson@google.com" , "joro@8bytes.org" , "tglx@linutronix.de" , "mingo@redhat.com" , "bp@alien8.de" , "hpa@zytor.com" , "kvm@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "x86@kernel.org" Subject: Re: [PATCH] KVM: X86: Add 'else' to unify fastop and execute call path Thread-Topic: [PATCH] KVM: X86: Add 'else' to unify fastop and execute call path Thread-Index: AdXQ7h4phXDfYzF8TkGgPxWB+LvmzQ== Date: Wed, 22 Jan 2020 06:41:36 +0000 Message-ID: <2b928100e8354aa8a2bf2bba845e8bee@huawei.com> Accept-Language: en-US Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.173.221.158] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-CFilter-Loop: Reflected Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Hi: Sean Christopherson wrote: > On Wed, Jan 22, 2020 at 11:21:44AM +0800, linmiaohe wrote: >> From: Miaohe Lin >> >> It also helps eliminate some duplicated code. > > Reviewed-by: Sean Christopherson Thanks for your review. > >> if (ctxt->d & Fastop) { >> void (*fop)(struct fastop *) = (void *)ctxt->execute; > >The brackets can also be removed with a bit more cleanup, e.g. using a typedef to handling casting ctxt->execute. I'll send a patch that can be applied on top and/or squashed with this one. Thanks for doing this. :) > >> rc = fastop(ctxt, fop);