Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7E455C388F7 for ; Mon, 9 Nov 2020 12:10:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3F8B120789 for ; Mon, 9 Nov 2020 12:10:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729753AbgKIMKa (ORCPT ); Mon, 9 Nov 2020 07:10:30 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:7067 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729520AbgKIMK0 (ORCPT ); Mon, 9 Nov 2020 07:10:26 -0500 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4CV8vY4zjbzhjVK; Mon, 9 Nov 2020 20:10:17 +0800 (CST) Received: from linux-lmwb.huawei.com (10.175.103.112) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.487.0; Mon, 9 Nov 2020 20:10:18 +0800 From: Zou Wei To: , , , , , , CC: , , Zou Wei Subject: [PATCH -next] perf intel-bts: use true for bool variables Date: Mon, 9 Nov 2020 20:22:10 +0800 Message-ID: <1604924530-71405-1-git-send-email-zou_wei@huawei.com> X-Mailer: git-send-email 2.6.2 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.103.112] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix coccicheck warnings: ./intel-bts.c:472:3-13: WARNING: Assignment of 0/1 to bool variable ./intel-bts.c:515:3-13: WARNING: Assignment of 0/1 to bool variable Reported-by: Hulk Robot Signed-off-by: Zou Wei --- tools/perf/util/intel-bts.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/perf/util/intel-bts.c b/tools/perf/util/intel-bts.c index af1e78d..aa4fad9 100644 --- a/tools/perf/util/intel-bts.c +++ b/tools/perf/util/intel-bts.c @@ -469,7 +469,7 @@ static int intel_bts_process_queue(struct intel_bts_queue *btsq, u64 *timestamp) if (!buffer) { if (!btsq->bts->sampling_mode) - btsq->done = 1; + btsq->done = true; err = 1; goto out_put; } @@ -512,7 +512,7 @@ static int intel_bts_process_queue(struct intel_bts_queue *btsq, u64 *timestamp) *timestamp = btsq->buffer->reference; } else { if (!btsq->bts->sampling_mode) - btsq->done = 1; + btsq->done = true; } out_put: thread__put(thread); -- 2.6.2