From nobody Sun Jun 21 10:40:27 2026 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 0B053C433EF for ; Thu, 7 Apr 2022 02:41:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239381AbiDGCnl (ORCPT ); Wed, 6 Apr 2022 22:43:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58486 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239354AbiDGCnb (ORCPT ); Wed, 6 Apr 2022 22:43:31 -0400 Received: from mail.meizu.com (edge07.meizu.com [112.91.151.210]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E99D1B72CC; Wed, 6 Apr 2022 19:41:32 -0700 (PDT) Received: from IT-EXMB-1-125.meizu.com (172.16.1.125) by mz-mail11.meizu.com (172.16.1.15) with Microsoft SMTP Server (TLS) id 14.3.487.0; Thu, 7 Apr 2022 18:51:51 +0800 Received: from meizu.meizu.com (172.16.137.70) by IT-EXMB-1-125.meizu.com (172.16.1.125) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.14; Thu, 7 Apr 2022 10:41:24 +0800 From: Haowen Bai To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , "Namhyung Kim" , Thomas Gleixner , "Borislav Petkov" , Dave Hansen , , "H. Peter Anvin" CC: Haowen Bai , , Subject: [PATCH] perf/x86/amd: Return true/false (not 1/0) from bool functions Date: Thu, 7 Apr 2022 10:41:22 +0800 Message-ID: <1649299283-3083-1-git-send-email-baihaowen@meizu.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-Originating-IP: [172.16.137.70] X-ClientProxiedBy: IT-EXMB-1-126.meizu.com (172.16.1.126) To IT-EXMB-1-125.meizu.com (172.16.1.125) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Return boolean values ("true" or "false") instead of 1 or 0 from bool functions. This fixes the following warnings from coccicheck: arch/x86/events/amd/brs.c:202:9-10: WARNING: return of 0/1 in function 'amd_brs_match_plm' with return type bool Signed-off-by: Haowen Bai --- arch/x86/events/amd/brs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/x86/events/amd/brs.c b/arch/x86/events/amd/brs.c index 895c82165d85..44c80a3ab9f0 100644 --- a/arch/x86/events/amd/brs.c +++ b/arch/x86/events/amd/brs.c @@ -199,12 +199,12 @@ static bool amd_brs_match_plm(struct perf_event *even= t, u64 to) int plm_u =3D PERF_SAMPLE_BRANCH_USER; =20 if (!(type & plm_k) && kernel_ip(to)) - return 0; + return false; =20 if (!(type & plm_u) && !kernel_ip(to)) - return 0; + return false; =20 - return 1; + return true; } =20 /* --=20 2.7.4