From patchwork Fri Aug 31 09:42:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shaokun Zhang X-Patchwork-Id: 10583477 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7E825175A for ; Fri, 31 Aug 2018 09:45:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6520E2B4D8 for ; Fri, 31 Aug 2018 09:45:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 589F12B4FD; Fri, 31 Aug 2018 09:45:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B9C212B4FD for ; Fri, 31 Aug 2018 09:45:10 +0000 (UTC) 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=phb56RNU3LLh4Zwe2UtImt6FjXrJMZz+4bCmbD9+wrk=; b=EKuMwVhFSSM5dv n+xBbzfCDa9zDCVoI6V0OAO9N8EfivhhCOgpX870aPkWKNbw4XsCfAEUI9cMkjm88w7IVR6QB2tpZ NVEE9wzHw7RFfMg2U5xHFQz1E8AY1zb0iS/j0cNavCYE3Jt5YTlCPUrsIZeIyll4KKyUf5nu/2V+o sAQikTHHrtMY1nftxY+2xNwTc/n2yb/lPP7EvoDi+3TZG7dmx1ZB/yKyPL64yfj2PAqESXIgpo63c qhij4WYb2iZgrmiVgKLQprJ+ylsbDZmRa9U+sOJFehfl8/fZvnfMKMjdXobjJGd5/OTl0Lmkl1Ili YmRGUOD0Xb+j61dKEvgA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fvfzE-0006ZI-4A; Fri, 31 Aug 2018 09:45:04 +0000 Received: from szxga07-in.huawei.com ([45.249.212.35] helo=huawei.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fvfz9-0006XB-Al for linux-arm-kernel@lists.infradead.org; Fri, 31 Aug 2018 09:45:00 +0000 Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id E89FE897E1E11; Fri, 31 Aug 2018 17:44:38 +0800 (CST) Received: from localhost.localdomain (10.67.212.132) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.399.0; Fri, 31 Aug 2018 17:44:31 +0800 From: Shaokun Zhang To: , Subject: [PATCH] KVM: arm64: remove the unnecessary function check Date: Fri, 31 Aug 2018 17:42:59 +0800 Message-ID: <1535708579-12233-1-git-send-email-zhangshaokun@hisilicon.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-Originating-IP: [10.67.212.132] X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180831_024459_532871_97A7112E X-CRM114-Status: GOOD ( 11.19 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Shaokun Zhang , Marc Zyngier , Christoffer Dall Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP init_common_resources always return 0 and it is redundant to check the return value, let's make it void to simplify the code. Cc: Christoffer Dall Cc: Marc Zyngier Signed-off-by: Shaokun Zhang --- virt/kvm/arm/arm.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/virt/kvm/arm/arm.c b/virt/kvm/arm/arm.c index c92053b..66a29c9 100644 --- a/virt/kvm/arm/arm.c +++ b/virt/kvm/arm/arm.c @@ -1406,13 +1406,11 @@ static inline void hyp_cpu_pm_exit(void) } #endif -static int init_common_resources(void) +static void init_common_resources(void) { /* set size of VMID supported by CPU */ kvm_vmid_bits = kvm_get_vmid_bits(); kvm_info("%d-bit VMID\n", kvm_vmid_bits); - - return 0; } static int init_subsystems(void) @@ -1655,9 +1653,7 @@ int kvm_arch_init(void *opaque) } } - err = init_common_resources(); - if (err) - return err; + init_common_resources(); in_hyp_mode = is_kernel_in_hyp_mode();