Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp199083ybd; Tue, 25 Jun 2019 19:43:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqxmoywnE9Ut3rQR1QhpC2OQYz052k25AEXe5JYGRhbXhTe+I1YZu22Pq4CLVacTBENX0Imw X-Received: by 2002:a17:902:2ae8:: with SMTP id j95mr2058745plb.276.1561516987850; Tue, 25 Jun 2019 19:43:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561516987; cv=none; d=google.com; s=arc-20160816; b=SJMobcMMpHmFWI70/MbfTfeNJPqM2trfBaJZeMCmGj8U+S8Fk02GsSDDMMmssOikqy dQloilQskvbGk4mGbMQq12M2M4wNJ4FQgCcvuAMVLbHnrVN4VRWJbJk1Q39KhRezGqfC aGv/k6vKsCkviIDSnsLbFRYN+p/99wEvrkvMftOpAhveZ0tkNcjCylFa1bAjqMgI5j4L eLNSo/4qs0ZcFalvafGoiwvBOKt+s+qxB94cf2VTl5ebhRi/TLRLi9u798mjfQ8Ur73b NJzzHe2G/WZ7qWn1Fe/WCI9rEZWAx9WqZheg0oynsGrcRYt8VFxdfFo4h4hEIoNAZwcL zjtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:to:from:date:dkim-signature; bh=8iHzMdYOI0Vlz5bJjh+l/GqT6c2o8S7w8UKOoSsz21M=; b=Q12m0exgzjL5ojllvIyl1aVzoWLD0s0gwA3JrFYywataSt0ujuiluwTM9pqh7bAWOD AC3OfQXnHS2aAPpqycYDbh2haiRa4vrD9FnwfUd6yNA/MdJV3LZIiJi6aUNsBKjpcgJ7 1Ff5sfzm3jPGkAk3HAchO4gg4ZvU0Y9cTpnwVCbfyBhomYT26FJHhBgedWji8QtP3nhF t5VBWldePFGsWl0g6L9HC9KHh/AWdhnO7GE4d5FyQ0T9GhNmcjyB8MNg8OCWKUDZtyPS pYEh3it78HJS5K3qwattXorUzxBXEhSYjiYwhBB35DBfvl8mJaU1gWxOp7/1GjS6taK/ kotw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=tU729ZIc; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d21si1817494pls.25.2019.06.25.19.42.51; Tue, 25 Jun 2019 19:43:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=tU729ZIc; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726574AbfFZCl6 (ORCPT + 99 others); Tue, 25 Jun 2019 22:41:58 -0400 Received: from mail-pl1-f195.google.com ([209.85.214.195]:33653 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726441AbfFZCl5 (ORCPT ); Tue, 25 Jun 2019 22:41:57 -0400 Received: by mail-pl1-f195.google.com with SMTP id c14so542851plo.0 for ; Tue, 25 Jun 2019 19:41:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:mime-version:content-disposition :user-agent; bh=8iHzMdYOI0Vlz5bJjh+l/GqT6c2o8S7w8UKOoSsz21M=; b=tU729ZIcVWFphWxnLy+Qzf/7C+Pg665dgPb9pkCJxU191+cawtSZxnuBnGImiZAhSy MaS+0Q9yPKkib9YynRiw00DVQWBUGlAJoEFCuvT5ENdY+mcpWSugy/Nh0fPRRh2LpXIw aqyDUMRpY+y8zvovpOsWdi9vaPuURaBKr/vio5A/dbFmJ7OoM8Z57hqsjJC+/cZdVGRA yI5oCGCkYCnK+1pDRoZUSWg9gy6f1DR9d4x1rcPuas8+7a0ZD4p373BZPJfrEU0eJmBR GiC42MKtmk9LeranEvRWCUwWlsdyuUkDmItOw+gL6zl8g54vdEcpFXWhjwd/cbDjLwCZ FUqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition:user-agent; bh=8iHzMdYOI0Vlz5bJjh+l/GqT6c2o8S7w8UKOoSsz21M=; b=aT1vXvFmwilROBEIm1acouLZcW4VuuQfTjgyWcEMNiMb/OdwzcoSMwDppfc1xak69D XM+9W68psVWEOFDT6Ddg/Oh+k6zUSVwRdy4TawLnrK2143sgaloDYF1gWUZN69lMLkyd JMThjstBMCHuE9piyXE7G969EDpy/onIiqpx4PIwKDVcNT25ihy0qhw3PPV3dsZbQnSV 3j0U6WyVgq8U817I9VbQCyuFMyIwOqGaRltgJhNF8XItDtxib7wuG3dKlBYIN9q7pE4l 9ybRulzFViOkQNo5jqS5oxxSoWK6CG2vwn16xcw/vOo4QiErh8fDLGZkWpEcMuEIKB2B kuqA== X-Gm-Message-State: APjAAAW+X47kaDG3wpDg4wVHpp88OydmkwT1q7N+j13Z61hyASF9LH8Q 9b9m8l1ncwVJgk2tfEe2IJQ= X-Received: by 2002:a17:902:6848:: with SMTP id f8mr2252796pln.102.1561516917272; Tue, 25 Jun 2019 19:41:57 -0700 (PDT) Received: from hari-Inspiron-1545 ([183.83.92.187]) by smtp.gmail.com with ESMTPSA id 5sm15489580pfh.109.2019.06.25.19.41.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 25 Jun 2019 19:41:56 -0700 (PDT) Date: Wed, 26 Jun 2019 08:11:51 +0530 From: Hariprasad Kelam To: Greg Kroah-Hartman , Hariprasad Kelam , Himadri Pandya , Nishka Dasgupta , Hardik Singh Rathore , Shobhit Kukreti , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] staging: rtl8723bs: hal: hal_btcoex: Using comparison to true is error prone Message-ID: <20190626024151.GA6035@hari-Inspiron-1545> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org fix below issues reported by checkpatch CHECK: Using comparison to true is error prone CHECK: Using comparison to false is error prone Signed-off-by: Hariprasad Kelam --- drivers/staging/rtl8723bs/hal/hal_btcoex.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/rtl8723bs/hal/hal_btcoex.c b/drivers/staging/rtl8723bs/hal/hal_btcoex.c index 66caf34..99e0b91 100644 --- a/drivers/staging/rtl8723bs/hal/hal_btcoex.c +++ b/drivers/staging/rtl8723bs/hal/hal_btcoex.c @@ -290,7 +290,7 @@ static u8 halbtcoutsrc_IsWifiBusy(struct adapter *padapter) if (check_fwstate(pmlmepriv, WIFI_ASOC_STATE) == true) { if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true) return true; - if (true == pmlmepriv->LinkDetectInfo.bBusyTraffic) + if (pmlmepriv->LinkDetectInfo.bBusyTraffic) return true; } @@ -310,12 +310,12 @@ static u32 _halbtcoutsrc_GetWifiLinkStatus(struct adapter *padapter) if (check_fwstate(pmlmepriv, WIFI_ASOC_STATE) == true) { if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true) { - if (true == bp2p) + if (bp2p) portConnectedStatus |= WIFI_P2P_GO_CONNECTED; else portConnectedStatus |= WIFI_AP_CONNECTED; } else { - if (true == bp2p) + if (bp2p) portConnectedStatus |= WIFI_P2P_GC_CONNECTED; else portConnectedStatus |= WIFI_STA_CONNECTED; @@ -372,7 +372,7 @@ static u8 halbtcoutsrc_GetWifiScanAPNum(struct adapter *padapter) pmlmeext = &padapter->mlmeextpriv; - if (GLBtcWiFiInScanState == false) { + if (!GLBtcWiFiInScanState) { if (pmlmeext->sitesurvey_res.bss_cnt > 0xFF) scan_AP_num = 0xFF; else @@ -1444,7 +1444,7 @@ void hal_btcoex_IQKNotify(struct adapter *padapter, u8 state) void hal_btcoex_BtInfoNotify(struct adapter *padapter, u8 length, u8 *tmpBuf) { - if (GLBtcWiFiInIQKState == true) + if (GLBtcWiFiInIQKState) return; EXhalbtcoutsrc_BtInfoNotify(&GLBtCoexist, tmpBuf, length); -- 2.7.4