From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755843AbbFBGVG (ORCPT ); Tue, 2 Jun 2015 02:21:06 -0400 Received: from mail-am1on0115.outbound.protection.outlook.com ([157.56.112.115]:2464 "EHLO emea01-am1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755803AbbFBGU7 convert rfc822-to-8bit (ORCPT ); Tue, 2 Jun 2015 02:20:59 -0400 From: "Dhere, Chaitanya (C.)" To: "gregkh@linuxfoundation.org" CC: "cristina.opriceana@gmail.com" , "hamohammed.sa@gmail.com" , "gdonald@gmail.com" , "mahfouz.saif.elyazal@gmail.com" , "benoit.taine@lip6.fr" , "paul.gortmaker@windriver.com" , "devel@driverdev.osuosl.org" , "linux-kernel@vger.kernel.org" Subject: [PATCH v3 1/2] staging: rtl8192u: Patch to modify if, else conditions Thread-Topic: [PATCH v3 1/2] staging: rtl8192u: Patch to modify if, else conditions Thread-Index: AQHQnPxIYq9Sb2cOTkSlC6+wnlsNJg== Date: Tue, 2 Jun 2015 06:20:55 +0000 Message-ID: <20150602062050.GA19161@ubuntu> Reply-To: "20150531013818.GE28154@kroah.com" <20150531013818.GE28154@kroah.com> 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: [91.212.132.116] x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:AM3PR06MB1396; 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:AM3PR06MB1396;BCL:0;PCL:0;RULEID:;SRVR:AM3PR06MB1396; x-forefront-prvs: 05954A7C45 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(189002)(199003)(19580395003)(5001830100001)(19580405001)(46102003)(106116001)(33716001)(66066001)(5001860100001)(81156007)(2900100001)(68736005)(105586002)(2501003)(97736004)(4001540100001)(62966003)(43066003)(189998001)(87936001)(101416001)(33656002)(229853001)(106356001)(54356999)(53806999)(2860100001)(5001960100002)(2351001)(40100003)(102836002)(86362001)(122556002)(77156002)(2656002)(50986999)(64706001)(110136002)(5002640100001);DIR:OUT;SFP:1102;SCL:1;SRVR:AM3PR06MB1396;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: <01D5A5C5CAD3884FBE6F4607B4757ABB@eurprd06.prod.outlook.com> Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-OriginatorOrg: visteon.com X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Jun 2015 06:20:55.7782 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 7a147aaf-01ec-498c-80a1-e34a8c63c548 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM3PR06MB1396 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Chaitanya Dhere In this patch, the if, else conditions are modified to remove the unnecessary equality checks. This change was detected with help of coccinelle tool. Signed-off-by: Chaitanya Dhere --- drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c index d2e8b12..1742e58 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c @@ -1364,12 +1364,10 @@ 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); - } - else if(ieee->is_silent_reset == 1) - { + } else { printk("==================>silent reset associate\n"); ieee->is_silent_reset = false; } -- 1.7.9.5