Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2428586pxb; Tue, 9 Mar 2021 02:13:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJypvEYlk7pVudB54j0vgyldYhQ4LtKpHQQhKX6Lodo1G1YfixcJg9IG9dKeMOEzTu4U0YGY X-Received: by 2002:a17:906:2ad8:: with SMTP id m24mr19742172eje.512.1615284812119; Tue, 09 Mar 2021 02:13:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615284812; cv=none; d=google.com; s=arc-20160816; b=mfyZbyk3175gweMOO38n46KRhmNVlk/uqPkdY2pz3ogUb7doJ2Uc9nM13rk1fmabx6 fCoUGC/cooGCP4ZB8d7lpI58m3gTOMR4dKpK2Fw6Hhp4lgixXh46yVckVZqKayoCRqWt aRgyZwMm6ggEf/lZVqNADz4HUTWo1DV3Cv46uY/Af2XoIg/5RkNvXZbYOiXqRe7UuQ/P tZhrYk7KcmfAZ8GDjKHkSFXT+RVlWJ+m+8CscAt2Y13uvUDH5fv1BxTjpGxuFVZln+bf aO+eYbLK+cnBPK4R0aD9K9NOmPCywEWigFMrJcRHQzPEzn/Se4jRtgMP0sqU4hTiYt/C VHLA== 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=wPNO71HMu0TZs0DneYCWQjpkyW0o72PhsFCJvZyjTJ8=; b=ZKHCUJKsxjSf+9z4IvKPZjuCxvdTdcQcjLM1if2/+9tRizKyRAgrQP713OmtceJ7Za NcZe45HC3IQ6DTQhvQBF2M0t8o671y0j7qcVSANZUodNcA4ihN3sVBZvBeRprZuBKEyP V4x2rr6OYRyGGK+DTKGnCg+vGuwFVwJ/U+opY6GEKWm8/F3k/S/aFQgpMafYBeJbg1a0 4LEQQhdBmuu9UtQ8By/1YfsrhGvatZ15RepdqmhKnjSPiOOY9CU5jZudCspa0RwPWwn4 VPB/m+k9l++WUDRvykU2K0F0FPD6hGphc2kjmfsP5vLdtvpxU3RCOTRCKOqpeSfHoz07 p1Lg== 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 y16si9039552edi.542.2021.03.09.02.13.09; Tue, 09 Mar 2021 02:13:32 -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; 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 S229689AbhCIKLk (ORCPT + 99 others); Tue, 9 Mar 2021 05:11:40 -0500 Received: from out30-131.freemail.mail.aliyun.com ([115.124.30.131]:56822 "EHLO out30-131.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230173AbhCIKLS (ORCPT ); Tue, 9 Mar 2021 05:11:18 -0500 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R201e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04394;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=19;SR=0;TI=SMTPD_---0UR53wqt_1615284670; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0UR53wqt_1615284670) by smtp.aliyun-inc.com(127.0.0.1); Tue, 09 Mar 2021 18:11:15 +0800 From: Jiapeng Chong To: peterz@infradead.org Cc: mingo@redhat.com, acme@kernel.org, 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, Jiapeng Chong Subject: [PATCH] perf machine: Assign boolean values to a bool variable Date: Tue, 9 Mar 2021 18:11:09 +0800 Message-Id: <1615284669-82139-1-git-send-email-jiapeng.chong@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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