Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp585914ybd; Sat, 29 Jun 2019 03:25:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqzvB+iq8drT6PIPruV+t5+rT3wJuowRA6zG3H3mhjIOQaYCbNn0KShAuiLkzbFbG1cnKem2 X-Received: by 2002:a17:902:59c8:: with SMTP id d8mr17427786plj.55.1561803950364; Sat, 29 Jun 2019 03:25:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561803950; cv=none; d=google.com; s=arc-20160816; b=vgDR1zD5iwpJoxffM19XjIpFq9qEgCSo7mI1MNiq+hG87woMRo6r6qCh30vbjFPwdn sU6bDb2iMlhG8heZumgmZjlisokzTN/EhQyI4y0ECM7May1Xhsp73P1BBc1BljWXXNC1 6DAFvxPI4Pc3mao3gEobmLMyZktc9XYhgoWxr4ANC85fylbR6kX152t60Ye6r2sopwYD qXeMgXacMvleMXD74P3g2MU41cWXfURGSNISRM+2qUi5NsuQEa44NvZvp5SQE4J1aotB OzSVNI6x6bKHgN2a0333xjTdIOcwZG0J3ZdkzX1GlLdEJWXaYhI+wjUJzwGuidp1vAd9 bWOA== 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=CxypI43ytN5Ipwu2eJZ9WP6oEc0mtS7rDBKUGQ2NaIQ=; b=oYlEA1dAjqEDNThKu0Kmazl/2EDIDzibAjbCDJjGDfee1QquFle/FW3/SBMaBj9y6i n1EaeFXeK3qUk3TCKZAx0mG0kYv0mhdpiZpKVLggeo3GjfD/i5ZbGk/n/sVVtqBHLvgR dbaZRqpw8O19btpVqjeQ0k2Q1PEC3I6GdcIUChn+5hX91wmOv9g/gx5MBcPm+DCT6G5N MuQ/U+6ec05sB0aHL0++oNae4J+RbdZE1iZaU+m6x3MuTeH2MYvOslSgTaQWR+Yzq9rm JloW6Tpibj/dd8NQAib0NEC++tPddVNpphpu+04wLa0R7aqwS0azBUSQfyfLUwWc/kHq khkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=IglXVzc9; 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 l21si4358042pgb.409.2019.06.29.03.25.34; Sat, 29 Jun 2019 03:25:50 -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=IglXVzc9; 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 S1726936AbfF2KZT (ORCPT + 99 others); Sat, 29 Jun 2019 06:25:19 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:35826 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726839AbfF2KZT (ORCPT ); Sat, 29 Jun 2019 06:25:19 -0400 Received: by mail-pg1-f196.google.com with SMTP id s27so3723947pgl.2 for ; Sat, 29 Jun 2019 03:25:18 -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=CxypI43ytN5Ipwu2eJZ9WP6oEc0mtS7rDBKUGQ2NaIQ=; b=IglXVzc9+65oiSs+QIqDDdQJA4wtPHj4OWUpcEffOBeVIQExouQzLhoPfNW0Rtpp3J PmhRSZyEsp1Jd2//XWqZDRbf2TZxZNlCQZc3vRnmlzTkM+RsH2RhJWDaw+rdoY///qk1 L6OslWHFZN3G08Hs+8KieXGxS9s3QT97W/Luq5WS9MMO4q5QeG2GPNXCAGFnm9u/FJ+1 qC7aFDr9bAgbX9TCmS6NcYTn5HkKbMs2kTmXH8VnUa5PmjE3ISysbUWSdyu+WtjwzDKW eXgCmdIjBu8me25aQrPSS/dGWT4FeztP+hoHQq8OJconr6neNa+hoHWSPQzDEunhOC5j t7hQ== 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=CxypI43ytN5Ipwu2eJZ9WP6oEc0mtS7rDBKUGQ2NaIQ=; b=fNvdxWt7s1VCZNFmqE4JjWsER8EMlb44yRO7FvHB9jK4BNy7cWvnZ+s1uAPVJbVB2T zjCJFhCeUR9yY4j1BGnam2n5U+RQDIb5/H8Y+DEyWB+5bxMG4N2iRRwumXBsaAb33ye2 CmFRanlIj4ZIjssBO+YW98dzLz3QQ1j0NwovBmyz0wVI32NU3C0sRJnUJm0zx4sjtKwF htdCEqWn+6bWLmQPUGQQXQoiZer5FKgC5h28zkLpKbZmi2F3TXmb7g5Yh8VOCaS3zbLS w2QZoIyrLBQCME1O4+Qp2mo1DHxD9A8tTWfkkUKZmaAp1QKRENSyzkuTSkJZdP1IXPXr H5vQ== X-Gm-Message-State: APjAAAX4F2hv7/O/ZMdb7Pl0g7WNqeMJXtqOtGWBYgwEdfgFbZyCEsU+ iKVQLHTTFtM9Y8Q30X5dRyVQUgEH X-Received: by 2002:a17:90a:9905:: with SMTP id b5mr19086055pjp.70.1561803918651; Sat, 29 Jun 2019 03:25:18 -0700 (PDT) Received: from hari-Inspiron-1545 ([183.83.92.187]) by smtp.gmail.com with ESMTPSA id x5sm9859134pjp.21.2019.06.29.03.25.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 29 Jun 2019 03:25:18 -0700 (PDT) Date: Sat, 29 Jun 2019 15:55:14 +0530 From: Hariprasad Kelam To: Greg Kroah-Hartman , Hariprasad Kelam , Himadri Pandya , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH 06/10] staging/rtl8723bs/hal: fix comparison to true/false is error prone Message-ID: <20190629102514.GA15194@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 false is error prone CHECK: Using comparison to true is error prone Signed-off-by: Hariprasad Kelam --- drivers/staging/rtl8723bs/hal/rtl8723b_dm.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_dm.c b/drivers/staging/rtl8723bs/hal/rtl8723b_dm.c index 6578147..e6ddce3 100644 --- a/drivers/staging/rtl8723bs/hal/rtl8723b_dm.c +++ b/drivers/staging/rtl8723bs/hal/rtl8723b_dm.c @@ -152,14 +152,14 @@ void rtl8723b_HalDmWatchDog(struct adapter *Adapter) hw_init_completed = Adapter->hw_init_completed; - if (hw_init_completed == false) + if (!hw_init_completed) goto skip_dm; bFwCurrentInPSMode = adapter_to_pwrctl(Adapter)->bFwCurrentInPSMode; rtw_hal_get_hwreg(Adapter, HW_VAR_FWLPS_RF_ON, (u8 *)(&bFwPSAwake)); if ( - (hw_init_completed == true) && + (hw_init_completed) && ((!bFwCurrentInPSMode) && bFwPSAwake) ) { /* */ @@ -170,7 +170,7 @@ void rtl8723b_HalDmWatchDog(struct adapter *Adapter) } /* ODM */ - if (hw_init_completed == true) { + if (hw_init_completed) { u8 bLinked = false; u8 bsta_state = false; u8 bBtDisabled = true; @@ -233,7 +233,7 @@ void rtl8723b_HalDmWatchDog_in_LPS(struct adapter *Adapter) struct sta_priv *pstapriv = &Adapter->stapriv; struct sta_info *psta = NULL; - if (Adapter->hw_init_completed == false) + if (!Adapter->hw_init_completed) goto skip_lps_dm; @@ -242,7 +242,7 @@ void rtl8723b_HalDmWatchDog_in_LPS(struct adapter *Adapter) ODM_CmnInfoUpdate(&pHalData->odmpriv, ODM_CMNINFO_LINK, bLinked); - if (bLinked == false) + if (!bLinked) goto skip_lps_dm; if (!(pDM_Odm->SupportAbility & ODM_BB_RSSI_MONITOR)) -- 2.7.4