From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753708AbbESQ5X (ORCPT ); Tue, 19 May 2015 12:57:23 -0400 Received: from mail-am1on0115.outbound.protection.outlook.com ([157.56.112.115]:56553 "EHLO emea01-am1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751733AbbESQ4A convert rfc822-to-8bit (ORCPT ); Tue, 19 May 2015 12:56:00 -0400 X-Greylist: delayed 88856 seconds by postgrey-1.27 at vger.kernel.org; Tue, 19 May 2015 12:55:59 EDT From: "Dhere, Chaitanya (C.)" To: "gregkh@linuxfoundation.org" , "cristina.opriceana@gmail.com" , "hamohammed.sa@gmail.com" , "gdonald@gmail.com" , "mahfouz.saif.elyazal@gmail.com" , "benoit.taine@lip6.fr" , "paul.gortmaker@windriver.com" CC: "devel@driverdev.osuosl.org" , "linux-kernel@vger.kernel.org" Subject: [PATCH] staging: rtl8192u: Patch to modify if, else conditions Thread-Topic: [PATCH] staging: rtl8192u: Patch to modify if, else conditions Thread-Index: AQHQklStq0r7sW8mVUOXJrLUlFImJg== Date: Tue, 19 May 2015 16:55:57 +0000 Message-ID: <20150519165543.GA2801@chaitanya-Ideapad-Z560> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=cvijaydh@visteon.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [117.195.25.176] x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:AM3PR06MB1394; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(601004)(5005006)(3002001);SRVR:AM3PR06MB1394;BCL:0;PCL:0;RULEID:;SRVR:AM3PR06MB1394; x-forefront-prvs: 0581B5AB35 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(189002)(199003)(50986999)(66066001)(5001960100002)(33656002)(105586002)(86362001)(106356001)(229853001)(106116001)(64706001)(5001830100001)(87936001)(19580395003)(101416001)(19580405001)(5001860100001)(5001770100001)(40100003)(122556002)(189998001)(2201001)(68736005)(54356999)(62966003)(77156002)(2860100001)(2900100001)(4001540100001)(81156007)(92566002)(2501003)(46102003)(33716001)(2656002)(102836002)(97736004);DIR:OUT;SFP:1102;SCL:1;SRVR:AM3PR06MB1394;H:AM3PR06MB1393.eurprd06.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; Content-Type: text/plain; charset="us-ascii" Content-ID: <7CE299AAA95ED64FB02E9D1D57C3C87C@eurprd06.prod.outlook.com> Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-OriginatorOrg: visteon.com X-MS-Exchange-CrossTenant-originalarrivaltime: 19 May 2015 16:55:57.1884 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 7a147aaf-01ec-498c-80a1-e34a8c63c548 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM3PR06MB1394 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In this patch: 1. the if condition is modified to remove the unnecessary equality check. 2. The else if condition is replaced by an else condition since the variable checked in the if statement is a bool making the else if unnecessary. 3. Fixed indentation problem on line 1369. These changes were detected with help of coccinelle tool. Signed-off-by: Chaitanya Dhere --- drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c index d2e8b12..41f74ab 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c @@ -1364,12 +1364,11 @@ static void ieee80211_associate_complete_wq(struct work_struct *work) ieee->LinkDetectInfo.NumRecvDataInPeriod= 1; } ieee->link_change(ieee->dev); - if(ieee->is_silent_reset == 0){ + if (!ieee->is_silent_reset) { printk("============>normal associate\n"); - notify_wx_assoc_event(ieee); + notify_wx_assoc_event(ieee); } - else if(ieee->is_silent_reset == 1) - { + else { printk("==================>silent reset associate\n"); ieee->is_silent_reset = false; } -- 1.9.1