Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756486AbbFPJoR (ORCPT ); Tue, 16 Jun 2015 05:44:17 -0400 Received: from mail-am1on0115.outbound.protection.outlook.com ([157.56.112.115]:29056 "EHLO emea01-am1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932179AbbFPJoJ convert rfc822-to-8bit (ORCPT ); Tue, 16 Jun 2015 05:44:09 -0400 From: "Abdul, Hussain (H.)" To: "gregkh@linuxfoundation.org" CC: "devel@driverdev.osuosl.org" , "linux-kernel@vger.kernel.org" , "Ravindran, Madhusudhanan (M.)" , "Dighe, Niranjan (N.)" , "johnny.kim@atmel.com" , "rachel.kim@atmel.com" , "dean.lee@atmel.com" , "chris.park@atmel.com" , "linux-wireless@vger.kernel.org" Subject: [PATCH v2] Staging: wilc1000: Boolean tests don't need comparisons Thread-Topic: [PATCH v2] Staging: wilc1000: Boolean tests don't need comparisons Thread-Index: AQHQqBj8q8pgySGSa0iOVCnsN5bOhg== Date: Tue, 16 Jun 2015 09:44:06 +0000 Message-ID: <1434447763-14752-1-git-send-email-habdul@visteon.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 1.9.1 authentication-results: linuxfoundation.org; dkim=none (message not signed) header.d=none; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [74.112.167.117] x-microsoft-exchange-diagnostics: 1;DB5PR06MB1110;3:Nt1PGu95MlM8WJk0PMll2wMX4UjmSNcc/sPwvaJNf1tcjbnZD6s7Gv3/gSJRmkKI8vuuXGyLCRccZOKnJ1wjlgvAJlcaih0qTzNoalCtuJ6BC3CyK/1FL+vEOk5XMIEIEfAyUDCaUB61uo/W63KBng==;10:sB8MU9qlpWy9sStj+GFr4iwfQb2BpQrbH/HGqi+0A49pq54m+JV6/Y579NdIDb6hMIWuiLcvzUwkwXkQ3I6aACyxkVGqwAEdO2iOzExIeT8=;6:ys2GdjhdN2+aTDv2P9w4gjhNJ/oGB8fmbJVOBxTU8C1PN3S7Xe+T2fdrH0gzaqFt x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DB5PR06MB1110; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(601004)(520003)(5005006)(3002001);SRVR:DB5PR06MB1110;BCL:0;PCL:0;RULEID:;SRVR:DB5PR06MB1110; x-forefront-prvs: 06098A2863 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(2501003)(33646002)(229853001)(2351001)(87936001)(19580405001)(19580395003)(46102003)(575784001)(86362001)(2656002)(106116001)(36756003)(189998001)(50986999)(40100003)(2900100001)(77096005)(102836002)(50226001)(5002640100001)(77156002)(92566002)(5001960100002)(110136002)(66066001)(122556002)(19627235001);DIR:OUT;SFP:1102;SCL:1;SRVR:DB5PR06MB1110;H:DB5PR06MB1112.eurprd06.prod.outlook.com;FPR:;SPF:None;MLV:sfv;LANG:en; Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT MIME-Version: 1.0 X-OriginatorOrg: visteon.com X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Jun 2015 09:44:06.1237 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 7a147aaf-01ec-498c-80a1-e34a8c63c548 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB5PR06MB1110 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4945 Lines: 130 From: Abdul Hussain This patch removes unwanted true and false from boolean tests. Signed-off-by: Abdul Hussain --- drivers/staging/wilc1000/coreconfigurator.c | 8 ++++---- drivers/staging/wilc1000/linux_mon.c | 2 +- drivers/staging/wilc1000/linux_wlan.c | 2 +- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 4 ++-- drivers/staging/wilc1000/wilc_wlan.c | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/staging/wilc1000/coreconfigurator.c b/drivers/staging/wilc1000/coreconfigurator.c index 9abc73d..616cf6d 100644 --- a/drivers/staging/wilc1000/coreconfigurator.c +++ b/drivers/staging/wilc1000/coreconfigurator.c @@ -1717,7 +1717,7 @@ s32 ParseResponse(u8 *resp, tstrWID *pstrWIDcfgResult) idx++; } idx += 3; - if ((u16WIDid == g_wid_num) && (num_wid_processed == false)) { + if ((u16WIDid == g_wid_num) && (!num_wid_processed)) { num_wid_processed = true; if (-2 == further_process_response(&resp[idx], u16WIDid, cfg_len, true, 0, &pstrWIDcfgResult[ResCnt])) { @@ -1923,7 +1923,7 @@ s32 ConfigWaitResponse(WILC_Char *pcRespBuffer, s32 s32MaxRespBuffLen, s32 *ps32 * gstrConfigPktInfo.bRespRequired = bRespRequired;*/ - if (gstrConfigPktInfo.bRespRequired == true) { + if (gstrConfigPktInfo.bRespRequired) { down(&SemHandlePktResp); *ps32BytesRead = gstrConfigPktInfo.s32BytesRead; @@ -1984,7 +1984,7 @@ s32 SendConfigPkt(u8 u8Mode, tstrWID *pstrWIDs, ConfigWaitResponse(gps8ConfigPacket, MAX_PACKET_BUFF_SIZE, &s32RcvdRespLen, bRespRequired); - if (bRespRequired == true) { + if (bRespRequired) { /* If the operating Mode is GET, then we expect a response frame from */ /* the driver. Hence start listening to the port for response */ if (g_oper_mode == GET_CFG) { @@ -2021,7 +2021,7 @@ s32 ConfigProvideResponse(WILC_Char *pcRespBuffer, s32 s32RespLen) { s32 s32Error = WILC_SUCCESS; - if (gstrConfigPktInfo.bRespRequired == true) { + if (gstrConfigPktInfo.bRespRequired) { if (s32RespLen <= gstrConfigPktInfo.s32MaxRespBuffLen) { WILC_memcpy(gstrConfigPktInfo.pcRespBuffer, pcRespBuffer, s32RespLen); gstrConfigPktInfo.s32BytesRead = s32RespLen; diff --git a/drivers/staging/wilc1000/linux_mon.c b/drivers/staging/wilc1000/linux_mon.c index 8cba13c..30d1c76 100644 --- a/drivers/staging/wilc1000/linux_mon.c +++ b/drivers/staging/wilc1000/linux_mon.c @@ -452,7 +452,7 @@ void WILC_mgm_HOSTAPD_ACK(void *priv, bool bStatus) cb_hdr->rate = 5; /* txrate->bitrate / 5; */ - if (true == bStatus) { + if (bStatus) { /* success */ cb_hdr->tx_flags = IEEE80211_RADIOTAP_F_TX_RTS; } else { diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c index c1e9272..c1cf5be 100644 --- a/drivers/staging/wilc1000/linux_wlan.c +++ b/drivers/staging/wilc1000/linux_wlan.c @@ -309,7 +309,7 @@ static int dev_state_ev_handler(struct notifier_block *this, unsigned long event - if (bEnablePS == true) + if (bEnablePS) host_int_set_power_mgmt((WILC_WFIDrvHandle)pstrWFIDrv, 1, 0); PRINT_D(GENERIC_DBG, "[%s] Up IP\n", dev_iface->ifa_label); diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c index 9861476..db0b782 100644 --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c @@ -624,7 +624,7 @@ static void CfgConnectResult(tenuConnDisconnEvent enuConnDisconnEvent, } } - if (bNeedScanRefresh == true) { + if (bNeedScanRefresh) { /*BugID_5418*/ /*Also, refrsh DIRECT- results if */ refresh_scan(priv, 1, true); @@ -2817,7 +2817,7 @@ int WILC_WFI_set_power_mgmt(struct wiphy *wiphy, struct net_device *dev, return -EIO; } - if (bEnablePS == true) + if (bEnablePS) host_int_set_power_mgmt(priv->hWILCWFIDrv, enabled, timeout); diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c index 762470c..db9e717 100644 --- a/drivers/staging/wilc1000/wilc_wlan.c +++ b/drivers/staging/wilc1000/wilc_wlan.c @@ -559,7 +559,7 @@ static int wilc_wlan_txq_add_net_pkt(void *priv, uint8_t *buffer, uint32_t buffe #ifdef TCP_ACK_FILTER tqe->tcp_PendingAck_index = NOT_TCP_ACK; #ifdef TCP_ENHANCEMENTS - if (is_TCP_ACK_Filter_Enabled() == true) + if (is_TCP_ACK_Filter_Enabled()) #endif tcp_process(tqe); #endif @@ -2337,7 +2337,7 @@ u16 Set_machw_change_vir_if(bool bValue) PRINT_ER("Error while Reading reg WILC_CHANGING_VIR_IF\n"); } - if (bValue == true) { + if (bValue) { reg |= (BIT31); } else { reg &= ~(BIT31); -- 1.9.1 -- 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/