Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp442474ybi; Thu, 13 Jun 2019 19:55:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqz+sGxXm2gxVuD8cQiHm284uQuiIUY7s5B7Bxo7Dcs67UfCzgwBHGeZdNatWMAvrjgEf7Is X-Received: by 2002:a63:3142:: with SMTP id x63mr11788138pgx.105.1560480933785; Thu, 13 Jun 2019 19:55:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560480933; cv=none; d=google.com; s=arc-20160816; b=S1mqmH0dPd8sM4H8Hd3sy1ILN369dANZINai+ZcKv+MDUtUITcpAwQAiMQSXi7NoaA Yxm3RnheZAVDYx5UfUd3p5t6MUDZFgOyM8b0UvG/uqJHs+ltp4r9wdT7RSqaFEtpSigV A6eEWJyno+UUur4S43piS/nanqmi7jLdwol6Ar996H/54ou2NJXjkngpuNM0/hV/o4vQ js7zLCu+kEbsUDQKcnH624kGonS16sA5bj8Cb7W9bcORIungykIqX1vUqYx96IZ8Al0y zA3YiZG/Mg5Gm623+dvyCQYwNgbG+5yu6ytCP5hKgKd7JSbFI3guo946tJ8lT0LZrDTK a1SA== 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=jZ4MKy9YxFUhqGFBTxUT54NN/xTa5W9Uj5g9ozrgptI=; b=Itjpi5uxagHyyNLSD4tbYCFtaKhy7TyOrTu3wM+nfeqzXiTxILdMhnL+y0huiTtnGk qmPpqLD6bZEuGcDEOSTnILJj7/+P8+P4m7eiX1jH5dRBwf4uPcKDzHatUuwCcr03ujjd RdPb0WkIFV+y2yevK89O0pVxJKin+/yesTAMnr3eyl5yR4JL2mEJYNSvhscLuIJ8jaJt 0YofbEyxABfFjoKyZ1y6XErRNBzRRyVaiMZPBbmwhuBMfsDrbT74etfreZs0g6U1cCJE TS1MXO63HZojrlOM/W56B/dZERN56jIROnRXHQsBjnPwLljK61esfZG1IoUO7ofgYoCA +Mtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Q7HSY7Ej; 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 j18si1103862pfe.235.2019.06.13.19.55.18; Thu, 13 Jun 2019 19:55:33 -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=Q7HSY7Ej; 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 S1726797AbfFNCym (ORCPT + 99 others); Thu, 13 Jun 2019 22:54:42 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:41754 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726259AbfFNCyk (ORCPT ); Thu, 13 Jun 2019 22:54:40 -0400 Received: by mail-pg1-f195.google.com with SMTP id 83so642694pgg.8 for ; Thu, 13 Jun 2019 19:54:39 -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=jZ4MKy9YxFUhqGFBTxUT54NN/xTa5W9Uj5g9ozrgptI=; b=Q7HSY7EjZQGQ9Ik/MhnqXQKFZ1HJLMJYroXRmjlLJiKzhIVleX5aslqolb/ew30xaM Wlm4fqGahygpGiVioY9RFEeyY1d5cCDRkirAEY6Nir+L3ntcgAykS0q0HyR7rjMxFQKt PSm2n/0Pz7jPoONTlL9bnN/g77+Ncx2kXJTFuZvo0fEt2g1ZDosIw8KfVOvsmJ18AA52 6YCZXFvpoQKFTVkaTO0ZHO+Jg2gQcniXTRAEYAHfudN2UBJoKzZaPVd+HBg0xQd2txIA tqqgWB+zASyZW4n+gKDOSYmDg72ygT17Iy5bziFmZGFA89UNW3Ig+U4xGdRwe84irubg eLBw== 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=jZ4MKy9YxFUhqGFBTxUT54NN/xTa5W9Uj5g9ozrgptI=; b=UOymInCtT3j6NkLL9e2lZaeONbDwVfLthCuecWs7PAAcdwgg+/5wv6pS3QNFxHwPfX 3rh60Rrc/rmYN+qiy/1eZNQdP6/ByRsXpTN1RQhlkTicXKjztamEW4noUZwQyq6yZYQq 2TzpfXg8m3nYmtajJGMI4iybSqwoFgIzi9nPAhoujpmT/XRjSCQ+LL3SUvx1gXPEHUy/ hcXa5XTLtTy2wVEZgf7UwYgvhl1tN7GahOZe6MWCv/f9GBssEcKfuB3sZ28ZWZDQ3ock MEpkSQz+i68SzwhDqmoQ8u1SnNMeQC+JLg0rGwLrWk1oZbXtOBYTNioHAQYDq07OGDgt pQtA== X-Gm-Message-State: APjAAAWjbNaDf1eNYEUU0nEcKIRYUbAFiEOD61CW8wn5mtCqY04YPNUu 7hriudnYeGrneXnw4cCMH+c= X-Received: by 2002:aa7:921a:: with SMTP id 26mr52507472pfo.99.1560480879482; Thu, 13 Jun 2019 19:54:39 -0700 (PDT) Received: from hari-Inspiron-1545 ([183.83.89.153]) by smtp.gmail.com with ESMTPSA id p3sm1096076pgh.90.2019.06.13.19.54.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Jun 2019 19:54:38 -0700 (PDT) Date: Fri, 14 Jun 2019 08:24:34 +0530 From: Hariprasad Kelam To: Greg Kroah-Hartman , Hariprasad Kelam , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [Patch v2 1/3] staging: rtl8723bs: hal: sdio_halinit: fix comparison to true/false is error prone Message-ID: <20190614025433.GA3419@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 ---- changes in v2: send proper patch without corruption ---- --- drivers/staging/rtl8723bs/hal/sdio_halinit.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/staging/rtl8723bs/hal/sdio_halinit.c b/drivers/staging/rtl8723bs/hal/sdio_halinit.c index 3c65a9c..4db3211 100644 --- a/drivers/staging/rtl8723bs/hal/sdio_halinit.c +++ b/drivers/staging/rtl8723bs/hal/sdio_halinit.c @@ -26,7 +26,7 @@ static u8 CardEnable(struct adapter *padapter) rtw_hal_get_hwreg(padapter, HW_VAR_APFM_ON_MAC, &bMacPwrCtrlOn); - if (bMacPwrCtrlOn == false) { + if (!bMacPwrCtrlOn) { /* RSV_CTRL 0x1C[7:0] = 0x00 */ /* unlock ISO/CLK/Power control register */ rtw_write8(padapter, REG_RSV_CTRL, 0x0); @@ -127,7 +127,7 @@ u8 _InitPowerOn_8723BS(struct adapter *padapter) /* only cmd52 can be used before power on(card enable) */ ret = CardEnable(padapter); - if (ret == false) { + if (!ret) { RT_TRACE( _module_hci_hal_init_c_, _drv_emerg_, @@ -838,7 +838,7 @@ static u32 rtl8723bs_hal_init(struct adapter *padapter) /* SIC_Init(padapter); */ - if (pwrctrlpriv->reg_rfoff == true) + if (pwrctrlpriv->reg_rfoff) pwrctrlpriv->rf_pwrstate = rf_off; /* 2010/08/09 MH We need to check if we need to turnon or off RF after detecting */ @@ -1081,7 +1081,7 @@ static void CardDisableRTL8723BSdio(struct adapter *padapter) ret = false; rtw_hal_set_hwreg(padapter, HW_VAR_APFM_ON_MAC, &bMacPwrCtrlOn); ret = HalPwrSeqCmdParsing(padapter, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK, rtl8723B_card_disable_flow); - if (ret == false) { + if (!ret) { DBG_8192C(KERN_ERR "%s: run CARD DISABLE flow fail!\n", __func__); } } @@ -1091,9 +1091,9 @@ static u32 rtl8723bs_hal_deinit(struct adapter *padapter) struct dvobj_priv *psdpriv = padapter->dvobj; struct debug_priv *pdbgpriv = &psdpriv->drv_dbg; - if (padapter->hw_init_completed == true) { - if (adapter_to_pwrctl(padapter)->bips_processing == true) { - if (padapter->netif_up == true) { + if (padapter->hw_init_completed) { + if (adapter_to_pwrctl(padapter)->bips_processing) { + if (padapter->netif_up) { int cnt = 0; u8 val8 = 0; @@ -1387,7 +1387,7 @@ static s32 _ReadAdapterInfo8723BS(struct adapter *padapter) RT_TRACE(_module_hci_hal_init_c_, _drv_info_, ("+_ReadAdapterInfo8723BS\n")); /* before access eFuse, make sure card enable has been called */ - if (padapter->hw_init_completed == false) + if (!padapter->hw_init_completed) _InitPowerOn_8723BS(padapter); @@ -1404,7 +1404,7 @@ static s32 _ReadAdapterInfo8723BS(struct adapter *padapter) _ReadPROMContent(padapter); _InitOtherVariable(padapter); - if (padapter->hw_init_completed == false) { + if (!padapter->hw_init_completed) { rtw_write8(padapter, 0x67, 0x00); /* for BT, Switch Ant control to BT */ CardDisableRTL8723BSdio(padapter);/* for the power consumption issue, wifi ko module is loaded during booting, but wifi GUI is off */ } -- 2.7.4