From patchwork Sat Sep 19 07:44:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Yan X-Patchwork-Id: 260565 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 7AE78C43463 for ; Sat, 19 Sep 2020 07:43:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4837321D42 for ; Sat, 19 Sep 2020 07:43:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726332AbgISHne (ORCPT ); Sat, 19 Sep 2020 03:43:34 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:13330 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726041AbgISHne (ORCPT ); Sat, 19 Sep 2020 03:43:34 -0400 Received: from DGGEMS404-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 3EC60B6C95119CE91C1B; Sat, 19 Sep 2020 15:43:32 +0800 (CST) Received: from huawei.com (10.175.127.227) by DGGEMS404-HUB.china.huawei.com (10.3.19.204) with Microsoft SMTP Server id 14.3.487.0; Sat, 19 Sep 2020 15:43:24 +0800 From: Jason Yan To: , , , , , , CC: Jason Yan , Hulk Robot Subject: [PATCH] rtlwifi: rtl8723be: use true, false for bool variable large_cfo_hit Date: Sat, 19 Sep 2020 15:44:37 +0800 Message-ID: <20200919074437.3459305-1-yanaijie@huawei.com> X-Mailer: git-send-email 2.25.4 MIME-Version: 1.0 X-Originating-IP: [10.175.127.227] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org This addresses the following coccinelle warning: drivers/net/wireless/realtek/rtlwifi/rtl8723be/dm.c:1155:27-47: WARNING: Comparison of 0/1 to bool variable drivers/net/wireless/realtek/rtlwifi/rtl8723be/dm.c:1156:3-23: WARNING: Assignment of 0/1 to bool variable drivers/net/wireless/realtek/rtlwifi/rtl8723be/dm.c:1159:3-23: WARNING: Assignment of 0/1 to bool variable Reported-by: Hulk Robot Signed-off-by: Jason Yan --- drivers/net/wireless/realtek/rtlwifi/rtl8723be/dm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8723be/dm.c b/drivers/net/wireless/realtek/rtlwifi/rtl8723be/dm.c index fbcff23eb058..c3c990cc032f 100644 --- a/drivers/net/wireless/realtek/rtlwifi/rtl8723be/dm.c +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8723be/dm.c @@ -1152,11 +1152,11 @@ static void rtl8723be_dm_dynamic_atc_switch(struct ieee80211_hw *hw) (rtldm->cfo_ave_pre - cfo_ave) : (cfo_ave - rtldm->cfo_ave_pre); - if (cfo_ave_diff > 20 && rtldm->large_cfo_hit == 0) { - rtldm->large_cfo_hit = 1; + if (cfo_ave_diff > 20 && !rtldm->large_cfo_hit) { + rtldm->large_cfo_hit = true; return; } else - rtldm->large_cfo_hit = 0; + rtldm->large_cfo_hit = false; rtldm->cfo_ave_pre = cfo_ave;