Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1255259

[PATCH 3/3] Staging: wilc1000: Remove boolean comparision

From Punit Vara <punitvara@gmail.com>
Newsgroups linux.kernel
Subject [PATCH 3/3] Staging: wilc1000: Remove boolean comparision
Date 2015-10-25 00:40 +0200
Message-ID <qnfDH-5tK-9@gated-at.bofh.it> (permalink)
References <qnfDH-5tK-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


This patch is to the host_interface.c file that fixes up following
warning reported by coccicheck:

WARNING: Comparison to bool

Boolean tests do not need explicit comparison to true or false

Signed-off-by: Punit Vara <punitvara@gmail.com>
---
 drivers/staging/wilc1000/host_interface.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index 38fead4..09a6c98 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -1440,7 +1440,7 @@ static s32 Handle_RcvdNtwrkInfo(struct host_if_drv *hif_drv,
 			}
 		}
 
-		if (bNewNtwrkFound == true) {
+		if (bNewNtwrkFound) {
 			PRINT_D(HOSTINF_DBG, "New network found\n");
 
 			if (hif_drv->strWILC_UsrScanReq.u32RcvdChCount < MAX_NUM_SCANNED_NETWORKS) {
@@ -2714,7 +2714,7 @@ static void Handle_PowerManagement(struct host_if_drv *hif_drv,
 
 	strWID.id = (u16)WID_POWER_MANAGEMENT;
 
-	if (strPowerMgmtParam->enabled == true)
+	if (strPowerMgmtParam->enabled)
 		s8PowerMode = MIN_FAST_PS;
 	else
 		s8PowerMode = NO_POWERSAVE;
-- 
2.5.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/3] Staging: wilc1000: Remove coccicheck warnings and error Punit Vara <punitvara@gmail.com> - 2015-10-25 00:40 +0200
  [PATCH 3/3] Staging: wilc1000: Remove boolean comparision Punit Vara <punitvara@gmail.com> - 2015-10-25 00:40 +0200
  [PATCH 1/3] staging: wilc1000: Remove reference preceded by free Punit Vara <punitvara@gmail.com> - 2015-10-25 00:40 +0200
    Re: [PATCH 1/3] staging: wilc1000: Remove reference preceded by free Greg KH <gregkh@linuxfoundation.org> - 2015-10-25 20:20 +0100
      Re: [PATCH 1/3] staging: wilc1000: Remove reference preceded by free punit vara <punitvara@gmail.com> - 2015-10-25 20:40 +0100
        Re: [PATCH 1/3] staging: wilc1000: Remove reference preceded by free punit vara <punitvara@gmail.com> - 2015-10-25 21:00 +0100
          Re: [PATCH 1/3] staging: wilc1000: Remove reference preceded by free Greg KH <gregkh@linuxfoundation.org> - 2015-10-25 22:40 +0100
  [PATCH 2/3] Staging: wilc1000: Remove comparision of field address to NULL Punit Vara <punitvara@gmail.com> - 2015-10-25 00:40 +0200
    Re: [PATCH 2/3] Staging: wilc1000: Remove comparision of field  address to NULL Greg KH <gregkh@linuxfoundation.org> - 2015-10-25 20:20 +0100

csiph-web