Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2498970pxb; Tue, 9 Mar 2021 04:14:10 -0800 (PST) X-Google-Smtp-Source: ABdhPJwbe+ovNeIRb+ZnZOZFW6KZ3MZOIZYozB/L5vpSl6lBsT1k3Dq+ClVH1ncAoZIUmKtqge/l X-Received: by 2002:a05:6402:888:: with SMTP id e8mr3638274edy.51.1615292050091; Tue, 09 Mar 2021 04:14:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615292050; cv=none; d=google.com; s=arc-20160816; b=hRRj1h3E/U49hDYKJ3fjwk4Fae9WTaTKpF/ShdUvnclCeiyA3DAF6yGQQf3wW4tqv+ iHaO6574Fnp9z5K3uxM/HqgpR+viqUjTkRQYrecSyRfKZQdnshfeGdvz8aqCfjUMK65l qAT/DcHQdsiCjombChGOUngtlK9tBoRnS/g7vJtfFtO2G5KusQZWD7zGPGV/4T0BvzuR BvUozwMeeGAdAsxUKDsALQqNdKF/TVXE4SbJgS04ukdR0mTW/lQddGnY10cyhj3vcIMZ nSZNhZjSLg+0SH2IsWWEgvKi67k7R4eRM77TtlWRHWIAa5AN1WqXkGGwuhaOB9GG0TO0 ZFWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=VtTQN8o00mg0my2/+HOfCJtJ9nCWwNuGrrpL4QmKqMM=; b=r2l0vlOWnOfnkHLN3QOUA+7ks/lfRQmYlo57g01L/oc7IVPD4se8j98zukxxc3A18A g7eGcOcmqelng9IrbgbIIdxglT7fejFuJ4HzgAP/zGZJivDYui9o+1GNKjUBmrH9beeE Upwm3IapQcxkroEznLx+K/6jb3o76uRn0C6HFj09Pb/GLIl1pmDBoDExxt2Akv8PzfCY e8LlYNevdpclGbtRaoPUE8az/0NRRkzbMPDer7wM3szdpWYqMd5HRJGuyuaQuBpMM54E GR1Klm8e+7fsfIEwF4J4kmDSzBwv/X5kZIAaRo22mVHd1JaAi5XjDtHP8G/xluW++l3E zrsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=abIERcnM; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y9si9536462edp.151.2021.03.09.04.13.47; Tue, 09 Mar 2021 04:14:10 -0800 (PST) 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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=abIERcnM; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231468AbhCIMK5 (ORCPT + 99 others); Tue, 9 Mar 2021 07:10:57 -0500 Received: from mail.kernel.org ([198.145.29.99]:58958 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230437AbhCIMKE (ORCPT ); Tue, 9 Mar 2021 07:10:04 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 979846522B; Tue, 9 Mar 2021 12:10:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1615291803; bh=5H0ofGIXCbizaDWx7RqmfTZXx4TbcZuHEwJsCBpIim8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=abIERcnMnkQoqYKMIf12tNCIn54cSlOsRY67TXg0yk+79rIH4FVQosWFBeNOVKNLn 421XThUOWngEP4y5B10BRFENBh9uuQnV1WRT424tG2+l6TPsCgeaczjRAK7BgGRhaW Wy5MvpRNalMHpL/HTtjzf7P/TX9AoIT+ynlwZ5m4q6jPjoqkAo94mmM47ZLcC6/xeZ ov/q+7j8URut00UWV2xUx5otcRdxhfEDagm9VHu80r/3FK5Ta6I5MXIVekJ+Oh8SFM s5YSTqXbNfPCJhzONtoo7DlMF02dKMKJhzJGSa+R9ulXJWn5PYA8vWtS8UwKhHJdUB XOOCiQTauQIxw== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 8786240647; Tue, 9 Mar 2021 09:10:01 -0300 (-03) Date: Tue, 9 Mar 2021 09:10:01 -0300 From: Arnaldo Carvalho de Melo To: Jiapeng Chong Cc: peterz@infradead.org, mingo@redhat.com, mark.rutland@arm.com, alexander.shishkin@linux.intel.com, jolsa@redhat.com, namhyung@kernel.org, ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org, kafai@fb.com, songliubraving@fb.com, yhs@fb.com, john.fastabend@gmail.com, kpsingh@kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, bpf@vger.kernel.org Subject: Re: [PATCH] perf machine: Assign boolean values to a bool variable Message-ID: References: <1615284669-82139-1-git-send-email-jiapeng.chong@linux.alibaba.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1615284669-82139-1-git-send-email-jiapeng.chong@linux.alibaba.com> X-Url: http://acmel.wordpress.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Tue, Mar 09, 2021 at 06:11:09PM +0800, Jiapeng Chong escreveu: > Fix the following coccicheck warnings: > > ./tools/perf/util/machine.c:2041:9-10: WARNING: return of 0/1 in > function 'symbol__match_regex' with return type bool. Thanks, applied. - Arnaldo > Reported-by: Abaci Robot > Signed-off-by: Jiapeng Chong > --- > tools/perf/util/machine.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c > index b5c2d8b..435771e 100644 > --- a/tools/perf/util/machine.c > +++ b/tools/perf/util/machine.c > @@ -2038,8 +2038,8 @@ int machine__process_event(struct machine *machine, union perf_event *event, > static bool symbol__match_regex(struct symbol *sym, regex_t *regex) > { > if (!regexec(regex, sym->name, 0, NULL, 0)) > - return 1; > - return 0; > + return true; > + return false; > } > > static void ip__resolve_ams(struct thread *thread, > -- > 1.8.3.1 > -- - Arnaldo