Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp4111080ybi; Tue, 18 Jun 2019 12:01:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqzjsGJOcODq4/mreYEv077flucieJCw2fp9vfxt7sMO9p9BkbgoMhW8J8Hnlex+xhts4+px X-Received: by 2002:a17:902:aa47:: with SMTP id c7mr2547610plr.171.1560884465018; Tue, 18 Jun 2019 12:01:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560884465; cv=none; d=google.com; s=arc-20160816; b=cTSEXXp7ufpAUGoBLbk5BkB5Sa3jGRgarhBCiakJ3WJ+HPFZPKT3PHvIwYt36Whcc6 sZSUiecE1KKpnOxhCDXcAbsXjNoknjVG/N6tEU36QIB4slQi+zeFMdzhpNTgrXUYbjtJ frUPhtp27A5HhdDwkuc2wY+DQpVN4StIfzZ7jGYfWBQY3ENl4pfAiKmms7yyU1jicw2D Icd5E9RG+4ptMS6AbS0EuC0HJvuaAkvTZjhlAkbJjVG7AbyVD8mjvAbWY0VMOd63CRBX TCYFE8ZXXwlYK+ze2k9KA/DE4GTdbpMML4Xnx8fMl1+DBWlPsQrs9AwoZ/p4JEKCO0br 2XyA== 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=y+ZDxvhg6PfCf4IaZBcbrHBra9kFTGCeQt6ukY9Ho2c=; b=JsktrhTFdABpLZZCm/JydzZjWE8l567QAXn/1uLJLWltLxkZL581KH6lVGdql33GTk BwRcgIB24LqXwRR5rLKAOrMiYwJJlgX6XmtE3WrC7yBGTp5EdbVHhu8he7UNS3ZJrUrR /WuFGLixQw0iPhkGCxjcNnBKhzaLDgtCJYVqJgjhsPpr7R4LGi5MFH5XdOrPCS/4JCya T7gVX+DnZt7sJvZf/kJUGXHRXW7+wPAyX5TA007haIY9lIbXHMlNt9jemWuzD3XjNkgz 7l+bChUAxeqDozHQ989INnI+2Ofh7Zek1TuCurSr5zz9mQ7d/OHGpG4YQ2I7sEu66B5a idvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=nRncx7EO; 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 g7si876567pgi.38.2019.06.18.12.00.49; Tue, 18 Jun 2019 12:01:05 -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=nRncx7EO; 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 S1730484AbfFRS7c (ORCPT + 99 others); Tue, 18 Jun 2019 14:59:32 -0400 Received: from mail-pl1-f196.google.com ([209.85.214.196]:34157 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730231AbfFRS7c (ORCPT ); Tue, 18 Jun 2019 14:59:32 -0400 Received: by mail-pl1-f196.google.com with SMTP id i2so6090839plt.1 for ; Tue, 18 Jun 2019 11:59:31 -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=y+ZDxvhg6PfCf4IaZBcbrHBra9kFTGCeQt6ukY9Ho2c=; b=nRncx7EOSI8bpyFlXJgspqlwi28rdU1sQt1sug6gGAs+t+Uv3/uUp1NQBzrbB1ze1T 3FCDVP3O8gLOvoMlsUwnGW7mvMH3ImxYoCpJ2o5bfigZQuRdpYRrErD+1WCq4Pkz0avG yjsMV/DoEDfVhs78Q7Es607e/0os41JdWxGdvLnURS/nqAMm3mELuynV0CN7DOjOwt7B DhKZoPEXSIb2aF3QMVhz4cOtw6ow0GR4X7xxU5G0mQANMLqzSXPgJgoFibnLp614ejQH ygQZEassjhjVZppc7oBha8KP9r+Ol6JbokONcyIaVd1hsS/CK06iIazzIQ1Odu4HibEY 5qDQ== 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=y+ZDxvhg6PfCf4IaZBcbrHBra9kFTGCeQt6ukY9Ho2c=; b=WcrYMO+oT7X3WzW7uGqymaNHjgIgNuA7g+deeV2s5FSvxR2XvF1ZFkoRZcpEahG+4B WRdXKcchwzixHLzNYt2TBE/MpVpsfvAIFP+aGUQkpMSXjSlbnnKPak99FT6HS0uBUD8/ VX5mfGubw/FsHGUmUJptUA0YrfhlLlZIGZ4Km+kvSoD9sqD4lATFHg4suZ4jkN3w9JCr dnzj3mPd96+3eaSKME1FCYHgXx0GLRjdanLvrRCVs5JQgQ73waLPjnDQIM2qlQ4hRqQB hk1L4xs2T/IxGPe0fBgtvFHRnD1LvHC+uvbmJKjJVHjK5GhgEpEx99PwRLxaGfAoJzdh lyMQ== X-Gm-Message-State: APjAAAXw3X+Tt+Lpylg461vRtqfpXWglBwSLdfi6keeQyXEx+qg8WvX2 qXTWzNMCZLVWaQNqNQzZa4Q= X-Received: by 2002:a17:902:8609:: with SMTP id f9mr106993136plo.252.1560884371384; Tue, 18 Jun 2019 11:59:31 -0700 (PDT) Received: from hari-Inspiron-1545 ([183.83.92.187]) by smtp.gmail.com with ESMTPSA id h62sm15489909pgc.54.2019.06.18.11.59.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 18 Jun 2019 11:59:31 -0700 (PDT) Date: Wed, 19 Jun 2019 00:29:27 +0530 From: Hariprasad Kelam To: Greg Kroah-Hartman , Hariprasad Kelam , Himadri Pandya , Nishka Dasgupta , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] staging: rtl8723bs: hal: rtl8723b_cmd: fix comparison to true is error prone Message-ID: <20190618185926.GA10510@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 this patch fixes 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/rtl8723b_cmd.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c b/drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c index ceb317f..48efbfd 100644 --- a/drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c +++ b/drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c @@ -73,7 +73,7 @@ s32 FillH2CCmd8723B(struct adapter *padapter, u8 ElementID, u32 CmdLen, u8 *pCmd goto exit; } - if (padapter->bSurpriseRemoved == true) + if (padapter->bSurpriseRemoved) goto exit; /* pay attention to if race condition happened in H2C cmd setting. */ @@ -297,7 +297,7 @@ static void ConstructNullFunctionData( SetSeqNum(pwlanhdr, 0); - if (bQoS == true) { + if (bQoS) { struct ieee80211_qos_hdr *pwlanqoshdr; SetFrameSubType(pframe, WIFI_QOS_DATA_NULL); @@ -1071,7 +1071,7 @@ void rtl8723b_set_FwPwrMode_cmd(struct adapter *padapter, u8 psmode) SET_8723B_H2CCMD_PWRMODE_PARM_PWR_STATE(u1H2CPwrModeParm, PowerState); SET_8723B_H2CCMD_PWRMODE_PARM_BYTE5(u1H2CPwrModeParm, byte5); if (psmode != PS_MODE_ACTIVE) { - if (pmlmeext->adaptive_tsf_done == false && pmlmeext->bcn_cnt > 0) { + if (!pmlmeext->adaptive_tsf_done && pmlmeext->bcn_cnt > 0) { u8 ratio_20_delay, ratio_80_delay; /* byte 6 for adaptive_early_32k */ @@ -1252,7 +1252,7 @@ static void rtl8723b_set_FwRemoteWakeCtrl_Cmd(struct adapter *padapter, u8 benab FillH2CCmd8723B(padapter, H2C_8723B_REMOTE_WAKE_CTRL, H2C_REMOTE_WAKE_CTRL_LEN, u1H2CRemoteWakeCtrlParm); #ifdef CONFIG_PNO_SUPPORT - if (ppwrpriv->wowlan_pno_enable && ppwrpriv->pno_in_resume == false) { + if (ppwrpriv->wowlan_pno_enable && !ppwrpriv->pno_in_resume) { res = rtw_read8(padapter, REG_PNO_STATUS); DBG_871X("cmd: 0x81 REG_PNO_STATUS: 0x%02x\n", res); while (!(res&BIT(7)) && count < 25) { @@ -1671,7 +1671,7 @@ static void rtl8723b_set_FwRsvdPagePkt( #endif /* CONFIG_WOWLAN */ { #ifdef CONFIG_PNO_SUPPORT - if (pwrctl->pno_in_resume == false && pwrctl->pno_inited == true) { + if (!pwrctl->pno_in_resume && pwrctl->pno_inited) { /* Probe Request */ RsvdPageLoc.LocProbePacket = TotalPageNum; ConstructProbeReq( @@ -2119,7 +2119,7 @@ static void ConstructBtNullFunctionData( SetDuration(pwlanhdr, 0); SetSeqNum(pwlanhdr, 0); - if (bQoS == true) { + if (bQoS) { struct ieee80211_qos_hdr *pwlanqoshdr; SetFrameSubType(pframe, WIFI_QOS_DATA_NULL); @@ -2307,7 +2307,7 @@ void rtl8723b_download_BTCoex_AP_mode_rsvd_page(struct adapter *padapter) } while (!bcn_valid && (poll%10) != 0 && !padapter->bSurpriseRemoved && !padapter->bDriverStopped); } while (!bcn_valid && (DLBcnCount <= 100) && !padapter->bSurpriseRemoved && !padapter->bDriverStopped); - if (true == bcn_valid) { + if (bcn_valid) { struct pwrctrl_priv *pwrctl = adapter_to_pwrctl(padapter); pwrctl->fw_psmode_iface_id = padapter->iface_id; DBG_8192C(ADPT_FMT": DL RSVD page success! DLBcnCount:%d, poll:%d\n", -- 2.7.4