From patchwork Fri Jul 1 04:21:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bo Liu X-Patchwork-Id: 12902735 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9FA9EC43334 for ; Fri, 1 Jul 2022 05:48:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233921AbiGAFsh (ORCPT ); Fri, 1 Jul 2022 01:48:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56100 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231426AbiGAFse (ORCPT ); Fri, 1 Jul 2022 01:48:34 -0400 Received: from unicom145.biz-email.net (unicom145.biz-email.net [210.51.26.145]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3E3F32F2; Thu, 30 Jun 2022 22:48:29 -0700 (PDT) Received: from ([60.208.111.195]) by unicom145.biz-email.net ((D)) with ASMTP (SSL) id VCX00123; Fri, 01 Jul 2022 13:48:23 +0800 Received: from localhost.localdomain (10.200.104.97) by jtjnmail201607.home.langchao.com (10.100.2.7) with Microsoft SMTP Server id 15.1.2507.9; Fri, 1 Jul 2022 13:48:22 +0800 From: Bo Liu To: , , , , , , , CC: , , Bo Liu Subject: [PATCH] KVM: x86/mmu: Return true/false from bool function Date: Fri, 1 Jul 2022 00:21:22 -0400 Message-ID: <20220701042122.5273-1-liubo03@inspur.com> X-Mailer: git-send-email 2.18.2 MIME-Version: 1.0 X-Originating-IP: [10.200.104.97] tUid: 20227011348236a2f1c9ffd7be92f9e8e0b4b6e725e20 X-Abuse-Reports-To: service@corp-email.com Abuse-Reports-To: service@corp-email.com X-Complaints-To: service@corp-email.com X-Report-Abuse-To: service@corp-email.com Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Return boolean values ("true" or "false") instead of integer values from bool function. Signed-off-by: Bo Liu --- arch/x86/kvm/mmu/mmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kvm/mmu/mmu.c b/arch/x86/kvm/mmu/mmu.c index bfb50262fd37..572e0c487376 100644 --- a/arch/x86/kvm/mmu/mmu.c +++ b/arch/x86/kvm/mmu/mmu.c @@ -1024,7 +1024,7 @@ static bool rmap_can_add(struct kvm_vcpu *vcpu) struct kvm_mmu_memory_cache *mc; mc = &vcpu->arch.mmu_pte_list_desc_cache; - return kvm_mmu_memory_cache_nr_free_objects(mc); + return !!kvm_mmu_memory_cache_nr_free_objects(mc); } static void rmap_remove(struct kvm *kvm, u64 *spte)