From patchwork Tue Feb 18 03:39:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miaohe Lin X-Patchwork-Id: 11387805 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6EFB692A for ; Tue, 18 Feb 2020 03:38:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5520E24655 for ; Tue, 18 Feb 2020 03:38:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726296AbgBRDiC (ORCPT ); Mon, 17 Feb 2020 22:38:02 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:10199 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726245AbgBRDiC (ORCPT ); Mon, 17 Feb 2020 22:38:02 -0500 Received: from DGGEMS404-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id AB648AC856EDC6C2B8F1; Tue, 18 Feb 2020 11:37:59 +0800 (CST) Received: from huawei.com (10.175.105.18) by DGGEMS404-HUB.china.huawei.com (10.3.19.204) with Microsoft SMTP Server id 14.3.439.0; Tue, 18 Feb 2020 11:37:52 +0800 From: linmiaohe To: , , , , , , , , , , CC: , , , Subject: [PATCH] KVM: VMX: replace "fall through" with "return true" to indicate different case Date: Tue, 18 Feb 2020 11:39:28 +0800 Message-ID: <1581997168-20350-1-git-send-email-linmiaohe@huawei.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 X-Originating-IP: [10.175.105.18] X-CFilter-Loop: Reflected Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org From: Miaohe Lin The second "/* fall through */" in rmode_exception() makes code harder to read. Replace it with "return true" to indicate they are different cases and also this improves the readability. Suggested-by: Vitaly Kuznetsov Signed-off-by: Miaohe Lin Reviewed-by: Vitaly Kuznetsov --- arch/x86/kvm/vmx/vmx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c index a13368b2719c..c5bcbbada2db 100644 --- a/arch/x86/kvm/vmx/vmx.c +++ b/arch/x86/kvm/vmx/vmx.c @@ -4495,7 +4495,7 @@ static bool rmode_exception(struct kvm_vcpu *vcpu, int vec) if (vcpu->guest_debug & (KVM_GUESTDBG_SINGLESTEP | KVM_GUESTDBG_USE_HW_BP)) return false; - /* fall through */ + return true; case DE_VECTOR: case OF_VECTOR: case BR_VECTOR: