Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3090606pxf; Mon, 15 Mar 2021 00:41:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwkjDfI7xqrUyZvErMDlzk1+nWC1OIJ55ovg2XEQDBLckMnFrwejR4zgdlg9BevwiHSMuzr X-Received: by 2002:a17:907:3e92:: with SMTP id hs18mr21505720ejc.396.1615794085562; Mon, 15 Mar 2021 00:41:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615794085; cv=none; d=google.com; s=arc-20160816; b=R/BjkE7XljIIDfx1+6ZppBKY6DlbLz/+Uj+lkxAiC5x4Sxj/Zg+L64f++rR6FNPM+w M2YiWT2MNwjRZHcdv1AUsIT2SzwOaxnR+A46fhaRy1bKfPFvtJngMJHa1k+38d3PJBOc eCp7t4k3a/gG8bpMxWMNOTFfTJUxCHa7INlcDvSxZvAAzKJdqlecBTY9SJ25nPcKNhuU 5BftwT5luy5DtsNJYF7nW3BXH7+VnBirlLFZPNZU2ZBvtfOOmdC0QLXhavx/IgObDjmi 8RcJTYdofJAOwHg6Nq6vcjUmOoaLGB60En4YqiFDm2oZy9QeSxKbm1yV91qUaI55bGKy r2Ig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=I+NU8/JbAlEqlFb5VcX0I2O1PTzR4wUMjOTyCW2f1K8=; b=FZRchE9q6up7Kb2Vc+hTCIRCEz9XAJU006OWFXpfb0CLhJyb825taagg+ikUWsOSKq UYedEzCYkb3aJEh+50fvYfjB9UAULz+KJc4D/irghgJRB+c14MWprBortkNZ3iEO3+EW jwrdxj3It1hsPt0mHV3DHJ5LCq94oB9ItT5EqhxWDQ94CnVTNmYGdqXJtGf7fDPuK9iY nHjraH2S8uEPprQ5ZlnKNHKIDxyAScQ4HSvWxDylbkEPOSAullvY2kMgmlx+qFcOGphP bQElQ0hLUb0Qd6u9Xjiedqm6rTEQgph8Rx/rtGmVi9FUdw47ENvYGV4zkAUBegrCCHA1 Z6uw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y1si10421048ejm.229.2021.03.15.00.41.02; Mon, 15 Mar 2021 00:41:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229807AbhCOHkG (ORCPT + 99 others); Mon, 15 Mar 2021 03:40:06 -0400 Received: from out30-133.freemail.mail.aliyun.com ([115.124.30.133]:49073 "EHLO out30-133.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229644AbhCOHkF (ORCPT ); Mon, 15 Mar 2021 03:40:05 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R121e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04423;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=9;SR=0;TI=SMTPD_---0URx640M_1615794001; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0URx640M_1615794001) by smtp.aliyun-inc.com(127.0.0.1); Mon, 15 Mar 2021 15:40:02 +0800 From: Yang Li To: bhelgaas@google.com Cc: tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, x86@kernel.org, hpa@zytor.com, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Yang Li Subject: [PATCH] x86/pci: use true and false for bool variable Date: Mon, 15 Mar 2021 15:40:00 +0800 Message-Id: <1615794000-102771-1-git-send-email-yang.lee@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org fixed the following coccicheck: ./arch/x86/pci/mmconfig-shared.c:464:9-10: WARNING: return of 0/1 in function 'is_mmconf_reserved' with return type bool ./arch/x86/pci/mmconfig-shared.c:493:5-6: WARNING: return of 0/1 in function 'is_mmconf_reserved' with return type bool ./arch/x86/pci/mmconfig-shared.c:501:9-10: WARNING: return of 0/1 in function 'is_mmconf_reserved' with return type bool ./arch/x86/pci/mmconfig-shared.c:522:5-6: WARNING: return of 0/1 in function 'is_mmconf_reserved' with return type bool Reported-by: Abaci Robot Signed-off-by: Yang Li --- arch/x86/pci/mmconfig-shared.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/x86/pci/mmconfig-shared.c b/arch/x86/pci/mmconfig-shared.c index de6bf0e..758cbfe 100644 --- a/arch/x86/pci/mmconfig-shared.c +++ b/arch/x86/pci/mmconfig-shared.c @@ -461,7 +461,7 @@ static bool __ref is_mmconf_reserved(check_reserved_t is_reserved, } if (size < (16UL<<20) && size != old_size) - return 0; + return false; if (dev) dev_info(dev, "MMCONFIG at %pR reserved in %s\n", @@ -493,7 +493,7 @@ static bool __ref is_mmconf_reserved(check_reserved_t is_reserved, &cfg->res, (unsigned long) cfg->address); } - return 1; + return true; } static bool __ref @@ -501,7 +501,7 @@ static bool __ref is_mmconf_reserved(check_reserved_t is_reserved, { if (!early && !acpi_disabled) { if (is_mmconf_reserved(is_acpi_reserved, cfg, dev, 0)) - return 1; + return true; if (dev) dev_info(dev, FW_INFO @@ -522,14 +522,14 @@ static bool __ref is_mmconf_reserved(check_reserved_t is_reserved, * _CBA method, just assume it's reserved. */ if (pci_mmcfg_running_state) - return 1; + return true; /* Don't try to do this check unless configuration type 1 is available. how about type 2 ?*/ if (raw_pci_ops) return is_mmconf_reserved(e820__mapped_all, cfg, dev, 1); - return 0; + return false; } static void __init pci_mmcfg_reject_broken(int early) -- 1.8.3.1