Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1749152pxk; Sat, 19 Sep 2020 00:44:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzL8WS/REoSzrJDaxmfwmM2LeljS4I0zzlXLMLJz8bZAlZDH5TUSoed6519V1sfwjSgEgid X-Received: by 2002:a17:906:829a:: with SMTP id h26mr41164696ejx.11.1600501450653; Sat, 19 Sep 2020 00:44:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600501450; cv=none; d=google.com; s=arc-20160816; b=Mhb2mFz/QYqv/FE+uyUMe6f9Lk5CU8jY7+Igi97RUScCi9RpiYUdZi8mo3dNEvKjkt zC/n6xfJK9BFyGrN/38U9t/+Q4kbGXgpCbJUmvzzGTfjNFhLfMTqohu+FlOnoL7YTrYx 8zjCyzleYkLd8tvo2TAIgICl+End/SrZrRTOGgnzrcodU7YrxzKd8tl8ChkRZXbIUYuv MqPsilSZall7jRBqHHmN+pfr+Nq+k5G8nrZhDNjApt0o3mEekB7sKgEXtFivSMiHFObZ XeRTGyqGQAyaHt/J8PWZ4VTk1IH7ejJgmBzOwSb+pHa7DvNi+NInsE3fVlhk4oxvd89Z gGyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=zKM/q/Ur+h9S3XHY4b4kDJ3iVKDyPkwDvUTysBt7fgE=; b=0cjp31d6JDPWjYldQ3JjDYFf7E8bC6cgg4hWe1p1YS/n6im10Wnm8PYqST1qzyhjTI v3C/UVhsp9Yw42vF87u0hPlvfQXk4U00Itq3c8KAlCnGGXg7s/jqiCUEpT6T13w6XNWa npHKFqHuzy9lhioAdRA1xnXEFVT60W9eGoBEV0LRqQsbAjlOOgVO23+YnU3JiVKa05Hr rCtRYbVXkj4SflWB5pu7qJ6/CIGL60JAKBcHiRTgZ1Qx85tB87DYHk8cTplWC9azKp60 jwPVHME9R0JzJoRg+UozXuBpH65lY3mGXBDIMOC2UhSGZ3vqu3kGHtVXK/hmLlE5VRrm ja6Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d6si3869219ejp.629.2020.09.19.00.43.36; Sat, 19 Sep 2020 00:44:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-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-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726290AbgISHnN (ORCPT + 99 others); Sat, 19 Sep 2020 03:43:13 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:13328 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726041AbgISHnN (ORCPT ); Sat, 19 Sep 2020 03:43:13 -0400 Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 34AC932C1EE704B44C20; Sat, 19 Sep 2020 15:43:10 +0800 (CST) Received: from huawei.com (10.175.127.227) by DGGEMS413-HUB.china.huawei.com (10.3.19.213) with Microsoft SMTP Server id 14.3.487.0; Sat, 19 Sep 2020 15:43:03 +0800 From: Jason Yan To: , , , , , , , CC: Jason Yan , Hulk Robot Subject: [PATCH] rtlwifi: rtl8192ee: use true,false for bool variable large_cfo_hit Date: Sat, 19 Sep 2020 15:44:12 +0800 Message-ID: <20200919074412.3459163-1-yanaijie@huawei.com> X-Mailer: git-send-email 2.25.4 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.127.227] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org This addresses the following coccinelle warning: drivers/net/wireless/realtek/rtlwifi/rtl8192ee/dm.c:721:27-47: WARNING: Comparison of 0/1 to bool variable drivers/net/wireless/realtek/rtlwifi/rtl8192ee/dm.c:722:3-23: WARNING: Assignment of 0/1 to bool variable drivers/net/wireless/realtek/rtlwifi/rtl8192ee/dm.c:725:2-22: WARNING: Assignment of 0/1 to bool variable Reported-by: Hulk Robot Signed-off-by: Jason Yan --- drivers/net/wireless/realtek/rtlwifi/rtl8192ee/dm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/dm.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/dm.c index 140f33089c4d..997ff115b9ab 100644 --- a/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/dm.c +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/dm.c @@ -718,11 +718,11 @@ static void rtl92ee_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; } - rtldm->large_cfo_hit = 0; + rtldm->large_cfo_hit = false; rtldm->cfo_ave_pre = cfo_ave; -- 2.25.4