Message ID | 20191130033029.61059-1-guoheyi@huawei.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=usM2=ZW=lists.infradead.org=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@kernel.org> 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 92FC613A4 for <patchwork-linux-arm@patchwork.kernel.org>; Sat, 30 Nov 2019 03:31:52 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5EE1E207FC for <patchwork-linux-arm@patchwork.kernel.org>; Sat, 30 Nov 2019 03:31:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="rcR/7k2e" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5EE1E207FC Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=LCn6GdSEpKMM/ecZ7QpOxlcPGa0l50r7kuGUdjK3FTE=; b=rcR/7k2e1mxtWZ Yt8u5B9S9x/6eC1BuRO03Zf8giHWZUVOE0lxdO/qjrG7e994eAwvP9I6OVWeC69Esv88vvLe95sDP S6qxXT/n6hiagmpUIKrar/jm50VWDUWWrsYGJCnd/D3wlFT5m21rW+zv0SVe+HzA7ZMGEsCbb/qwV jWXuO3/wIxRngf4fb3kEscoVehdU4F10youztDDTh9hQYDOWk41WDMhHeroimGj63E6eUqB8T4q/l r+HJ7Fx/Kt8JoxptaTMQBZWVknyvb6O/Zrh+EVMmgErmrlPeH1hDXJhgHWuzILzsClAY62JJfLEfR vj/ePh+rvwSEiFkxbovg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iatU5-00086F-0f; Sat, 30 Nov 2019 03:31:49 +0000 Received: from szxga07-in.huawei.com ([45.249.212.35] helo=huawei.com) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iatU1-00085n-5Z for linux-arm-kernel@lists.infradead.org; Sat, 30 Nov 2019 03:31:46 +0000 Received: from DGGEMS405-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 3F144FF97D9E9D257E9E; Sat, 30 Nov 2019 11:31:41 +0800 (CST) Received: from linux-XCyijm.huawei.com (10.175.104.212) by DGGEMS405-HUB.china.huawei.com (10.3.19.205) with Microsoft SMTP Server id 14.3.439.0; Sat, 30 Nov 2019 11:31:32 +0800 From: Heyi Guo <guoheyi@huawei.com> To: <linux-arm-kernel@lists.infradead.org>, <kvmarm@lists.cs.columbia.edu>, <linux-kernel@vger.kernel.org> Subject: [PATCH] trivial: kvm/arm: merge cases to reduce code lines Date: Sat, 30 Nov 2019 11:30:29 +0800 Message-ID: <20191130033029.61059-1-guoheyi@huawei.com> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 X-Originating-IP: [10.175.104.212] X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191129_193145_371233_3A66EC22 X-CRM114-Status: UNSURE ( 8.65 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [45.249.212.35 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Cc: Jiri Kosina <trivial@kernel.org>, Suzuki K Poulose <suzuki.poulose@arm.com>, Marc Zyngier <maz@kernel.org>, James Morse <james.morse@arm.com>, Heyi Guo <guoheyi@huawei.com>, wanghaibin.wang@huawei.com, Julien Thierry <julien.thierry.kdev@gmail.com> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org |
Series |
trivial: kvm/arm: merge cases to reduce code lines
|
expand
|
diff --git a/virt/kvm/arm/arm.c b/virt/kvm/arm/arm.c index 86c6aa1cb58e..6f94080969d1 100644 --- a/virt/kvm/arm/arm.c +++ b/virt/kvm/arm/arm.c @@ -197,8 +197,6 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext) case KVM_CAP_IMMEDIATE_EXIT: case KVM_CAP_VCPU_EVENTS: case KVM_CAP_ARM_IRQ_LINE_LAYOUT_2: - r = 1; - break; case KVM_CAP_ARM_SET_DEVICE_ADDR: r = 1; break;
It seems a little confusing for KVM_CAP_ARM_SET_DEVICE_ADDR to have a separate branch while it doesn't have any difference with the above cases. So we merge it to the above cases, which can also save 2 lines. Signed-off-by: Heyi Guo <guoheyi@huawei.com> Cc: Marc Zyngier <maz@kernel.org> Cc: James Morse <james.morse@arm.com> Cc: Julien Thierry <julien.thierry.kdev@gmail.com> Cc: Suzuki K Poulose <suzuki.poulose@arm.com> Cc: Jiri Kosina <trivial@kernel.org> --- virt/kvm/arm/arm.c | 2 -- 1 file changed, 2 deletions(-)