Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750982AbdFTF1d (ORCPT ); Tue, 20 Jun 2017 01:27:33 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:33658 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750808AbdFTF1b (ORCPT ); Tue, 20 Jun 2017 01:27:31 -0400 Date: Tue, 20 Jun 2017 10:57:28 +0530 From: simran singhal To: Greg Kroah-Hartman Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH] staging: rtl8723bs: hal: Use (true/false) in assignment to bool Message-ID: <20170620052727.GA2473@singhal-Inspiron-5558> 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 List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1144 Lines: 39 This patch assigns (true/false) to boolean EDCCA_State instead of (1/0). And, there is no need of comparing EDCCA_State explicitly with constant 1. Signed-off-by: simran singhal --- drivers/staging/rtl8723bs/hal/odm_DIG.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/rtl8723bs/hal/odm_DIG.c b/drivers/staging/rtl8723bs/hal/odm_DIG.c index 202c52f..0bde944 100644 --- a/drivers/staging/rtl8723bs/hal/odm_DIG.c +++ b/drivers/staging/rtl8723bs/hal/odm_DIG.c @@ -278,11 +278,11 @@ void odm_Adaptivity(void *pDM_VOID, u8 IGI) if (!pDM_Odm->ForceEDCCA) { if (pDM_Odm->RSSI_Min > pDM_Odm->AdapEn_RSSI) - EDCCA_State = 1; + EDCCA_State = true; else if (pDM_Odm->RSSI_Min < (pDM_Odm->AdapEn_RSSI - 5)) - EDCCA_State = 0; + EDCCA_State = false; } else - EDCCA_State = 1; + EDCCA_State = true; if ( pDM_Odm->bLinked && @@ -305,7 +305,7 @@ void odm_Adaptivity(void *pDM_VOID, u8 IGI) ) ); - if (EDCCA_State == 1) { + if (EDCCA_State) { Diff = IGI_target-(s8)IGI; TH_L2H_dmc = pDM_Odm->TH_L2H_ini + Diff; if (TH_L2H_dmc > 10) -- 2.7.4